diff --git a/apps/blank/LICENSE.txt b/apps/blank/LICENSE.txt index c6055ec8f..dd5b3a58a 100644 --- a/apps/blank/LICENSE.txt +++ b/apps/blank/LICENSE.txt @@ -1,174 +1,174 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/apps/blank/NOTICE.txt b/apps/blank/NOTICE.txt index 5c3c04fc8..b2a160f5e 100644 --- a/apps/blank/NOTICE.txt +++ b/apps/blank/NOTICE.txt @@ -1,6 +1,6 @@ -Apache Struts - -Copyright 2006 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/ +Apache Struts + +Copyright 2006 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/ diff --git a/apps/blank/README.txt b/apps/blank/README.txt index db14cea57..6608909d5 100644 --- a/apps/blank/README.txt +++ b/apps/blank/README.txt @@ -1,10 +1,10 @@ -README.txt - blank - -This is an "empty" application that you can deploy as the basis of your own -application. - -For more on getting started with Struts, see - -* http://cwiki.apache.org/WW/home.html - +README.txt - blank + +This is an "empty" application that you can deploy as the basis of your own +application. + +For more on getting started with Struts, see + +* http://cwiki.apache.org/WW/home.html + ---------------------------------------------------------------------------- \ No newline at end of file diff --git a/apps/blank/src/main/java/example/build.bat b/apps/blank/src/main/java/example/build.bat index a3f4edd01..1e5d185ae 100644 --- a/apps/blank/src/main/java/example/build.bat +++ b/apps/blank/src/main/java/example/build.bat @@ -1,3 +1,3 @@ -@echo off -set CLASSPATH=..\..\..\lib\xwork-2.0-beta-1.jar -javac *.java -d ..\..\..\classes +@echo off +set CLASSPATH=..\..\..\lib\xwork-2.0-beta-1.jar +javac *.java -d ..\..\..\classes diff --git a/apps/blank/src/main/resources/example.xml b/apps/blank/src/main/resources/example.xml index e93d84e7b..53198f9b7 100644 --- a/apps/blank/src/main/resources/example.xml +++ b/apps/blank/src/main/resources/example.xml @@ -1,25 +1,25 @@ - - - - - - - - - /example/HelloWorld.jsp - - - - /example/Login.jsp - Menu - - - - /example/{1}.jsp - - - - - + + + + + + + + + /example/HelloWorld.jsp + + + + /example/Login.jsp + Menu + + + + /example/{1}.jsp + + + + + diff --git a/apps/blank/src/main/resources/example/Login-validation.xml b/apps/blank/src/main/resources/example/Login-validation.xml index d703ee7a3..d18f77981 100644 --- a/apps/blank/src/main/resources/example/Login-validation.xml +++ b/apps/blank/src/main/resources/example/Login-validation.xml @@ -1,16 +1,16 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/apps/mailreader/README.txt b/apps/mailreader/README.txt index 802aea4d4..8dfe2deff 100644 --- a/apps/mailreader/README.txt +++ b/apps/mailreader/README.txt @@ -1,18 +1,18 @@ -README.txt - mailreader - -The MailReader demonstrates a localized application with a master/child -CRUD workflow. - -This rendition also demonstrates using wildcards to "normalize" an -application. - -See the Sandbox for other MailReader examples using other architectures. - -* http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2/apps/ - -For more about the MailReader applicaton genneraly, visit Struts University. - -* http://www.StrutsUniversity.org/ - - +README.txt - mailreader + +The MailReader demonstrates a localized application with a master/child +CRUD workflow. + +This rendition also demonstrates using wildcards to "normalize" an +application. + +See the Sandbox for other MailReader examples using other architectures. + +* http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2/apps/ + +For more about the MailReader applicaton genneraly, visit Struts University. + +* http://www.StrutsUniversity.org/ + + ---------------------------------------------------------------------------- \ No newline at end of file diff --git a/apps/mailreader/src/main/java/mailreader-default.xml b/apps/mailreader/src/main/java/mailreader-default.xml index 06b4a2fab..3ea53ed3f 100644 --- a/apps/mailreader/src/main/java/mailreader-default.xml +++ b/apps/mailreader/src/main/java/mailreader-default.xml @@ -1,47 +1,47 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /pages/Error.jsp - /pages/Error.jsp - Login_input - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + /pages/Error.jsp + /pages/Error.jsp + Login_input + + + + + + + + + diff --git a/apps/mailreader/src/main/java/mailreader-support.xml b/apps/mailreader/src/main/java/mailreader-support.xml index 5931b6a3a..a6995431e 100644 --- a/apps/mailreader/src/main/java/mailreader-support.xml +++ b/apps/mailreader/src/main/java/mailreader-support.xml @@ -1,63 +1,63 @@ - - - - - - - - /tour.html - - - - - /Welcome.jsp - - - - - Welcome - - - - /Login.jsp - Welcome - MainMenu - ChangePassword - - - - - - /Registration.jsp - MainMenu - - - - - - - - /Subscription.jsp - Registration_input - - - - - - - - - - - - - - /{1}.jsp - - - - + + + + + + + + /tour.html + + + + + /Welcome.jsp + + + + + Welcome + + + + /Login.jsp + Welcome + MainMenu + ChangePassword + + + + + + /Registration.jsp + MainMenu + + + + + + + + /Subscription.jsp + Registration_input + + + + + + + + + + + + + + /{1}.jsp + + + + diff --git a/apps/mailreader/src/main/java/mailreader2/Login-validation.xml b/apps/mailreader/src/main/java/mailreader2/Login-validation.xml index 4a04c7629..ed9359f27 100644 --- a/apps/mailreader/src/main/java/mailreader2/Login-validation.xml +++ b/apps/mailreader/src/main/java/mailreader2/Login-validation.xml @@ -1,14 +1,14 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/apps/mailreader/src/main/java/mailreader2/Registration-validation.xml b/apps/mailreader/src/main/java/mailreader2/Registration-validation.xml index 44d66bc19..03cba1e78 100644 --- a/apps/mailreader/src/main/java/mailreader2/Registration-validation.xml +++ b/apps/mailreader/src/main/java/mailreader2/Registration-validation.xml @@ -1,32 +1,32 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/mailreader/src/main/java/mailreader2/Subscription-Subscription_save-validation.xml b/apps/mailreader/src/main/java/mailreader2/Subscription-Subscription_save-validation.xml index 9f2f6d793..7d28623e3 100644 --- a/apps/mailreader/src/main/java/mailreader2/Subscription-Subscription_save-validation.xml +++ b/apps/mailreader/src/main/java/mailreader2/Subscription-Subscription_save-validation.xml @@ -1,23 +1,23 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/mailreader/src/main/java/mailreader2/Subscription-validation.xml b/apps/mailreader/src/main/java/mailreader2/Subscription-validation.xml index df903c25b..bc422c8b9 100644 --- a/apps/mailreader/src/main/java/mailreader2/Subscription-validation.xml +++ b/apps/mailreader/src/main/java/mailreader2/Subscription-validation.xml @@ -1,11 +1,11 @@ - - - - - - - - - - - + + + + + + + + + + + diff --git a/apps/mailreader/src/main/java/struts.xml b/apps/mailreader/src/main/java/struts.xml index 91d6a4830..879d39fb2 100644 --- a/apps/mailreader/src/main/java/struts.xml +++ b/apps/mailreader/src/main/java/struts.xml @@ -1,16 +1,16 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + \ No newline at end of file diff --git a/apps/mailreader/src/main/webapp/WEB-INF/database.xml b/apps/mailreader/src/main/webapp/WEB-INF/database.xml index 5710477aa..0bc833dce 100644 --- a/apps/mailreader/src/main/webapp/WEB-INF/database.xml +++ b/apps/mailreader/src/main/webapp/WEB-INF/database.xml @@ -1,13 +1,13 @@ - - - - - - - - - + + + + + + + + + \ No newline at end of file diff --git a/apps/portlet/README.txt b/apps/portlet/README.txt index e46d341eb..e6d424d00 100644 --- a/apps/portlet/README.txt +++ b/apps/portlet/README.txt @@ -1,17 +1,17 @@ -README.txt - portlet - -This is a simple example of using the portlet API with Struts applications. - -For more on getting started with Struts, see - -* http://cwiki.apache.org/WW/home.html - -WARNING - Additional configuration required for deployment - -Due to difference in portlet container implementations, the portlet -WAR is not ready-to-run. Extract the portlet WAR, and then copy the -contents of apps/portlet/src/main/etc// into the -WAR's WEB-INF directory. - - +README.txt - portlet + +This is a simple example of using the portlet API with Struts applications. + +For more on getting started with Struts, see + +* http://cwiki.apache.org/WW/home.html + +WARNING - Additional configuration required for deployment + +Due to difference in portlet container implementations, the portlet +WAR is not ready-to-run. Extract the portlet WAR, and then copy the +contents of apps/portlet/src/main/etc// into the +WAR's WEB-INF directory. + + ---------------------------------------------------------------------------- \ No newline at end of file diff --git a/apps/portlet/src/main/etc/jetspeed2/struts-portlet.psml b/apps/portlet/src/main/etc/jetspeed2/struts-portlet.psml index d6c795489..bf865ba5a 100644 --- a/apps/portlet/src/main/etc/jetspeed2/struts-portlet.psml +++ b/apps/portlet/src/main/etc/jetspeed2/struts-portlet.psml @@ -1,20 +1,20 @@ - - - Struts Portlet Example Application - Struts Portlet Example Application - - - - - - - - - - public-view - + + + Struts Portlet Example Application + Struts Portlet Example Application + + + + + + + + + + public-view + \ No newline at end of file diff --git a/apps/portlet/src/main/java/org/apache/struts2/portlet/example/FormExampleModelDriven.java b/apps/portlet/src/main/java/org/apache/struts2/portlet/example/FormExampleModelDriven.java index 1eee98b24..0ad526e49 100644 --- a/apps/portlet/src/main/java/org/apache/struts2/portlet/example/FormExampleModelDriven.java +++ b/apps/portlet/src/main/java/org/apache/struts2/portlet/example/FormExampleModelDriven.java @@ -1,37 +1,37 @@ -/* - * $Id: FormExample.java 471756 2006-11-06 15:01:43Z husted $ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.portlet.example; - -import org.apache.struts2.portlet.example.model.Name; - -import com.opensymphony.xwork2.ActionSupport; -import com.opensymphony.xwork2.ModelDriven; - -/** - */ -public class FormExampleModelDriven extends ActionSupport implements ModelDriven { - - private Name name = new Name(); - - public Name getModel() { - return name; - } -} +/* + * $Id$ + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.struts2.portlet.example; + +import org.apache.struts2.portlet.example.model.Name; + +import com.opensymphony.xwork2.ActionSupport; +import com.opensymphony.xwork2.ModelDriven; + +/** + */ +public class FormExampleModelDriven extends ActionSupport implements ModelDriven { + + private Name name = new Name(); + + public Name getModel() { + return name; + } +} diff --git a/apps/portlet/src/main/java/org/apache/struts2/portlet/example/fileupload/FileUploadAction.java b/apps/portlet/src/main/java/org/apache/struts2/portlet/example/fileupload/FileUploadAction.java index c021714d3..9d6842de0 100644 --- a/apps/portlet/src/main/java/org/apache/struts2/portlet/example/fileupload/FileUploadAction.java +++ b/apps/portlet/src/main/java/org/apache/struts2/portlet/example/fileupload/FileUploadAction.java @@ -1,81 +1,81 @@ -/* - * $Id: $ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.portlet.example.fileupload; - -import java.io.File; - -import org.apache.struts2.dispatcher.DefaultActionSupport; - -/** - * File Upload example's action. FileUploadAction - * - */ -public class FileUploadAction extends DefaultActionSupport { - - private static final long serialVersionUID = 5156288255337069381L; - - private String contentType; - private File upload; - private String fileName; - private String caption; - - // since we are using the file name will be - // obtained through getter/setter of FileName - public String getUploadFileName() { - return fileName; - } - public void setUploadFileName(String fileName) { - this.fileName = fileName; - } - - - // since we are using the content type will be - // obtained through getter/setter of ContentType - public String getUploadContentType() { - return contentType; - } - public void setUploadContentType(String contentType) { - this.contentType = contentType; - } - - - // since we are using the File itself will be - // obtained through getter/setter of - public File getUpload() { - return upload; - } - public void setUpload(File upload) { - this.upload = upload; - } - - - public String getCaption() { - return caption; - } - public void setCaption(String caption) { - this.caption = caption; - } - - public String upload() throws Exception { - return SUCCESS; - } - -} +/* + * $Id: $ + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.struts2.portlet.example.fileupload; + +import java.io.File; + +import org.apache.struts2.dispatcher.DefaultActionSupport; + +/** + * File Upload example's action. FileUploadAction + * + */ +public class FileUploadAction extends DefaultActionSupport { + + private static final long serialVersionUID = 5156288255337069381L; + + private String contentType; + private File upload; + private String fileName; + private String caption; + + // since we are using the file name will be + // obtained through getter/setter of FileName + public String getUploadFileName() { + return fileName; + } + public void setUploadFileName(String fileName) { + this.fileName = fileName; + } + + + // since we are using the content type will be + // obtained through getter/setter of ContentType + public String getUploadContentType() { + return contentType; + } + public void setUploadContentType(String contentType) { + this.contentType = contentType; + } + + + // since we are using the File itself will be + // obtained through getter/setter of + public File getUpload() { + return upload; + } + public void setUpload(File upload) { + this.upload = upload; + } + + + public String getCaption() { + return caption; + } + public void setCaption(String caption) { + this.caption = caption; + } + + public String upload() throws Exception { + return SUCCESS; + } + +} diff --git a/apps/portlet/src/main/java/org/apache/struts2/portlet/example/model/Name.java b/apps/portlet/src/main/java/org/apache/struts2/portlet/example/model/Name.java index 1e59e1187..21856bb8f 100644 --- a/apps/portlet/src/main/java/org/apache/struts2/portlet/example/model/Name.java +++ b/apps/portlet/src/main/java/org/apache/struts2/portlet/example/model/Name.java @@ -1,18 +1,18 @@ -package org.apache.struts2.portlet.example.model; - -public class Name { - private String firstName; - private String lastName; - public String getFirstName() { - return firstName; - } - public void setFirstName(String firstName) { - this.firstName = firstName; - } - public String getLastName() { - return lastName; - } - public void setLastName(String lastName) { - this.lastName = lastName; - } -} +package org.apache.struts2.portlet.example.model; + +public class Name { + private String firstName; + private String lastName; + public String getFirstName() { + return firstName; + } + public void setFirstName(String firstName) { + this.firstName = firstName; + } + public String getLastName() { + return lastName; + } + public void setLastName(String lastName) { + this.lastName = lastName; + } +} diff --git a/apps/portlet/src/main/resources/struts-edit.xml b/apps/portlet/src/main/resources/struts-edit.xml index 73ec598dc..46dd84c7f 100644 --- a/apps/portlet/src/main/resources/struts-edit.xml +++ b/apps/portlet/src/main/resources/struts-edit.xml @@ -1,48 +1,48 @@ - - - - - - - /WEB-INF/edit/index.jsp - - - /WEB-INF/edit/test.jsp - - - - /WEB-INF/edit/formExampleInput.jsp - - - - - - /WEB-INF/edit/formExampleInput.jsp - - - /edit/processFormExampleForward.action?firstName=${firstName}&lastName=${lastName} - - - - - - /WEB-INF/edit/formExample.jsp - - - - - - - /WEB-INF/edit/namespaceTest.jsp - - + + + + + + + /WEB-INF/edit/index.jsp + + + /WEB-INF/edit/test.jsp + + + + /WEB-INF/edit/formExampleInput.jsp + + + + + + /WEB-INF/edit/formExampleInput.jsp + + + /edit/processFormExampleForward.action?firstName=${firstName}&lastName=${lastName} + + + + + + /WEB-INF/edit/formExample.jsp + + + + + + + /WEB-INF/edit/namespaceTest.jsp + + \ No newline at end of file diff --git a/apps/portlet/src/main/resources/struts-help.xml b/apps/portlet/src/main/resources/struts-help.xml index 742a8d29c..99ce10faa 100644 --- a/apps/portlet/src/main/resources/struts-help.xml +++ b/apps/portlet/src/main/resources/struts-help.xml @@ -1,14 +1,14 @@ - - - - - - - /WEB-INF/help/index.jsp - - + + + + + + + /WEB-INF/help/index.jsp + + \ No newline at end of file diff --git a/apps/portlet/src/main/resources/struts-view.xml b/apps/portlet/src/main/resources/struts-view.xml index 2edbaa864..5ab6457e4 100644 --- a/apps/portlet/src/main/resources/struts-view.xml +++ b/apps/portlet/src/main/resources/struts-view.xml @@ -1,115 +1,115 @@ - - - - - - - /WEB-INF/view/index.jsp - - - - - /WEB-INF/view/formExampleInput.jsp - - - - - - /WEB-INF/view/formExampleInput.jsp - - - /WEB-INF/view/formExample.jsp - - - - - - /WEB-INF/view/formExampleInputModelDriven.jsp - - - /WEB-INF/view/formExample.jsp - - - - - - /WEB-INF/view/formExampleInputValidation.jsp - - - - - - /WEB-INF/view/formExample.jsp - - - /WEB-INF/view/formExampleInputValidation.jsp - - - - - - /WEB-INF/view/fileUpload.jsp - - - /WEB-INF/view/fileUploadSuccess.jsp - - - - - - /WEB-INF/view/tokenExampleInput.jsp - - - - - - /WEB-INF/view/tokenExampleInput.jsp - - - /WEB-INF/view/tokenExampleInput.jsp - - - /WEB-INF/view/tokenExample.jsp - - - - - - - /WEB-INF/view/springExample.jsp - - - - - - /WEB-INF/view/freeMarkerExampleInput.ftl - - - - - /view/processFreeMarkerView.action?firstName=${firstName}&lastName=${lastName} - - - - /WEB-INF/view/freeMarkerExample.ftl - - - - /WEB-INF/view/helloWorld.vm - - - - + + + + + + + /WEB-INF/view/index.jsp + + + + + /WEB-INF/view/formExampleInput.jsp + + + + + + /WEB-INF/view/formExampleInput.jsp + + + /WEB-INF/view/formExample.jsp + + + + + + /WEB-INF/view/formExampleInputModelDriven.jsp + + + /WEB-INF/view/formExample.jsp + + + + + + /WEB-INF/view/formExampleInputValidation.jsp + + + + + + /WEB-INF/view/formExample.jsp + + + /WEB-INF/view/formExampleInputValidation.jsp + + + + + + /WEB-INF/view/fileUpload.jsp + + + /WEB-INF/view/fileUploadSuccess.jsp + + + + + + /WEB-INF/view/tokenExampleInput.jsp + + + + + + /WEB-INF/view/tokenExampleInput.jsp + + + /WEB-INF/view/tokenExampleInput.jsp + + + /WEB-INF/view/tokenExample.jsp + + + + + + + /WEB-INF/view/springExample.jsp + + + + + + /WEB-INF/view/freeMarkerExampleInput.ftl + + + + + /view/processFreeMarkerView.action?firstName=${firstName}&lastName=${lastName} + + + + /WEB-INF/view/freeMarkerExample.ftl + + + + /WEB-INF/view/helloWorld.vm + + + + diff --git a/apps/portlet/src/main/webapp/WEB-INF/view/fileUpload.jsp b/apps/portlet/src/main/webapp/WEB-INF/view/fileUpload.jsp index bf702bdbf..7ba795802 100644 --- a/apps/portlet/src/main/webapp/WEB-INF/view/fileUpload.jsp +++ b/apps/portlet/src/main/webapp/WEB-INF/view/fileUpload.jsp @@ -1,13 +1,13 @@ -<%@ taglib prefix="s" uri="/struts-tags" %> - -

Fileupload sample

- - - - - - - - - - +<%@ taglib prefix="s" uri="/struts-tags" %> + +

Fileupload sample

+ + + + + + + + + + diff --git a/apps/portlet/src/main/webapp/WEB-INF/view/fileUploadSuccess.jsp b/apps/portlet/src/main/webapp/WEB-INF/view/fileUploadSuccess.jsp index 3c0259f8f..8fad0e4b5 100644 --- a/apps/portlet/src/main/webapp/WEB-INF/view/fileUploadSuccess.jsp +++ b/apps/portlet/src/main/webapp/WEB-INF/view/fileUploadSuccess.jsp @@ -1,14 +1,14 @@ -<%@ taglib prefix="s" uri="/struts-tags" %> - -

Fileupload sample

- -

-

    -
  • ContentType:
  • -
  • FileName:
  • -
  • File:
  • -
  • Caption:
  • -
-

- - +<%@ taglib prefix="s" uri="/struts-tags" %> + +

Fileupload sample

+ +

+

    +
  • ContentType:
  • +
  • FileName:
  • +
  • File:
  • +
  • Caption:
  • +
+

+ + diff --git a/apps/portlet/src/main/webapp/WEB-INF/view/formExampleInputModelDriven.jsp b/apps/portlet/src/main/webapp/WEB-INF/view/formExampleInputModelDriven.jsp index bbb852f54..b65c4e032 100644 --- a/apps/portlet/src/main/webapp/WEB-INF/view/formExampleInputModelDriven.jsp +++ b/apps/portlet/src/main/webapp/WEB-INF/view/formExampleInputModelDriven.jsp @@ -1,8 +1,8 @@ -<%@ taglib prefix="s" uri="/struts-tags" %> - -

Input your name

- - - - - +<%@ taglib prefix="s" uri="/struts-tags" %> + +

Input your name

+ + + + + diff --git a/apps/showcase/README.txt b/apps/showcase/README.txt index 4d483c78c..e48384f2e 100644 --- a/apps/showcase/README.txt +++ b/apps/showcase/README.txt @@ -1,10 +1,10 @@ -README.txt - showcase - -Showcase is a collection of examples with code that you might be adopt and -adapt in your own applications. - -For more on getting started with Struts, see - -* http://cwiki.apache.org/WW/home.html - +README.txt - showcase + +Showcase is a collection of examples with code that you might be adopt and +adapt in your own applications. + +For more on getting started with Struts, see + +* http://cwiki.apache.org/WW/home.html + ---------------------------------------------------------------------------- \ No newline at end of file diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowAjaxDynamicTreeAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowAjaxDynamicTreeAction.java index 6a6978e7b..5a8fb4007 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowAjaxDynamicTreeAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/ShowAjaxDynamicTreeAction.java @@ -1,5 +1,5 @@ /* - * $Id: pom.xml 559206 2007-07-24 21:01:18Z apetrelli $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/ExampleAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/ExampleAction.java index 13fb73cd0..4bc64fb7e 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/ExampleAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/ExampleAction.java @@ -1,88 +1,88 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.showcase.action; - -import java.util.Arrays; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.opensymphony.xwork2.ActionSupport; - -public class ExampleAction extends ActionSupport { - public static final String CONSTANT = "Struts Rocks!"; - - public static Date getCurrentDate() { - return new Date(); - } - - public String getName() { - return "John Galt"; - } - - public String[] getBands() { - return new String[] { "Pink Floyd", "Metallica", "Guns & Roses" }; - } - - public List getMovies() { - return Arrays.asList("Lord of the Rings", "Matrix"); - } - - public Book getBook() { - return new Book("Iliad", "Homer"); - } - - public Map getBooks() { - Map books = new HashMap(); - books.put("Iliad", new Book("Iliad", "Homer")); - books.put("The Republic", new Book("The Replublic", "Plato")); - books.put("Thus Spake Zarathustra", new Book("Thus Spake Zarathustra", - "Friedrich Nietzsche")); - return books; - } -} - -class Book { - private String title; - private String author; - - public Book(String title, String author) { - this.title = title; - this.author = author; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getAuthor() { - return author; - } - - public void setAuthor(String author) { - this.author = author; - } +/* + * $Id$ + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.struts2.showcase.action; + +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.opensymphony.xwork2.ActionSupport; + +public class ExampleAction extends ActionSupport { + public static final String CONSTANT = "Struts Rocks!"; + + public static Date getCurrentDate() { + return new Date(); + } + + public String getName() { + return "John Galt"; + } + + public String[] getBands() { + return new String[] { "Pink Floyd", "Metallica", "Guns & Roses" }; + } + + public List getMovies() { + return Arrays.asList("Lord of the Rings", "Matrix"); + } + + public Book getBook() { + return new Book("Iliad", "Homer"); + } + + public Map getBooks() { + Map books = new HashMap(); + books.put("Iliad", new Book("Iliad", "Homer")); + books.put("The Republic", new Book("The Replublic", "Plato")); + books.put("Thus Spake Zarathustra", new Book("Thus Spake Zarathustra", + "Friedrich Nietzsche")); + return books; + } +} + +class Book { + private String title; + private String author; + + public Book(String title, String author) { + this.title = title; + this.author = author; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getAuthor() { + return author; + } + + public void setAuthor(String author) { + this.author = author; + } } \ No newline at end of file diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/JSPEvalAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/JSPEvalAction.java index 64dfdb5a6..66f8c2199 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/action/JSPEvalAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/action/JSPEvalAction.java @@ -1,77 +1,77 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.showcase.action; - -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileOutputStream; -import java.io.FileWriter; -import java.io.IOException; -import java.net.URL; - -import org.apache.struts2.ServletActionContext; - -import com.opensymphony.xwork2.Action; -import com.opensymphony.xwork2.interceptor.annotations.After; - -/** - * Will only work on containers that unzip war files - * - */ -public class JSPEvalAction extends ExampleAction { - private String jsp; - private final static String FILE = "/interactive/demo.jsp"; - - public String execute() throws IOException { - if (jsp != null) { - //write it to file - URL url = ServletActionContext.getServletContext().getResource(FILE); - BufferedWriter writer = new BufferedWriter(new FileWriter(new File(url - .getFile()))); - try { - //directive - writer.write("<%@ taglib prefix=\"s\" uri=\"/struts-tags\" %>"); - writer.write(jsp); - } finally { - if (writer != null) - writer.close(); - } - } - return Action.SUCCESS; - } - - @After - public void cleanUp() throws IOException { - URL url = ServletActionContext.getServletContext().getResource(FILE); - FileOutputStream out = new FileOutputStream(new File(url.getFile())); - try { - out.getChannel().truncate(0); - } finally { - if (out != null) - out.close(); - } - } - - public void setJsp(String jsp) { - this.jsp = jsp; - } - -} +/* + * $Id$ + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.struts2.showcase.action; + +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileOutputStream; +import java.io.FileWriter; +import java.io.IOException; +import java.net.URL; + +import org.apache.struts2.ServletActionContext; + +import com.opensymphony.xwork2.Action; +import com.opensymphony.xwork2.interceptor.annotations.After; + +/** + * Will only work on containers that unzip war files + * + */ +public class JSPEvalAction extends ExampleAction { + private String jsp; + private final static String FILE = "/interactive/demo.jsp"; + + public String execute() throws IOException { + if (jsp != null) { + //write it to file + URL url = ServletActionContext.getServletContext().getResource(FILE); + BufferedWriter writer = new BufferedWriter(new FileWriter(new File(url + .getFile()))); + try { + //directive + writer.write("<%@ taglib prefix=\"s\" uri=\"/struts-tags\" %>"); + writer.write(jsp); + } finally { + if (writer != null) + writer.close(); + } + } + return Action.SUCCESS; + } + + @After + public void cleanUp() throws IOException { + URL url = ServletActionContext.getServletContext().getResource(FILE); + FileOutputStream out = new FileOutputStream(new File(url.getFile())); + try { + out.getChannel().truncate(0); + } finally { + if (out != null) + out.close(); + } + } + + public void setJsp(String jsp) { + this.jsp = jsp; + } + +} diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/AutocompleterExampleAction.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/AutocompleterExampleAction.java index 9443cf2f7..0e2316e03 100644 --- a/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/AutocompleterExampleAction.java +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/ajax/AutocompleterExampleAction.java @@ -1,5 +1,5 @@ /* - * $Id: pom.xml 559206 2007-07-24 21:01:18Z apetrelli $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/apps/showcase/src/main/resources/struts-interactive.xml b/apps/showcase/src/main/resources/struts-interactive.xml index b0f471ee2..b3034e14a 100644 --- a/apps/showcase/src/main/resources/struts-interactive.xml +++ b/apps/showcase/src/main/resources/struts-interactive.xml @@ -1,15 +1,15 @@ - - - - - - - - - /interactive/demo.jsp - - - + + + + + + + + + /interactive/demo.jsp + + + \ No newline at end of file diff --git a/apps/showcase/src/main/webapp/ajax/JSONList.js b/apps/showcase/src/main/webapp/ajax/JSONList.js index eee667727..d856727b9 100644 --- a/apps/showcase/src/main/webapp/ajax/JSONList.js +++ b/apps/showcase/src/main/webapp/ajax/JSONList.js @@ -1,63 +1,63 @@ -[ - ["Alabama","AL"], - ["Alaska","AK"], - ["American Samoa","AS"], - ["Arizona","AZ"], - ["Arkansas","AR"], - ["Armed Forces Europe","AE"], - ["Armed Forces Pacific","AP"], - ["Armed Forces the Americas","AA"], - ["California","CA"], - ["Colorado","CO"], - ["Connecticut","CT"], - ["Delaware","DE"], - ["District of Columbia","DC"], - ["Federated States of Micronesia","FM"], - ["Florida","FL"], - ["Georgia","GA"], - ["Guam","GU"], - ["Hawaii","HI"], - ["Idaho","ID"], - ["Illinois","IL"], - ["Indiana","IN"], - ["Iowa","IA"], - ["Kansas","KS"], - ["Kentucky","KY"], - ["Louisiana","LA"], - ["Maine","ME"], - ["Marshall Islands","MH"], - ["Maryland","MD"], - ["Massachusetts","MA"], - ["Michigan","MI"], - ["Minnesota","MN"], - ["Mississippi","MS"], - ["Missouri","MO"], - ["Montana","MT"], - ["Nebraska","NE"], - ["Nevada","NV"], - ["New Hampshire","NH"], - ["New Jersey","NJ"], - ["New Mexico","NM"], - ["New York","NY"], - ["North Carolina","NC"], - ["North Dakota","ND"], - ["Northern Mariana Islands","MP"], - ["Ohio","OH"], - ["Oklahoma","OK"], - ["Oregon","OR"], - ["Pennsylvania","PA"], - ["Puerto Rico","PR"], - ["Rhode Island","RI"], - ["South Carolina","SC"], - ["South Dakota","SD"], - ["Tennessee","TN"], - ["Texas","TX"], - ["Utah","UT"], - ["Vermont","VT"], - ["Virgin Islands, U.S.","VI"], - ["Virginia","VA"], - ["Washington","WA"], - ["West Virginia","WV"], - ["Wisconsin","WI"], - ["Wyoming","WY"] -] +[ + ["Alabama","AL"], + ["Alaska","AK"], + ["American Samoa","AS"], + ["Arizona","AZ"], + ["Arkansas","AR"], + ["Armed Forces Europe","AE"], + ["Armed Forces Pacific","AP"], + ["Armed Forces the Americas","AA"], + ["California","CA"], + ["Colorado","CO"], + ["Connecticut","CT"], + ["Delaware","DE"], + ["District of Columbia","DC"], + ["Federated States of Micronesia","FM"], + ["Florida","FL"], + ["Georgia","GA"], + ["Guam","GU"], + ["Hawaii","HI"], + ["Idaho","ID"], + ["Illinois","IL"], + ["Indiana","IN"], + ["Iowa","IA"], + ["Kansas","KS"], + ["Kentucky","KY"], + ["Louisiana","LA"], + ["Maine","ME"], + ["Marshall Islands","MH"], + ["Maryland","MD"], + ["Massachusetts","MA"], + ["Michigan","MI"], + ["Minnesota","MN"], + ["Mississippi","MS"], + ["Missouri","MO"], + ["Montana","MT"], + ["Nebraska","NE"], + ["Nevada","NV"], + ["New Hampshire","NH"], + ["New Jersey","NJ"], + ["New Mexico","NM"], + ["New York","NY"], + ["North Carolina","NC"], + ["North Dakota","ND"], + ["Northern Mariana Islands","MP"], + ["Ohio","OH"], + ["Oklahoma","OK"], + ["Oregon","OR"], + ["Pennsylvania","PA"], + ["Puerto Rico","PR"], + ["Rhode Island","RI"], + ["South Carolina","SC"], + ["South Dakota","SD"], + ["Tennessee","TN"], + ["Texas","TX"], + ["Utah","UT"], + ["Vermont","VT"], + ["Virgin Islands, U.S.","VI"], + ["Virginia","VA"], + ["Washington","WA"], + ["West Virginia","WV"], + ["Wisconsin","WI"], + ["Wyoming","WY"] +] diff --git a/apps/showcase/src/main/webapp/ajax/autocompleter/index.jsp b/apps/showcase/src/main/webapp/ajax/autocompleter/index.jsp index 106bb8fe5..0f0f33751 100644 --- a/apps/showcase/src/main/webapp/ajax/autocompleter/index.jsp +++ b/apps/showcase/src/main/webapp/ajax/autocompleter/index.jsp @@ -62,7 +62,7 @@ Using a JSON list returned from an action (href="/JSONList.action"), without aut Reload on type (loadOnTextChange="true"), after 3 characters (loadMinimumCount="3", it is "3" by default), without the down arrow button (showDownArrow="false")
- diff --git a/apps/showcase/src/main/webapp/conversion/Address.java.txt b/apps/showcase/src/main/webapp/conversion/Address.java.txt index bf501834e..d3e494c8c 100644 --- a/apps/showcase/src/main/webapp/conversion/Address.java.txt +++ b/apps/showcase/src/main/webapp/conversion/Address.java.txt @@ -1,5 +1,5 @@ /* - * $Id: Person.java 440597 2006-09-06 03:34:39Z tmjee $ + * $Id$ * * Copyright 2006 The Apache Software Foundation. * diff --git a/apps/showcase/src/main/webapp/conversion/AddressAction.java.txt b/apps/showcase/src/main/webapp/conversion/AddressAction.java.txt index 35f17f5fd..4342f8b21 100644 --- a/apps/showcase/src/main/webapp/conversion/AddressAction.java.txt +++ b/apps/showcase/src/main/webapp/conversion/AddressAction.java.txt @@ -1,5 +1,5 @@ /* - * $Id: Person.java 440597 2006-09-06 03:34:39Z tmjee $ + * $Id$ * * Copyright 2006 The Apache Software Foundation. * diff --git a/apps/showcase/src/main/webapp/conversion/EnumTypeConverter.java.txt b/apps/showcase/src/main/webapp/conversion/EnumTypeConverter.java.txt index 0a1b1aa38..acc3cf29e 100644 --- a/apps/showcase/src/main/webapp/conversion/EnumTypeConverter.java.txt +++ b/apps/showcase/src/main/webapp/conversion/EnumTypeConverter.java.txt @@ -1,5 +1,5 @@ /* - * $Id: Person.java 440597 2006-09-06 03:34:39Z tmjee $ + * $Id$ * * Copyright 2006 The Apache Software Foundation. * diff --git a/apps/showcase/src/main/webapp/conversion/OperationsEnum.java.txt b/apps/showcase/src/main/webapp/conversion/OperationsEnum.java.txt index 2db119448..14865ce89 100644 --- a/apps/showcase/src/main/webapp/conversion/OperationsEnum.java.txt +++ b/apps/showcase/src/main/webapp/conversion/OperationsEnum.java.txt @@ -1,5 +1,5 @@ /* - * $Id: Person.java 440597 2006-09-06 03:34:39Z tmjee $ + * $Id$ * * Copyright 2006 The Apache Software Foundation. * diff --git a/apps/showcase/src/main/webapp/conversion/OperationsEnumAction.java.txt b/apps/showcase/src/main/webapp/conversion/OperationsEnumAction.java.txt index ee2327ff3..35e117572 100644 --- a/apps/showcase/src/main/webapp/conversion/OperationsEnumAction.java.txt +++ b/apps/showcase/src/main/webapp/conversion/OperationsEnumAction.java.txt @@ -1,5 +1,5 @@ /* - * $Id: Person.java 440597 2006-09-06 03:34:39Z tmjee $ + * $Id$ * * Copyright 2006 The Apache Software Foundation. * diff --git a/apps/showcase/src/main/webapp/conversion/Person.java.txt b/apps/showcase/src/main/webapp/conversion/Person.java.txt index 2ce9e0fdb..f87072c11 100644 --- a/apps/showcase/src/main/webapp/conversion/Person.java.txt +++ b/apps/showcase/src/main/webapp/conversion/Person.java.txt @@ -1,5 +1,5 @@ /* - * $Id: AbstractDao.java 394498 2006-04-16 15:28:06Z tmjee $ + * $Id$ * * Copyright 2006 The Apache Software Foundation. * diff --git a/apps/showcase/src/main/webapp/conversion/PersonAction.java.txt b/apps/showcase/src/main/webapp/conversion/PersonAction.java.txt index 015fab018..1e0bd55e3 100644 --- a/apps/showcase/src/main/webapp/conversion/PersonAction.java.txt +++ b/apps/showcase/src/main/webapp/conversion/PersonAction.java.txt @@ -1,5 +1,5 @@ /* - * $Id: AbstractDao.java 394498 2006-04-16 15:28:06Z tmjee $ + * $Id$ * * Copyright 2006 The Apache Software Foundation. * diff --git a/apps/showcase/src/main/webapp/fileupload/index.jsp b/apps/showcase/src/main/webapp/fileupload/index.jsp index 334eb2f6a..bbbdb9e20 100644 --- a/apps/showcase/src/main/webapp/fileupload/index.jsp +++ b/apps/showcase/src/main/webapp/fileupload/index.jsp @@ -1,25 +1,25 @@ -<%@taglib prefix="s" uri="/struts-tags" %> +<%@taglib prefix="s" uri="/struts-tags" %> Showcase - Fileupload - -
    -
  • - - Single File Upload -
  • -
  • - - Multiple File Upload (List) - -
  • -
  • - - Multiple File Upload (Array) -
  • -
+ +
    +
  • + + Single File Upload +
  • +
  • + + Multiple File Upload (List) + +
  • +
  • + + Multiple File Upload (Array) +
  • +
\ No newline at end of file diff --git a/apps/showcase/src/main/webapp/fileupload/multipleUploadUsingArray-success.jsp b/apps/showcase/src/main/webapp/fileupload/multipleUploadUsingArray-success.jsp index 74fc4869f..b5980592b 100644 --- a/apps/showcase/src/main/webapp/fileupload/multipleUploadUsingArray-success.jsp +++ b/apps/showcase/src/main/webapp/fileupload/multipleUploadUsingArray-success.jsp @@ -1,37 +1,37 @@ -<%@taglib prefix="s" uri="/struts-tags" %> - - -Insert title here - - - - - - - - - - -
File
- - - - - - - - - -
File Name
- - - - - - - - -
Content Type
- - +<%@taglib prefix="s" uri="/struts-tags" %> + + +Insert title here + + + + + + + + + + +
File
+ + + + + + + + + +
File Name
+ + + + + + + + +
Content Type
+ + \ No newline at end of file diff --git a/apps/showcase/src/main/webapp/fileupload/multipleUploadUsingArray.jsp b/apps/showcase/src/main/webapp/fileupload/multipleUploadUsingArray.jsp index 7fac4c744..611315e42 100644 --- a/apps/showcase/src/main/webapp/fileupload/multipleUploadUsingArray.jsp +++ b/apps/showcase/src/main/webapp/fileupload/multipleUploadUsingArray.jsp @@ -1,20 +1,20 @@ -<%@ page - language="java" - contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> -<%@ taglib prefix="s" uri="/struts-tags" %> - - -Showcase - fileupload - multiple fileupload using List - - - - - - - - - - - +<%@ page + language="java" + contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags" %> + + +Showcase - fileupload - multiple fileupload using List + + + + + + + + + + + \ No newline at end of file diff --git a/apps/showcase/src/main/webapp/fileupload/multipleUploadUsingList-success.jsp b/apps/showcase/src/main/webapp/fileupload/multipleUploadUsingList-success.jsp index 74fc4869f..b5980592b 100644 --- a/apps/showcase/src/main/webapp/fileupload/multipleUploadUsingList-success.jsp +++ b/apps/showcase/src/main/webapp/fileupload/multipleUploadUsingList-success.jsp @@ -1,37 +1,37 @@ -<%@taglib prefix="s" uri="/struts-tags" %> - - -Insert title here - - - - - - - - - - -
File
- - - - - - - - - -
File Name
- - - - - - - - -
Content Type
- - +<%@taglib prefix="s" uri="/struts-tags" %> + + +Insert title here + + + + + + + + + + +
File
+ + + + + + + + + +
File Name
+ + + + + + + + +
Content Type
+ + \ No newline at end of file diff --git a/apps/showcase/src/main/webapp/fileupload/multipleUploadUsingList.jsp b/apps/showcase/src/main/webapp/fileupload/multipleUploadUsingList.jsp index ada475878..d9fc6b19a 100644 --- a/apps/showcase/src/main/webapp/fileupload/multipleUploadUsingList.jsp +++ b/apps/showcase/src/main/webapp/fileupload/multipleUploadUsingList.jsp @@ -1,20 +1,20 @@ -<%@ page - language="java" - contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> -<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ page + language="java" + contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ taglib prefix="s" uri="/struts-tags" %> Showcase - fileupload - multiple fileupload using List - - - - - - - + + + + + + + \ No newline at end of file diff --git a/apps/showcase/src/main/webapp/interactive/example-action.jsp b/apps/showcase/src/main/webapp/interactive/example-action.jsp index e142b4552..aaf5ce9eb 100644 --- a/apps/showcase/src/main/webapp/interactive/example-action.jsp +++ b/apps/showcase/src/main/webapp/interactive/example-action.jsp @@ -1,76 +1,76 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -
-package org.apache.struts2.showcase.action;
-
-import java.util.Arrays;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import com.opensymphony.xwork2.ActionSupport;
-
-public class ExampleAction extends ActionSupport {
-    public static final String CONSTANT = "Struts Rocks!";
-        
-    public static Date getCurrentDate() {
-        return new Date();
-    }
-    
-    public String getName() {
-        return "John Galt";
-    }
-
-    public String[] getBands() {
-        return new String[] { "Pink Floyd", "Metallica", "Guns & Roses" };
-    }
-
-    public List<String> getMovies() {
-        return Arrays.asList("Lord of the Rings", "Matrix");
-    }
-
-    public Book getBook() {
-        return new Book("Iliad", "Homer");
-    }
-
-    public Map<String, Book> getBooks() {
-        Map<String, Book> books = new HashMap<String, Book>();
-        books.put("Iliad", new Book("Iliad", "Homer"));
-        books.put("The Republic", new Book("The Replublic", "Plato"));
-        books.put("Thus Spake Zarathustra", new Book("Thus Spake Zarathustra",
-            "Friedrich Nietzsche"));
-        return books;
-    }
-}
-
-class Book {
-    private String title;
-    private String author;
-
-    public Book(String title, String author) {
-        this.title = title;
-        this.author = author;
-    }
-
-    public String getTitle() {
-        return title;
-    }
-
-    public void setTitle(String title) {
-        this.title = title;
-    }
-
-    public String getAuthor() {
-        return author;
-    }
-
-    public void setAuthor(String author) {
-        this.author = author;
-    }
-}
+<%
+    request.setAttribute("decorator", "none");
+    response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
+    response.setHeader("Pragma","no-cache"); //HTTP 1.0
+    response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
+%>
+
+package org.apache.struts2.showcase.action;
+
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.opensymphony.xwork2.ActionSupport;
+
+public class ExampleAction extends ActionSupport {
+    public static final String CONSTANT = "Struts Rocks!";
+        
+    public static Date getCurrentDate() {
+        return new Date();
+    }
+    
+    public String getName() {
+        return "John Galt";
+    }
+
+    public String[] getBands() {
+        return new String[] { "Pink Floyd", "Metallica", "Guns & Roses" };
+    }
+
+    public List<String> getMovies() {
+        return Arrays.asList("Lord of the Rings", "Matrix");
+    }
+
+    public Book getBook() {
+        return new Book("Iliad", "Homer");
+    }
+
+    public Map<String, Book> getBooks() {
+        Map<String, Book> books = new HashMap<String, Book>();
+        books.put("Iliad", new Book("Iliad", "Homer"));
+        books.put("The Republic", new Book("The Replublic", "Plato"));
+        books.put("Thus Spake Zarathustra", new Book("Thus Spake Zarathustra",
+            "Friedrich Nietzsche"));
+        return books;
+    }
+}
+
+class Book {
+    private String title;
+    private String author;
+
+    public Book(String title, String author) {
+        this.title = title;
+        this.author = author;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getAuthor() {
+        return author;
+    }
+
+    public void setAuthor(String author) {
+        this.author = author;
+    }
+}
 
\ No newline at end of file diff --git a/apps/showcase/src/main/webapp/interactive/index.jsp b/apps/showcase/src/main/webapp/interactive/index.jsp index c23f65aa6..88c1c4e7f 100644 --- a/apps/showcase/src/main/webapp/interactive/index.jsp +++ b/apps/showcase/src/main/webapp/interactive/index.jsp @@ -1,247 +1,247 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> - - - - OGNL and tags demo - - - - - - - - - - - - - - - - - - -
-
-
- Welcome to the OGNL console! -
- :-> -
- - OGNL Expression -
-
-
- - - - - - -
-
- - - -
-
- JSP Eval Result -
-
-
-
-
- -
-
-
-
-

- - - +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sx" uri="/struts-dojo-tags" %> + + + + OGNL and tags demo + + + + + + + + + + + + + + + + + + +
+
+
+ Welcome to the OGNL console! +
+ :-> +
+ + OGNL Expression +
+
+
+ + + + + + +
+
+ + + +
+
+ JSP Eval Result +
+
+
+
+
+ +
+
+
+
+

+ + + \ No newline at end of file diff --git a/apps/showcase/src/main/webapp/interactive/jsp_0.jsp b/apps/showcase/src/main/webapp/interactive/jsp_0.jsp index 18afbead2..b6787d46b 100644 --- a/apps/showcase/src/main/webapp/interactive/jsp_0.jsp +++ b/apps/showcase/src/main/webapp/interactive/jsp_0.jsp @@ -1,62 +1,62 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -

- String Attributes -

-

- Some tag attributes are expected to be Strings in which case String literals - can be passed as the value, like the href attribute in the a tag. -

-

- - <s:a href="http://struts.apache.org/" /> - -

-

- If the value that you want to use in one of these string literal attributes is stored on the Value Stack, - then the %{#name} syntax (alternative syntax) needs to be used. Assuming there is a value - with the name "url" stored on the stack: -

-

- - <s:a href="%{#url}" /> - -

-

- will create an anchor and use the value of "url" for the href attribute. -

-

- Value Attributes -

-

- Other attributes expect an object as their value(not an string literal). In these attributes you can specify - the name of a variable stored on the Value Stack, and the tag will look it up and use it. Like the - value attribute in the property tag. Assuming there is an object stored on the Value Stack with - the name "movie", then: -

-

- - <s:property value="movie" /> - -

-

- will print the value to the page. To pass an String literal to an attribute that expects a value use the %{'string'} - notation. -

-

- If you don't remember if an attribute expects an string literal or a value, you can always use the %{value} notation: -

-

- - <s:a href="%{'http://struts.apache.org/'}" /> -
- <s:property value="%{#movie}" /> -
-

-

- [More details] +<% + request.setAttribute("decorator", "none"); + response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 + response.setHeader("Pragma","no-cache"); //HTTP 1.0 + response.setDateHeader ("Expires", 0); //prevents caching at the proxy server +%> +

+ String Attributes +

+

+ Some tag attributes are expected to be Strings in which case String literals + can be passed as the value, like the href attribute in the a tag. +

+

+ + <s:a href="http://struts.apache.org/" /> + +

+

+ If the value that you want to use in one of these string literal attributes is stored on the Value Stack, + then the %{#name} syntax (alternative syntax) needs to be used. Assuming there is a value + with the name "url" stored on the stack: +

+

+ + <s:a href="%{#url}" /> + +

+

+ will create an anchor and use the value of "url" for the href attribute. +

+

+ Value Attributes +

+

+ Other attributes expect an object as their value(not an string literal). In these attributes you can specify + the name of a variable stored on the Value Stack, and the tag will look it up and use it. Like the + value attribute in the property tag. Assuming there is an object stored on the Value Stack with + the name "movie", then: +

+

+ + <s:property value="movie" /> + +

+

+ will print the value to the page. To pass an String literal to an attribute that expects a value use the %{'string'} + notation. +

+

+ If you don't remember if an attribute expects an string literal or a value, you can always use the %{value} notation: +

+

+ + <s:a href="%{'http://struts.apache.org/'}" /> +
+ <s:property value="%{#movie}" /> +
+

+

+ [More details]

\ No newline at end of file diff --git a/apps/showcase/src/main/webapp/interactive/jsp_1.jsp b/apps/showcase/src/main/webapp/interactive/jsp_1.jsp index 5ac5bc2bd..a96ab7a3c 100644 --- a/apps/showcase/src/main/webapp/interactive/jsp_1.jsp +++ b/apps/showcase/src/main/webapp/interactive/jsp_1.jsp @@ -1,52 +1,52 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -

- Print property value, using the property tag -

-

- On the OGNL demo you learned how to access values from the Value Stack using OGNL expressions. - The property tag is used to print to the page the result of an OGNL expression. The expression - is specified in the value attribute. -

-

To print the value of the expression name to the page type: -

- - <s:property value="name" /> - -

-

- on the JSP console and hit enter. Do it for me -

-

- As you saw in the OGNL demo, to print a property of an object that is not on top of the stack, - use the #object.property notation. -

-

To print the value for the key "struts.view_uri" in request to the page type: -

- - <s:property value="#request['struts.view_uri']" /> - -

-

- on the JSP console and hit enter. Do it for me -

-

- Print property value, using the $ operator -

-

Use the ${name} notation to print values from the Value Stack to the page. -

To print the value of the expression name to the page type: -

- - ${name} - -

-

- on the JSP console and hit enter. Do it for me -

-

- [More details] -

+<% + request.setAttribute("decorator", "none"); + response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 + response.setHeader("Pragma","no-cache"); //HTTP 1.0 + response.setDateHeader ("Expires", 0); //prevents caching at the proxy server +%> +

+ Print property value, using the property tag +

+

+ On the OGNL demo you learned how to access values from the Value Stack using OGNL expressions. + The property tag is used to print to the page the result of an OGNL expression. The expression + is specified in the value attribute. +

+

To print the value of the expression name to the page type: +

+ + <s:property value="name" /> + +

+

+ on the JSP console and hit enter. Do it for me +

+

+ As you saw in the OGNL demo, to print a property of an object that is not on top of the stack, + use the #object.property notation. +

+

To print the value for the key "struts.view_uri" in request to the page type: +

+ + <s:property value="#request['struts.view_uri']" /> + +

+

+ on the JSP console and hit enter. Do it for me +

+

+ Print property value, using the $ operator +

+

Use the ${name} notation to print values from the Value Stack to the page. +

To print the value of the expression name to the page type: +

+ + ${name} + +

+

+ on the JSP console and hit enter. Do it for me +

+

+ [More details] +

diff --git a/apps/showcase/src/main/webapp/interactive/jsp_2.jsp b/apps/showcase/src/main/webapp/interactive/jsp_2.jsp index ae125aa4f..565a7ecd3 100644 --- a/apps/showcase/src/main/webapp/interactive/jsp_2.jsp +++ b/apps/showcase/src/main/webapp/interactive/jsp_2.jsp @@ -1,54 +1,54 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -

- if tag -

-

- The if tag allows you to optionally execute a JSP section. Multiple elseif tags - and one else tag can be associated to an if tag. -

-

- To say hello to John Galt type: -

-

-

-        <s:if test="name == 'John Galt'">
-            Hi John
-        </s:if>
-        <s:else>
-            I don't know you!
-        </s:else>
-    
-

-

- on the JSP console and hit enter. Do it for me -

-

- iterator tag -

-

- The iterator tag loops over an Iterable object one object at a time into - the Value Stack (the value will be on top of the stack). -

-

- To print the all the elements in the "bands" property type: -

-

-

-        <s:iterator value="bands">
-            <s:property />
-            <br />
-        </s:iterator>
-    
-

-

- on the JSP console and hit enter. Do it for me -

-

- [More on the if tag] - [More on the iterator tag] +<% + request.setAttribute("decorator", "none"); + response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 + response.setHeader("Pragma","no-cache"); //HTTP 1.0 + response.setDateHeader ("Expires", 0); //prevents caching at the proxy server +%> +

+ if tag +

+

+ The if tag allows you to optionally execute a JSP section. Multiple elseif tags + and one else tag can be associated to an if tag. +

+

+ To say hello to John Galt type: +

+

+

+        <s:if test="name == 'John Galt'">
+            Hi John
+        </s:if>
+        <s:else>
+            I don't know you!
+        </s:else>
+    
+

+

+ on the JSP console and hit enter. Do it for me +

+

+ iterator tag +

+

+ The iterator tag loops over an Iterable object one object at a time into + the Value Stack (the value will be on top of the stack). +

+

+ To print the all the elements in the "bands" property type: +

+

+

+        <s:iterator value="bands">
+            <s:property />
+            <br />
+        </s:iterator>
+    
+

+

+ on the JSP console and hit enter. Do it for me +

+

+ [More on the if tag] + [More on the iterator tag]

\ No newline at end of file diff --git a/apps/showcase/src/main/webapp/interactive/jsp_3.jsp b/apps/showcase/src/main/webapp/interactive/jsp_3.jsp index 0e90c0c0a..483db12ec 100644 --- a/apps/showcase/src/main/webapp/interactive/jsp_3.jsp +++ b/apps/showcase/src/main/webapp/interactive/jsp_3.jsp @@ -1,65 +1,65 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -

- set tag -

-

- The set tag sets the variable with the name specified in the name attribute to - the value specified in the value attribute in the scope - entered in the scope attribute. The available scopes are: -

    -
  • application - application scope according to servlet spec
  • -
  • session - session scope according to servlet spec
  • -
  • request - request scope according to servlet spec
  • -
  • page - page scope according to servlet sepc
  • -
  • action - the value will be set in the request scope and Struts' action context
  • - -
-

-

- This example sets favouriteBand in the request scope to the first element of the bands property: -

-

-

-        <s:set name="favouriteBand" value="bands[0]" />
-        <s:property value="#favouriteBand" />
-    
-

-

- Do it for me -

-

- url tag -

-

- The url tag is used to build urls (who would have guessed!). To build an url mapping to - an action, set the namespace and action attributes. The url will be stored under - the name specified in the id attribute. url tag uses the id attribute while - the set tag uses name. To specify a value (no action lookup), just use the value - attribute. param tags can be nested inside the url tag to add parameters to the url. -

-

- First link creates a url that maps to an action, second one creates a url to google, passing one parameter: -

-

-

-        <s:url id="evalAction" namespace="/nodecorate" action="jspEval" />
-        <s:a href="%{#evalAction}" >Eval</s:a>
-        
-        <s:url id="google" value="http://www.google.com" >
-            <s:param name="q" value="%{'Struts 2'}" /> 
-        </s:url>
-        <s:a href="%{#google}" >Eval</s:a>
-    
-

-

- Do it for me -

-

- [More on the set tag] - [More on the url tag] +<% + request.setAttribute("decorator", "none"); + response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 + response.setHeader("Pragma","no-cache"); //HTTP 1.0 + response.setDateHeader ("Expires", 0); //prevents caching at the proxy server +%> +

+ set tag +

+

+ The set tag sets the variable with the name specified in the name attribute to + the value specified in the value attribute in the scope + entered in the scope attribute. The available scopes are: +

    +
  • application - application scope according to servlet spec
  • +
  • session - session scope according to servlet spec
  • +
  • request - request scope according to servlet spec
  • +
  • page - page scope according to servlet sepc
  • +
  • action - the value will be set in the request scope and Struts' action context
  • + +
+

+

+ This example sets favouriteBand in the request scope to the first element of the bands property: +

+

+

+        <s:set name="favouriteBand" value="bands[0]" />
+        <s:property value="#favouriteBand" />
+    
+

+

+ Do it for me +

+

+ url tag +

+

+ The url tag is used to build urls (who would have guessed!). To build an url mapping to + an action, set the namespace and action attributes. The url will be stored under + the name specified in the id attribute. url tag uses the id attribute while + the set tag uses name. To specify a value (no action lookup), just use the value + attribute. param tags can be nested inside the url tag to add parameters to the url. +

+

+ First link creates a url that maps to an action, second one creates a url to google, passing one parameter: +

+

+

+        <s:url id="evalAction" namespace="/nodecorate" action="jspEval" />
+        <s:a href="%{#evalAction}" >Eval</s:a>
+        
+        <s:url id="google" value="http://www.google.com" >
+            <s:param name="q" value="%{'Struts 2'}" /> 
+        </s:url>
+        <s:a href="%{#google}" >Eval</s:a>
+    
+

+

+ Do it for me +

+

+ [More on the set tag] + [More on the url tag]

\ No newline at end of file diff --git a/apps/showcase/src/main/webapp/interactive/jsp_4.jsp b/apps/showcase/src/main/webapp/interactive/jsp_4.jsp index 94d0fe1b6..8d63ee51c 100644 --- a/apps/showcase/src/main/webapp/interactive/jsp_4.jsp +++ b/apps/showcase/src/main/webapp/interactive/jsp_4.jsp @@ -1,16 +1,16 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -

- More on JSP tags -

-

- Struts 2 provides many more tags which you can learn about - here -

-
-You can keep playing with the JSP console or +<% + request.setAttribute("decorator", "none"); + response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 + response.setHeader("Pragma","no-cache"); //HTTP 1.0 + response.setDateHeader ("Expires", 0); //prevents caching at the proxy server +%> +

+ More on JSP tags +

+

+ Struts 2 provides many more tags which you can learn about + here +

+
+You can keep playing with the JSP console or Start OGNL Interactive Demo \ No newline at end of file diff --git a/apps/showcase/src/main/webapp/interactive/ognl_0.jsp b/apps/showcase/src/main/webapp/interactive/ognl_0.jsp index 6d15eda1c..7f441e44d 100644 --- a/apps/showcase/src/main/webapp/interactive/ognl_0.jsp +++ b/apps/showcase/src/main/webapp/interactive/ognl_0.jsp @@ -1,30 +1,30 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -

- Accessing properties -

-

- The framework uses a standard naming context to evaluate OGNL expressions. - The top level object dealing with OGNL is a Map (usually referred as a context map or context). - OGNL has a notion of there being a root (or default) object within the context. - In OGNL expressions, the properties of the root object can be referenced without any special "marker" notion. - References to other objects are marked with a pound sign (#). - - In this example (and in your JSP pages) the last action executed will be on the top of the stack. -

-

- This action is available on the third tab above. - To access the name field type: -

-

- - name - -

-

- on the OGNL console and hit enter. Do it for me +<% + request.setAttribute("decorator", "none"); + response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 + response.setHeader("Pragma","no-cache"); //HTTP 1.0 + response.setDateHeader ("Expires", 0); //prevents caching at the proxy server +%> +

+ Accessing properties +

+

+ The framework uses a standard naming context to evaluate OGNL expressions. + The top level object dealing with OGNL is a Map (usually referred as a context map or context). + OGNL has a notion of there being a root (or default) object within the context. + In OGNL expressions, the properties of the root object can be referenced without any special "marker" notion. + References to other objects are marked with a pound sign (#). + + In this example (and in your JSP pages) the last action executed will be on the top of the stack. +

+

+ This action is available on the third tab above. + To access the name field type: +

+

+ + name + +

+

+ on the OGNL console and hit enter. Do it for me

\ No newline at end of file diff --git a/apps/showcase/src/main/webapp/interactive/ognl_1.jsp b/apps/showcase/src/main/webapp/interactive/ognl_1.jsp index 4bf1108a4..17505bd5a 100644 --- a/apps/showcase/src/main/webapp/interactive/ognl_1.jsp +++ b/apps/showcase/src/main/webapp/interactive/ognl_1.jsp @@ -1,28 +1,28 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -

- Accessing nested properties -

-

- To access nested properties, use the dot "." operator to concatenate the property names. The action - class has a book field, with title and author fields. -

-

- To access the name of the book type: -

-

- - book.title - -

-

- on the OGNL console and hit enter. Do it for me -

-
-

- [More details] +<% + request.setAttribute("decorator", "none"); + response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 + response.setHeader("Pragma","no-cache"); //HTTP 1.0 + response.setDateHeader ("Expires", 0); //prevents caching at the proxy server +%> +

+ Accessing nested properties +

+

+ To access nested properties, use the dot "." operator to concatenate the property names. The action + class has a book field, with title and author fields. +

+

+ To access the name of the book type: +

+

+ + book.title + +

+

+ on the OGNL console and hit enter. Do it for me +

+
+

+ [More details]

\ No newline at end of file diff --git a/apps/showcase/src/main/webapp/interactive/ognl_2.jsp b/apps/showcase/src/main/webapp/interactive/ognl_2.jsp index e5ed15b5a..c1716db35 100644 --- a/apps/showcase/src/main/webapp/interactive/ognl_2.jsp +++ b/apps/showcase/src/main/webapp/interactive/ognl_2.jsp @@ -1,43 +1,43 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -

- Accessing properties inside Arrays -

-

- To access properties inside arrays, use the brackets "[]" operators with the desired index(starting from 0). The action - class has an array of String in the field bands. -

-

- To access the second element in the bands array type: -

-

- - bands[1] - -

-

- on the OGNL console and hit enter. Do it for me -

-

- Accessing properties inside Lists -

-

Lists can be accessed on the same way. The action class has a List of String on the field movies.

-

- To access the first element in the movies list type: -

-

- - movies[0] - -

-

- on the OGNL console and hit enter. Do it for me -

-
-

- [More details] -

+<% + request.setAttribute("decorator", "none"); + response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 + response.setHeader("Pragma","no-cache"); //HTTP 1.0 + response.setDateHeader ("Expires", 0); //prevents caching at the proxy server +%> +

+ Accessing properties inside Arrays +

+

+ To access properties inside arrays, use the brackets "[]" operators with the desired index(starting from 0). The action + class has an array of String in the field bands. +

+

+ To access the second element in the bands array type: +

+

+ + bands[1] + +

+

+ on the OGNL console and hit enter. Do it for me +

+

+ Accessing properties inside Lists +

+

Lists can be accessed on the same way. The action class has a List of String on the field movies.

+

+ To access the first element in the movies list type: +

+

+ + movies[0] + +

+

+ on the OGNL console and hit enter. Do it for me +

+
+

+ [More details] +

diff --git a/apps/showcase/src/main/webapp/interactive/ognl_3.jsp b/apps/showcase/src/main/webapp/interactive/ognl_3.jsp index 350ee5a0e..03c3095c0 100644 --- a/apps/showcase/src/main/webapp/interactive/ognl_3.jsp +++ b/apps/showcase/src/main/webapp/interactive/ognl_3.jsp @@ -1,54 +1,54 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -

- Accessing properties inside Maps -

-

- To access properties inside maps, use the brackets "[]" operators with the desired key. The action - class has a map of Book objects in the field books. -

-

- To access the book with key "Iliad" in the books map type: -

-

- - books['Iliad'] - -

-

- on the OGNL console and hit enter. Do it for me -

-

If the key does not have spaces in it, you can access an element in the map, using the dot "." operator.

-

- To access the book with key "Iliad" in the books map type: -

-

- - books.Iliad - -

-

- on the OGNL console and hit enter. Do it for me -

-

- Note that the object returned is of type Book. If you want to access one of its properties, you can do so using the dot - "." operator as you did before.

-

- To access the author property of the book with key "Iliad" in the books map type: -

-

- - books['Iliad'].author - -

-

- on the OGNL console and hit enter. Do it for me -

-
-

- [More details] -

+<% + request.setAttribute("decorator", "none"); + response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 + response.setHeader("Pragma","no-cache"); //HTTP 1.0 + response.setDateHeader ("Expires", 0); //prevents caching at the proxy server +%> +

+ Accessing properties inside Maps +

+

+ To access properties inside maps, use the brackets "[]" operators with the desired key. The action + class has a map of Book objects in the field books. +

+

+ To access the book with key "Iliad" in the books map type: +

+

+ + books['Iliad'] + +

+

+ on the OGNL console and hit enter. Do it for me +

+

If the key does not have spaces in it, you can access an element in the map, using the dot "." operator.

+

+ To access the book with key "Iliad" in the books map type: +

+

+ + books.Iliad + +

+

+ on the OGNL console and hit enter. Do it for me +

+

+ Note that the object returned is of type Book. If you want to access one of its properties, you can do so using the dot + "." operator as you did before.

+

+ To access the author property of the book with key "Iliad" in the books map type: +

+

+ + books['Iliad'].author + +

+

+ on the OGNL console and hit enter. Do it for me +

+
+

+ [More details] +

diff --git a/apps/showcase/src/main/webapp/interactive/ognl_4.jsp b/apps/showcase/src/main/webapp/interactive/ognl_4.jsp index ee2765251..7e158d5c5 100644 --- a/apps/showcase/src/main/webapp/interactive/ognl_4.jsp +++ b/apps/showcase/src/main/webapp/interactive/ognl_4.jsp @@ -1,32 +1,32 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -

- Accessing properties on the stack -

-

- Object that are not on the top of the Value Stack are accessed using the "#name" notation. - Some objects are always pushed into the stack by Struts, like: -

-
    -
  • #application
  • -
  • #session
  • -
  • #request
  • -
  • #parameters
  • -
-

To see the value of the first parameter type:

-

- - #parameters['debug'][0] - -

-

- on the OGNL console and hit enter. Do it for me -

-
-

- [More details] +<% + request.setAttribute("decorator", "none"); + response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 + response.setHeader("Pragma","no-cache"); //HTTP 1.0 + response.setDateHeader ("Expires", 0); //prevents caching at the proxy server +%> +

+ Accessing properties on the stack +

+

+ Object that are not on the top of the Value Stack are accessed using the "#name" notation. + Some objects are always pushed into the stack by Struts, like: +

+
    +
  • #application
  • +
  • #session
  • +
  • #request
  • +
  • #parameters
  • +
+

To see the value of the first parameter type:

+

+ + #parameters['debug'][0] + +

+

+ on the OGNL console and hit enter. Do it for me +

+
+

+ [More details]

\ No newline at end of file diff --git a/apps/showcase/src/main/webapp/interactive/ognl_5.jsp b/apps/showcase/src/main/webapp/interactive/ognl_5.jsp index 7bd15cf24..66ed91e3e 100644 --- a/apps/showcase/src/main/webapp/interactive/ognl_5.jsp +++ b/apps/showcase/src/main/webapp/interactive/ognl_5.jsp @@ -1,37 +1,37 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -

- Static fields -

-

- Static fields can easily be accessed in OGNL expressions using the notation - @some.package.ClassName@PROPERTY_NAME for properties, and @some.package.ClassName@METHOD_NAME() - for methods. -

-

To access the value of the CONSTANT field in the ExampleAction type:

-

- - @org.apache.struts2.showcase.action.ExampleAction@CONSTANT - -

-

- on the OGNL console and hit enter. Do it for me -

-

To execute the static method getCurrentDate in the ExampleAction type:

-

- - @org.apache.struts2.showcase.action.ExampleAction@getCurrentDate() - -

-

- on the OGNL console and hit enter. Do it for me -

-
-

- [More details on static fields] - [More details on static methods] +<% + request.setAttribute("decorator", "none"); + response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 + response.setHeader("Pragma","no-cache"); //HTTP 1.0 + response.setDateHeader ("Expires", 0); //prevents caching at the proxy server +%> +

+ Static fields +

+

+ Static fields can easily be accessed in OGNL expressions using the notation + @some.package.ClassName@PROPERTY_NAME for properties, and @some.package.ClassName@METHOD_NAME() + for methods. +

+

To access the value of the CONSTANT field in the ExampleAction type:

+

+ + @org.apache.struts2.showcase.action.ExampleAction@CONSTANT + +

+

+ on the OGNL console and hit enter. Do it for me +

+

To execute the static method getCurrentDate in the ExampleAction type:

+

+ + @org.apache.struts2.showcase.action.ExampleAction@getCurrentDate() + +

+

+ on the OGNL console and hit enter. Do it for me +

+
+

+ [More details on static fields] + [More details on static methods]

\ No newline at end of file diff --git a/apps/showcase/src/main/webapp/interactive/ognl_6.jsp b/apps/showcase/src/main/webapp/interactive/ognl_6.jsp index 430e29e3e..562456780 100644 --- a/apps/showcase/src/main/webapp/interactive/ognl_6.jsp +++ b/apps/showcase/src/main/webapp/interactive/ognl_6.jsp @@ -1,25 +1,25 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -

- Calling methods -

-

- OGNL follows Java's syntax to execute a method. -

-

To execute the getTitle() method on the book object type:

-

- - book.getTitle() - -

-

- on the OGNL console and hit enter. Do it for me -

-
-

- [More details] +<% + request.setAttribute("decorator", "none"); + response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 + response.setHeader("Pragma","no-cache"); //HTTP 1.0 + response.setDateHeader ("Expires", 0); //prevents caching at the proxy server +%> +

+ Calling methods +

+

+ OGNL follows Java's syntax to execute a method. +

+

To execute the getTitle() method on the book object type:

+

+ + book.getTitle() + +

+

+ on the OGNL console and hit enter. Do it for me +

+
+

+ [More details]

\ No newline at end of file diff --git a/apps/showcase/src/main/webapp/interactive/ognl_7.jsp b/apps/showcase/src/main/webapp/interactive/ognl_7.jsp index 0b812180d..91466e14c 100644 --- a/apps/showcase/src/main/webapp/interactive/ognl_7.jsp +++ b/apps/showcase/src/main/webapp/interactive/ognl_7.jsp @@ -1,43 +1,43 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -

- Expressions -

-

- OGNL supports expressions using primitive values. -

-

Arithmetic:

-

- - (6 - 2)/2 - -

-

- on the OGNL console and hit enter. Do it for me -

-

Logical:

-

- - (true || false) and true - -

-

- on the OGNL console and hit enter. Do it for me -

-

Equality:

-

- - 'a' == 'a' - -

-

- on the OGNL console and hit enter. Do it for me -

-

- OGNL supports many more operators and expressions, see [Operators Reference] - for more details. +<% + request.setAttribute("decorator", "none"); + response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 + response.setHeader("Pragma","no-cache"); //HTTP 1.0 + response.setDateHeader ("Expires", 0); //prevents caching at the proxy server +%> +

+ Expressions +

+

+ OGNL supports expressions using primitive values. +

+

Arithmetic:

+

+ + (6 - 2)/2 + +

+

+ on the OGNL console and hit enter. Do it for me +

+

Logical:

+

+ + (true || false) and true + +

+

+ on the OGNL console and hit enter. Do it for me +

+

Equality:

+

+ + 'a' == 'a' + +

+

+ on the OGNL console and hit enter. Do it for me +

+

+ OGNL supports many more operators and expressions, see [Operators Reference] + for more details.

\ No newline at end of file diff --git a/apps/showcase/src/main/webapp/interactive/ognl_8.jsp b/apps/showcase/src/main/webapp/interactive/ognl_8.jsp index eaa6eb49d..a0318ab66 100644 --- a/apps/showcase/src/main/webapp/interactive/ognl_8.jsp +++ b/apps/showcase/src/main/webapp/interactive/ognl_8.jsp @@ -1,55 +1,55 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -

Creating arrays

-

- OGNL follows Java syntax to create arrys. -

-

- Create an array of integers: -

-

- - new int[] {0, 1, 2} - -

-

- on the OGNL console and hit enter. Do it for me -

-

Creating lists

-

- To create a list, enclose a list of comma separated expression in a pair of braces. -

-

- Create a list of Strings: -

-

- - {'Is', 'there', 'any', 'body', 'out', 'there?'} - -

-

- on the OGNL console and hit enter. Do it for me -

-

Creating maps

-

- To create a map, use the syntax #@MAP_TYPE@{key:value}. -

-

- Create a LinkedHashMap: -

-

- - #@java.util.LinkedHashMap@{'name': 'John Galt', 'job' : 'Engineer'} - -

-

- on the OGNL console and hit enter. Do it for me -

-
-

- [More details] +<% + request.setAttribute("decorator", "none"); + response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 + response.setHeader("Pragma","no-cache"); //HTTP 1.0 + response.setDateHeader ("Expires", 0); //prevents caching at the proxy server +%> +

Creating arrays

+

+ OGNL follows Java syntax to create arrys. +

+

+ Create an array of integers: +

+

+ + new int[] {0, 1, 2} + +

+

+ on the OGNL console and hit enter. Do it for me +

+

Creating lists

+

+ To create a list, enclose a list of comma separated expression in a pair of braces. +

+

+ Create a list of Strings: +

+

+ + {'Is', 'there', 'any', 'body', 'out', 'there?'} + +

+

+ on the OGNL console and hit enter. Do it for me +

+

Creating maps

+

+ To create a map, use the syntax #@MAP_TYPE@{key:value}. +

+

+ Create a LinkedHashMap: +

+

+ + #@java.util.LinkedHashMap@{'name': 'John Galt', 'job' : 'Engineer'} + +

+

+ on the OGNL console and hit enter. Do it for me +

+
+

+ [More details]

\ No newline at end of file diff --git a/apps/showcase/src/main/webapp/interactive/ognl_9.jsp b/apps/showcase/src/main/webapp/interactive/ognl_9.jsp index 03d21d4b0..3a2cc6ec5 100644 --- a/apps/showcase/src/main/webapp/interactive/ognl_9.jsp +++ b/apps/showcase/src/main/webapp/interactive/ognl_9.jsp @@ -1,18 +1,18 @@ -<% - request.setAttribute("decorator", "none"); - response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 - response.setHeader("Pragma","no-cache"); //HTTP 1.0 - response.setDateHeader ("Expires", 0); //prevents caching at the proxy server -%> -

- More on OGNL -

-

- There are a lot of OGNL features that we have not covered on this short tutorial. -

-
-

- To learn more see the [OGNL Documentation] -

-You can keep playing with the OGNL console or +<% + request.setAttribute("decorator", "none"); + response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 + response.setHeader("Pragma","no-cache"); //HTTP 1.0 + response.setDateHeader ("Expires", 0); //prevents caching at the proxy server +%> +

+ More on OGNL +

+

+ There are a lot of OGNL features that we have not covered on this short tutorial. +

+
+

+ To learn more see the [OGNL Documentation] +

+You can keep playing with the OGNL console or Start JSP Interactive Demo \ No newline at end of file diff --git a/apps/showcase/src/main/webapp/tags/ui/datepicker/index.jsp b/apps/showcase/src/main/webapp/tags/ui/datepicker/index.jsp index fcbbb3bc8..4418f151f 100644 --- a/apps/showcase/src/main/webapp/tags/ui/datepicker/index.jsp +++ b/apps/showcase/src/main/webapp/tags/ui/datepicker/index.jsp @@ -1,25 +1,25 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib prefix="s" uri="/struts-tags" %> <%@ taglib prefix="sx" uri="/struts-dojo-tags" %> - - - - UI Tags Example - - - - - - - - - - - - - - - -
- - + + + + UI Tags Example + + + + + + + + + + + + + + + +
+ + diff --git a/apps/showcase/src/main/webapp/tags/ui/timepicker/index.jsp b/apps/showcase/src/main/webapp/tags/ui/timepicker/index.jsp index ab6cee736..fc81079cf 100644 --- a/apps/showcase/src/main/webapp/tags/ui/timepicker/index.jsp +++ b/apps/showcase/src/main/webapp/tags/ui/timepicker/index.jsp @@ -1,22 +1,22 @@ -<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib prefix="s" uri="/struts-tags" %> <%@ taglib prefix="sx" uri="/struts-dojo-tags" %> - - - - UI Tags Example - - - - - - - - - - - - -
- - + + + + UI Tags Example + + + + + + + + + + + + +
+ + diff --git a/assembly/src/main/resources/build.xml b/assembly/src/main/resources/build.xml index d93200b75..d271ab66d 100644 --- a/assembly/src/main/resources/build.xml +++ b/assembly/src/main/resources/build.xml @@ -1,53 +1,53 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/backport/ASM-LICENSE.txt b/backport/ASM-LICENSE.txt index 9496b1785..d0cd82def 100755 --- a/backport/ASM-LICENSE.txt +++ b/backport/ASM-LICENSE.txt @@ -1,28 +1,28 @@ - - ASM: a very small and fast Java bytecode manipulation framework - Copyright (c) 2000-2005 INRIA, France Telecom - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the copyright holders nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - THE POSSIBILITY OF SUCH DAMAGE. + + ASM: a very small and fast Java bytecode manipulation framework + Copyright (c) 2000-2005 INRIA, France Telecom + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holders nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. diff --git a/backport/LICENSE.txt b/backport/LICENSE.txt index d8ec3ab3c..f024848a7 100644 --- a/backport/LICENSE.txt +++ b/backport/LICENSE.txt @@ -1,26 +1,26 @@ - Copyright (c) 2005 - 2007 Taras Puchko - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the copyright holders nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - THE POSSIBILITY OF SUCH DAMAGE. + Copyright (c) 2005 - 2007 Taras Puchko + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holders nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. diff --git a/backport/RETROTRANSLATOR-LICENSE.txt b/backport/RETROTRANSLATOR-LICENSE.txt index 28c9615e4..c2a85598d 100755 --- a/backport/RETROTRANSLATOR-LICENSE.txt +++ b/backport/RETROTRANSLATOR-LICENSE.txt @@ -1,29 +1,29 @@ - Retrotranslator: a Java bytecode transformer that translates Java classes - compiled with JDK 5.0 into classes that can be run on JVM 1.4. - - Copyright (c) 2005, 2006 Taras Puchko - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the copyright holders nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - THE POSSIBILITY OF SUCH DAMAGE. + Retrotranslator: a Java bytecode transformer that translates Java classes + compiled with JDK 5.0 into classes that can be run on JVM 1.4. + + Copyright (c) 2005, 2006 Taras Puchko + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holders nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + THE POSSIBILITY OF SUCH DAMAGE. diff --git a/backport/S2-FOR-J4-README.txt b/backport/S2-FOR-J4-README.txt index 7d845dc11..5e87b680f 100755 --- a/backport/S2-FOR-J4-README.txt +++ b/backport/S2-FOR-J4-README.txt @@ -1,22 +1,22 @@ -STRUTS 2 FOR JAVA 4 - -Struts 2 is targeted for Java 5, but a "backported" version to Java 4 is being made available, -using the RetroTranslator tool. - -To use Struts 2 with Java 4 (preferably Java 1.4.2), place the enclosed Struts, XWork, -RetroTranslator, and backport-util-concurrent JARs on your classpath. For complete details on -using RetroTranslator JARs, see the RetroTranslator site. - -* http://retrotranslator.sourceforge.net/ - -NOTE: The Struts 2 and XWork 2 JARs are complete replacements for the corresponding standard -Java 5 JARs. Do not use both sets of JARs in the same environment! - -If you discover any issues using the Struts 2 for Java 4 JAR, please report them to the Struts -Dev list or JIRA ticket ww-1391. - -* http://struts.apache.org/mail.html - -* https://issues.apache.org/struts/browse/WW-1391 - -Cheers! +STRUTS 2 FOR JAVA 4 + +Struts 2 is targeted for Java 5, but a "backported" version to Java 4 is being made available, +using the RetroTranslator tool. + +To use Struts 2 with Java 4 (preferably Java 1.4.2), place the enclosed Struts, XWork, +RetroTranslator, and backport-util-concurrent JARs on your classpath. For complete details on +using RetroTranslator JARs, see the RetroTranslator site. + +* http://retrotranslator.sourceforge.net/ + +NOTE: The Struts 2 and XWork 2 JARs are complete replacements for the corresponding standard +Java 5 JARs. Do not use both sets of JARs in the same environment! + +If you discover any issues using the Struts 2 for Java 4 JAR, please report them to the Struts +Dev list or JIRA ticket ww-1391. + +* http://struts.apache.org/mail.html + +* https://issues.apache.org/struts/browse/WW-1391 + +Cheers! diff --git a/backport/STRUTS-LICENSE.txt b/backport/STRUTS-LICENSE.txt index c6055ec8f..dd5b3a58a 100755 --- a/backport/STRUTS-LICENSE.txt +++ b/backport/STRUTS-LICENSE.txt @@ -1,174 +1,174 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/backport/XWORK-LICENSE.txt b/backport/XWORK-LICENSE.txt index ccae16959..22ca3d2c5 100755 --- a/backport/XWORK-LICENSE.txt +++ b/backport/XWORK-LICENSE.txt @@ -1,50 +1,50 @@ -/* ==================================================================== - * The OpenSymphony Software License, Version 1.1 - * - * (this license is derived and fully compatible with the Apache Software - * License - see http://www.apache.org/LICENSE.txt) - * - * Copyright (c) 2001-2004 The OpenSymphony Group. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * OpenSymphony Group (http://www.opensymphony.com/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "OpenSymphony" and "The OpenSymphony Group" - * must not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact license@opensymphony.com . - * - * 5. Products derived from this software may not be called "OpenSymphony" - * or "XWork", nor may "OpenSymphony" or "XWork" appear in their - * name, without prior written permission of the OpenSymphony Group. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== +/* ==================================================================== + * The OpenSymphony Software License, Version 1.1 + * + * (this license is derived and fully compatible with the Apache Software + * License - see http://www.apache.org/LICENSE.txt) + * + * Copyright (c) 2001-2004 The OpenSymphony Group. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by the + * OpenSymphony Group (http://www.opensymphony.com/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. + * + * 4. The names "OpenSymphony" and "The OpenSymphony Group" + * must not be used to endorse or promote products derived from this + * software without prior written permission. For written + * permission, please contact license@opensymphony.com . + * + * 5. Products derived from this software may not be called "OpenSymphony" + * or "XWork", nor may "OpenSymphony" or "XWork" appear in their + * name, without prior written permission of the OpenSymphony Group. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== */ \ No newline at end of file diff --git a/backport/translate.bat b/backport/translate.bat index f6be90e9a..60e1caf42 100644 --- a/backport/translate.bat +++ b/backport/translate.bat @@ -1,3 +1,3 @@ -java -jar retrotranslator-transformer-1.2.3.jar -advanced -srcjar ../lib/struts2-core-2.1.1-SNAPSHOT.jar -destjar struts2-core-backport-2.1.1-SNAPSHOT.jar -java -jar retrotranslator-transformer-1.2.3.jar -advanced -srcjar ../lib/struts2-api-2.1.1-SNAPSHOT.jar -destjar struts2-api-backport-2.1.1-SNAPSHOT.jar -java -jar retrotranslator-transformer-1.2.3.jar -advanced -srcjar ../lib/xwork-2.1.1-SNAPSHOT.jar -destjar xwork-backport-2.1.1-SNAPSHOT.jar +java -jar retrotranslator-transformer-1.2.3.jar -advanced -srcjar ../lib/struts2-core-2.1.1-SNAPSHOT.jar -destjar struts2-core-backport-2.1.1-SNAPSHOT.jar +java -jar retrotranslator-transformer-1.2.3.jar -advanced -srcjar ../lib/struts2-api-2.1.1-SNAPSHOT.jar -destjar struts2-api-backport-2.1.1-SNAPSHOT.jar +java -jar retrotranslator-transformer-1.2.3.jar -advanced -srcjar ../lib/xwork-2.1.1-SNAPSHOT.jar -destjar xwork-backport-2.1.1-SNAPSHOT.jar diff --git a/core/src/main/java/org/apache/struts2/components/ContextBean.java b/core/src/main/java/org/apache/struts2/components/ContextBean.java index 5bc87d46d..250bac979 100644 --- a/core/src/main/java/org/apache/struts2/components/ContextBean.java +++ b/core/src/main/java/org/apache/struts2/components/ContextBean.java @@ -1,62 +1,62 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.components; - -import org.apache.struts2.views.annotations.StrutsTagAttribute; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * Base class for control and data tags - */ -public abstract class ContextBean extends Component { - protected String var; - - public ContextBean(ValueStack stack) { - super(stack); - } - - protected void putInContext(Object value) { - if (var != null && var.length() > 0) { - stack.getContext().put(var, value); - } - } - - @StrutsTagAttribute(description="Name used to reference the value pushed into the Value Stack") - public void setVar(String var) { - if (var != null) { - this.var = findString(var); - } - } - - /** - * To keep backward compatibility - * TODO remove after 2.1 - */ - @StrutsTagAttribute(description="Deprecated. Use 'var' instead") - public void setId(String id) { - setVar(id); - } - - protected String getVar() { - return this.var; - } -} +/* + * $Id$ + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.struts2.components; + +import org.apache.struts2.views.annotations.StrutsTagAttribute; + +import com.opensymphony.xwork2.util.ValueStack; + +/** + * Base class for control and data tags + */ +public abstract class ContextBean extends Component { + protected String var; + + public ContextBean(ValueStack stack) { + super(stack); + } + + protected void putInContext(Object value) { + if (var != null && var.length() > 0) { + stack.getContext().put(var, value); + } + } + + @StrutsTagAttribute(description="Name used to reference the value pushed into the Value Stack") + public void setVar(String var) { + if (var != null) { + this.var = findString(var); + } + } + + /** + * To keep backward compatibility + * TODO remove after 2.1 + */ + @StrutsTagAttribute(description="Deprecated. Use 'var' instead") + public void setId(String id) { + setVar(id); + } + + protected String getVar() { + return this.var; + } +} diff --git a/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java b/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java index f2b304e72..a9f44ddf4 100644 --- a/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java +++ b/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java @@ -1,200 +1,200 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.components; - -import java.io.IOException; -import java.io.Writer; - -import org.apache.struts2.StrutsException; -import org.apache.struts2.dispatcher.mapper.ActionMapping; -import org.apache.struts2.views.util.UrlHelper; - -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.config.entities.ActionConfig; -import com.opensymphony.xwork2.util.logging.Logger; -import com.opensymphony.xwork2.util.logging.LoggerFactory; - -/** - * Implementation of the {@link UrlRenderer} interface that creates URLs suitable in a servlet environment. - * - */ -public class ServletUrlRenderer implements UrlRenderer { - /** - * Provide a logging instance. - */ - private static final Logger LOG = LoggerFactory.getLogger(ServletUrlRenderer.class); - - - /** - * {@inheritDoc} - */ - public void renderUrl(Writer writer, URL urlComponent) { - String scheme = urlComponent.req.getScheme(); - - if (urlComponent.scheme != null) { - scheme = urlComponent.scheme; - } - - String result; - if (urlComponent.value == null && urlComponent.action != null) { - result = urlComponent.determineActionURL(urlComponent.action, urlComponent.namespace, urlComponent.method, urlComponent.req, urlComponent.res, urlComponent.parameters, scheme, urlComponent.includeContext, urlComponent.encode, urlComponent.forceAddSchemeHostAndPort, urlComponent.escapeAmp); - } else { - String _value = urlComponent.value; - - // We don't include the request parameters cause they would have been - // prioritised before this [in start(Writer) method] - if (_value != null && _value.indexOf("?") > 0) { - _value = _value.substring(0, _value.indexOf("?")); - } - result = UrlHelper.buildUrl(_value, urlComponent.req, urlComponent.res, urlComponent.parameters, scheme, urlComponent.includeContext, urlComponent.encode, urlComponent.forceAddSchemeHostAndPort, urlComponent.escapeAmp); - } - if ( urlComponent.anchor != null && urlComponent.anchor.length() > 0 ) { - result += '#' + urlComponent.anchor; - } - - String var = urlComponent.getVar(); - - if (var != null) { - urlComponent.putInContext(result); - - // add to the request and page scopes as well - urlComponent.req.setAttribute(var, result); - } else { - try { - writer.write(result); - } catch (IOException e) { - throw new StrutsException("IOError: " + e.getMessage(), e); - } - } - } - - /** - * {@inheritDoc} - */ - public void renderFormUrl(Form formComponent) { - String namespace = formComponent.determineNamespace(formComponent.namespace, formComponent.getStack(), - formComponent.request); - String action; - - if(formComponent.action != null) { - action = formComponent.findString(formComponent.action); - } else { - // no action supplied? ok, then default to the current request - // (action or general URL) - ActionInvocation ai = (ActionInvocation) formComponent.getStack().getContext().get( - ActionContext.ACTION_INVOCATION); - if (ai != null) { - action = ai.getProxy().getActionName(); - namespace = ai.getProxy().getNamespace(); - } else { - // hmm, ok, we need to just assume the current URL cut down - String uri = formComponent.request.getRequestURI(); - action = uri.substring(uri.lastIndexOf('/')); - } - } - - String actionMethod = ""; - // FIXME: our implementation is flawed - the only concept of ! should be - // in DefaultActionMapper - // handle "name!method" convention. - if (formComponent.enableDynamicMethodInvocation) { - if (action.indexOf("!") != -1) { - int endIdx = action.lastIndexOf("!"); - actionMethod = action.substring(endIdx + 1, action.length()); - action = action.substring(0, endIdx); - } - } - - final ActionConfig actionConfig = formComponent.configuration.getRuntimeConfiguration().getActionConfig( - namespace, action); - String actionName = action; - if (actionConfig != null) { - - ActionMapping mapping = new ActionMapping(action, namespace, actionMethod, formComponent.parameters); - String result = UrlHelper.buildUrl(formComponent.actionMapper.getUriFromActionMapping(mapping), - formComponent.request, formComponent.response, null); - formComponent.addParameter("action", result); - - // let's try to get the actual action class and name - // this can be used for getting the list of validators - formComponent.addParameter("actionName", actionName); - try { - Class clazz = formComponent.objectFactory.getClassInstance(actionConfig.getClassName()); - formComponent.addParameter("actionClass", clazz); - } catch (ClassNotFoundException e) { - // this is OK, we'll just move on - } - - formComponent.addParameter("namespace", namespace); - - // if the name isn't specified, use the action name - if (formComponent.name == null) { - formComponent.addParameter("name", action); - } - - // if the id isn't specified, use the action name - if (formComponent.getId() == null && action!=null ) { - formComponent.addParameter("id", formComponent.escape(action)); - } - } else if (action != null) { - // Since we can't find an action alias in the configuration, we just - // assume the action attribute supplied is the path to be used as - // the URI this form is submitting to. - - // Warn user that the specified namespace/action combo - // was not found in the configuration. - if (namespace != null) { - LOG.warn("No configuration found for the specified action: '" + action + "' in namespace: '" + namespace + "'. Form action defaulting to 'action' attribute's literal value."); - } - - String result = UrlHelper.buildUrl(action, formComponent.request, formComponent.response, null); - formComponent.addParameter("action", result); - - // namespace: cut out anything between the start and the last / - int slash = result.lastIndexOf('/'); - if (slash != -1) { - formComponent.addParameter("namespace", result.substring(0, slash)); - } else { - formComponent.addParameter("namespace", ""); - } - - // name/id: cut out anything between / and . should be the id and - // name - String id = formComponent.getId(); - if (id == null) { - slash = result.lastIndexOf('/'); - int dot = result.indexOf('.', slash); - if (dot != -1) { - id = result.substring(slash + 1, dot); - } else { - id = result.substring(slash + 1); - } - formComponent.addParameter("id", formComponent.escape(id)); - } - } - - // WW-1284 - // evaluate if client-side js is to be enabled. (if validation - // interceptor does allow validation eg. method is not filtered out) - formComponent.evaluateClientSideJsEnablement(actionName, namespace, actionMethod); - } -} +/* + * $Id$ + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.struts2.components; + +import java.io.IOException; +import java.io.Writer; + +import org.apache.struts2.StrutsException; +import org.apache.struts2.dispatcher.mapper.ActionMapping; +import org.apache.struts2.views.util.UrlHelper; + +import com.opensymphony.xwork2.ActionContext; +import com.opensymphony.xwork2.ActionInvocation; +import com.opensymphony.xwork2.config.entities.ActionConfig; +import com.opensymphony.xwork2.util.logging.Logger; +import com.opensymphony.xwork2.util.logging.LoggerFactory; + +/** + * Implementation of the {@link UrlRenderer} interface that creates URLs suitable in a servlet environment. + * + */ +public class ServletUrlRenderer implements UrlRenderer { + /** + * Provide a logging instance. + */ + private static final Logger LOG = LoggerFactory.getLogger(ServletUrlRenderer.class); + + + /** + * {@inheritDoc} + */ + public void renderUrl(Writer writer, URL urlComponent) { + String scheme = urlComponent.req.getScheme(); + + if (urlComponent.scheme != null) { + scheme = urlComponent.scheme; + } + + String result; + if (urlComponent.value == null && urlComponent.action != null) { + result = urlComponent.determineActionURL(urlComponent.action, urlComponent.namespace, urlComponent.method, urlComponent.req, urlComponent.res, urlComponent.parameters, scheme, urlComponent.includeContext, urlComponent.encode, urlComponent.forceAddSchemeHostAndPort, urlComponent.escapeAmp); + } else { + String _value = urlComponent.value; + + // We don't include the request parameters cause they would have been + // prioritised before this [in start(Writer) method] + if (_value != null && _value.indexOf("?") > 0) { + _value = _value.substring(0, _value.indexOf("?")); + } + result = UrlHelper.buildUrl(_value, urlComponent.req, urlComponent.res, urlComponent.parameters, scheme, urlComponent.includeContext, urlComponent.encode, urlComponent.forceAddSchemeHostAndPort, urlComponent.escapeAmp); + } + if ( urlComponent.anchor != null && urlComponent.anchor.length() > 0 ) { + result += '#' + urlComponent.anchor; + } + + String var = urlComponent.getVar(); + + if (var != null) { + urlComponent.putInContext(result); + + // add to the request and page scopes as well + urlComponent.req.setAttribute(var, result); + } else { + try { + writer.write(result); + } catch (IOException e) { + throw new StrutsException("IOError: " + e.getMessage(), e); + } + } + } + + /** + * {@inheritDoc} + */ + public void renderFormUrl(Form formComponent) { + String namespace = formComponent.determineNamespace(formComponent.namespace, formComponent.getStack(), + formComponent.request); + String action; + + if(formComponent.action != null) { + action = formComponent.findString(formComponent.action); + } else { + // no action supplied? ok, then default to the current request + // (action or general URL) + ActionInvocation ai = (ActionInvocation) formComponent.getStack().getContext().get( + ActionContext.ACTION_INVOCATION); + if (ai != null) { + action = ai.getProxy().getActionName(); + namespace = ai.getProxy().getNamespace(); + } else { + // hmm, ok, we need to just assume the current URL cut down + String uri = formComponent.request.getRequestURI(); + action = uri.substring(uri.lastIndexOf('/')); + } + } + + String actionMethod = ""; + // FIXME: our implementation is flawed - the only concept of ! should be + // in DefaultActionMapper + // handle "name!method" convention. + if (formComponent.enableDynamicMethodInvocation) { + if (action.indexOf("!") != -1) { + int endIdx = action.lastIndexOf("!"); + actionMethod = action.substring(endIdx + 1, action.length()); + action = action.substring(0, endIdx); + } + } + + final ActionConfig actionConfig = formComponent.configuration.getRuntimeConfiguration().getActionConfig( + namespace, action); + String actionName = action; + if (actionConfig != null) { + + ActionMapping mapping = new ActionMapping(action, namespace, actionMethod, formComponent.parameters); + String result = UrlHelper.buildUrl(formComponent.actionMapper.getUriFromActionMapping(mapping), + formComponent.request, formComponent.response, null); + formComponent.addParameter("action", result); + + // let's try to get the actual action class and name + // this can be used for getting the list of validators + formComponent.addParameter("actionName", actionName); + try { + Class clazz = formComponent.objectFactory.getClassInstance(actionConfig.getClassName()); + formComponent.addParameter("actionClass", clazz); + } catch (ClassNotFoundException e) { + // this is OK, we'll just move on + } + + formComponent.addParameter("namespace", namespace); + + // if the name isn't specified, use the action name + if (formComponent.name == null) { + formComponent.addParameter("name", action); + } + + // if the id isn't specified, use the action name + if (formComponent.getId() == null && action!=null ) { + formComponent.addParameter("id", formComponent.escape(action)); + } + } else if (action != null) { + // Since we can't find an action alias in the configuration, we just + // assume the action attribute supplied is the path to be used as + // the URI this form is submitting to. + + // Warn user that the specified namespace/action combo + // was not found in the configuration. + if (namespace != null) { + LOG.warn("No configuration found for the specified action: '" + action + "' in namespace: '" + namespace + "'. Form action defaulting to 'action' attribute's literal value."); + } + + String result = UrlHelper.buildUrl(action, formComponent.request, formComponent.response, null); + formComponent.addParameter("action", result); + + // namespace: cut out anything between the start and the last / + int slash = result.lastIndexOf('/'); + if (slash != -1) { + formComponent.addParameter("namespace", result.substring(0, slash)); + } else { + formComponent.addParameter("namespace", ""); + } + + // name/id: cut out anything between / and . should be the id and + // name + String id = formComponent.getId(); + if (id == null) { + slash = result.lastIndexOf('/'); + int dot = result.indexOf('.', slash); + if (dot != -1) { + id = result.substring(slash + 1, dot); + } else { + id = result.substring(slash + 1); + } + formComponent.addParameter("id", formComponent.escape(id)); + } + } + + // WW-1284 + // evaluate if client-side js is to be enabled. (if validation + // interceptor does allow validation eg. method is not filtered out) + formComponent.evaluateClientSideJsEnablement(actionName, namespace, actionMethod); + } +} diff --git a/core/src/main/java/org/apache/struts2/components/UrlRenderer.java b/core/src/main/java/org/apache/struts2/components/UrlRenderer.java index 3dea90b45..3ebe0cf61 100644 --- a/core/src/main/java/org/apache/struts2/components/UrlRenderer.java +++ b/core/src/main/java/org/apache/struts2/components/UrlRenderer.java @@ -1,43 +1,43 @@ -/* - * $Id: AttributeMap.java 471756 2006-11-06 15:01:43Z husted $ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.components; - -import java.io.Writer; - -/** - * Implementations of this interface are responsible for rendering/creating URLs for a specific - * environment (e.g. Servlet, Portlet). - * - */ -public interface UrlRenderer { - /** - * Render a URL. - * @param writer A writer that the implementation can use to write the result to. - * @param urlComponent The {@link URL} component that "owns" this renderer. - */ - void renderUrl(Writer writer, URL urlComponent); - - /** - * Render a Form URL. - * @param formComponent The {@link Form} component that "owns" this renderer. - */ - void renderFormUrl(Form formComponent); -} +/* + * $Id$ + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.struts2.components; + +import java.io.Writer; + +/** + * Implementations of this interface are responsible for rendering/creating URLs for a specific + * environment (e.g. Servlet, Portlet). + * + */ +public interface UrlRenderer { + /** + * Render a URL. + * @param writer A writer that the implementation can use to write the result to. + * @param urlComponent The {@link URL} component that "owns" this renderer. + */ + void renderUrl(Writer writer, URL urlComponent); + + /** + * Render a Form URL. + * @param formComponent The {@link Form} component that "owns" this renderer. + */ + void renderFormUrl(Form formComponent); +} diff --git a/core/src/main/java/org/apache/struts2/config/package.html b/core/src/main/java/org/apache/struts2/config/package.html index 0b7b68de1..010a997f8 100644 --- a/core/src/main/java/org/apache/struts2/config/package.html +++ b/core/src/main/java/org/apache/struts2/config/package.html @@ -1,6 +1,6 @@ - - - - - - - - - - - ${debugHtml} - +<#-- +/* + * $Id$ + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> + + + + + + + + + + + ${debugHtml} + \ No newline at end of file diff --git a/core/src/main/resources/org/apache/struts2/interceptor/debugging/console.ftl b/core/src/main/resources/org/apache/struts2/interceptor/debugging/console.ftl index ff3a0a1e1..67d0293da 100644 --- a/core/src/main/resources/org/apache/struts2/interceptor/debugging/console.ftl +++ b/core/src/main/resources/org/apache/struts2/interceptor/debugging/console.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/org/apache/struts2/interceptor/debugging/webconsole.css b/core/src/main/resources/org/apache/struts2/interceptor/debugging/webconsole.css index 2dc1fde8c..93d31ea86 100644 --- a/core/src/main/resources/org/apache/struts2/interceptor/debugging/webconsole.css +++ b/core/src/main/resources/org/apache/struts2/interceptor/debugging/webconsole.css @@ -1,5 +1,5 @@ /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -19,22 +19,22 @@ * under the License. */ -.wc-results { - overflow: auto; - margin: 0px; - padding: 5px; - font-family: courier; - color: white; - background-color: black; - height: 400px; -} -.wc-results pre { - display: inline; -} -.wc-command { - margin: 0px; - font-family: courier; - color: white; - background-color: black; - width: 100%; -} +.wc-results { + overflow: auto; + margin: 0px; + padding: 5px; + font-family: courier; + color: white; + background-color: black; + height: 400px; +} +.wc-results pre { + display: inline; +} +.wc-command { + margin: 0px; + font-family: courier; + color: white; + background-color: black; + width: 100%; +} diff --git a/core/src/main/resources/org/apache/struts2/interceptor/debugging/webconsole.html b/core/src/main/resources/org/apache/struts2/interceptor/debugging/webconsole.html index 400b11492..ca75fcd06 100644 --- a/core/src/main/resources/org/apache/struts2/interceptor/debugging/webconsole.html +++ b/core/src/main/resources/org/apache/struts2/interceptor/debugging/webconsole.html @@ -1,6 +1,6 @@ -<#if (parameters.dynamicAttributes?exists && parameters.dynamicAttributes?size > 0)><#t/> - <#assign aKeys = parameters.dynamicAttributes.keySet()><#t/> - <#list aKeys as aKey><#t/> - ${aKey}="${parameters.dynamicAttributes[aKey]?html}"<#rt/> - <#t/> +<#-- +/* + * $Id$ + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +<#if (parameters.dynamicAttributes?exists && parameters.dynamicAttributes?size > 0)><#t/> + <#assign aKeys = parameters.dynamicAttributes.keySet()><#t/> + <#list aKeys as aKey><#t/> + ${aKey}="${parameters.dynamicAttributes[aKey]?html}"<#rt/> + <#t/> <#t/> \ No newline at end of file diff --git a/core/src/main/resources/template/simple/empty.ftl b/core/src/main/resources/template/simple/empty.ftl index b85734e91..32bba27fa 100644 --- a/core/src/main/resources/template/simple/empty.ftl +++ b/core/src/main/resources/template/simple/empty.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/simple/fielderror.ftl b/core/src/main/resources/template/simple/fielderror.ftl index 4c14ee36f..651a9b162 100644 --- a/core/src/main/resources/template/simple/fielderror.ftl +++ b/core/src/main/resources/template/simple/fielderror.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/simple/file.ftl b/core/src/main/resources/template/simple/file.ftl index 1fc8bcf77..80934362a 100644 --- a/core/src/main/resources/template/simple/file.ftl +++ b/core/src/main/resources/template/simple/file.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/simple/form-close.ftl b/core/src/main/resources/template/simple/form-close.ftl index ad42f4c12..11140c03c 100644 --- a/core/src/main/resources/template/simple/form-close.ftl +++ b/core/src/main/resources/template/simple/form-close.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/simple/form.ftl b/core/src/main/resources/template/simple/form.ftl index 048f8449b..f7730cd27 100644 --- a/core/src/main/resources/template/simple/form.ftl +++ b/core/src/main/resources/template/simple/form.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/simple/head.ftl b/core/src/main/resources/template/simple/head.ftl index b66f14f25..03c3940ba 100644 --- a/core/src/main/resources/template/simple/head.ftl +++ b/core/src/main/resources/template/simple/head.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/simple/hidden.ftl b/core/src/main/resources/template/simple/hidden.ftl index dbaf676e0..e22eda75e 100644 --- a/core/src/main/resources/template/simple/hidden.ftl +++ b/core/src/main/resources/template/simple/hidden.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/simple/inputtransferselect.ftl b/core/src/main/resources/template/simple/inputtransferselect.ftl index 3df1264cd..505467fdf 100644 --- a/core/src/main/resources/template/simple/inputtransferselect.ftl +++ b/core/src/main/resources/template/simple/inputtransferselect.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/simple/label.ftl b/core/src/main/resources/template/simple/label.ftl index c31c44795..6d8c56edd 100644 --- a/core/src/main/resources/template/simple/label.ftl +++ b/core/src/main/resources/template/simple/label.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/simple/optgroup.ftl b/core/src/main/resources/template/simple/optgroup.ftl index c67de2d93..b0d56a549 100644 --- a/core/src/main/resources/template/simple/optgroup.ftl +++ b/core/src/main/resources/template/simple/optgroup.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/simple/optiontransferselect.ftl b/core/src/main/resources/template/simple/optiontransferselect.ftl index 56dc57442..605e69612 100644 --- a/core/src/main/resources/template/simple/optiontransferselect.ftl +++ b/core/src/main/resources/template/simple/optiontransferselect.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/simple/password.ftl b/core/src/main/resources/template/simple/password.ftl index 4633d9236..78c468747 100644 --- a/core/src/main/resources/template/simple/password.ftl +++ b/core/src/main/resources/template/simple/password.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/simple/radiomap.ftl b/core/src/main/resources/template/simple/radiomap.ftl index bcd7048e8..41f30da3d 100644 --- a/core/src/main/resources/template/simple/radiomap.ftl +++ b/core/src/main/resources/template/simple/radiomap.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/simple/reset.ftl b/core/src/main/resources/template/simple/reset.ftl index c6409e1cb..2bf9ba918 100644 --- a/core/src/main/resources/template/simple/reset.ftl +++ b/core/src/main/resources/template/simple/reset.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/simple/scripting-events.ftl b/core/src/main/resources/template/simple/scripting-events.ftl index 8469063f9..3b604b92c 100644 --- a/core/src/main/resources/template/simple/scripting-events.ftl +++ b/core/src/main/resources/template/simple/scripting-events.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/simple/select.ftl b/core/src/main/resources/template/simple/select.ftl index 3d8e674db..b98214289 100644 --- a/core/src/main/resources/template/simple/select.ftl +++ b/core/src/main/resources/template/simple/select.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/simple/submit.ftl b/core/src/main/resources/template/simple/submit.ftl index c95ed38fb..e307faf3c 100644 --- a/core/src/main/resources/template/simple/submit.ftl +++ b/core/src/main/resources/template/simple/submit.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/simple/table.ftl b/core/src/main/resources/template/simple/table.ftl index 4a0c34047..108006389 100644 --- a/core/src/main/resources/template/simple/table.ftl +++ b/core/src/main/resources/template/simple/table.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/simple/text.ftl b/core/src/main/resources/template/simple/text.ftl index 9f557ea84..0f474b3b9 100644 --- a/core/src/main/resources/template/simple/text.ftl +++ b/core/src/main/resources/template/simple/text.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/simple/textarea.ftl b/core/src/main/resources/template/simple/textarea.ftl index 4adfd63a2..d7e56723f 100644 --- a/core/src/main/resources/template/simple/textarea.ftl +++ b/core/src/main/resources/template/simple/textarea.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/simple/token.ftl b/core/src/main/resources/template/simple/token.ftl index 835dcb6a6..cabfa9c77 100644 --- a/core/src/main/resources/template/simple/token.ftl +++ b/core/src/main/resources/template/simple/token.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/simple/updownselect.ftl b/core/src/main/resources/template/simple/updownselect.ftl index e9010b066..f1e788800 100644 --- a/core/src/main/resources/template/simple/updownselect.ftl +++ b/core/src/main/resources/template/simple/updownselect.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/checkbox.ftl b/core/src/main/resources/template/xhtml/checkbox.ftl index 6e223b0ba..16891ae99 100644 --- a/core/src/main/resources/template/xhtml/checkbox.ftl +++ b/core/src/main/resources/template/xhtml/checkbox.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/checkboxlist.ftl b/core/src/main/resources/template/xhtml/checkboxlist.ftl index 17b0972d0..8c056b3af 100644 --- a/core/src/main/resources/template/xhtml/checkboxlist.ftl +++ b/core/src/main/resources/template/xhtml/checkboxlist.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/combobox.ftl b/core/src/main/resources/template/xhtml/combobox.ftl index ff527f163..fa8ccbc6d 100644 --- a/core/src/main/resources/template/xhtml/combobox.ftl +++ b/core/src/main/resources/template/xhtml/combobox.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/control-close.ftl b/core/src/main/resources/template/xhtml/control-close.ftl index 72262d9c1..a89de7e34 100644 --- a/core/src/main/resources/template/xhtml/control-close.ftl +++ b/core/src/main/resources/template/xhtml/control-close.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/control.ftl b/core/src/main/resources/template/xhtml/control.ftl index de7c0129c..8d99e2ee2 100644 --- a/core/src/main/resources/template/xhtml/control.ftl +++ b/core/src/main/resources/template/xhtml/control.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/controlfooter.ftl b/core/src/main/resources/template/xhtml/controlfooter.ftl index c0f207bc6..5072ddb74 100644 --- a/core/src/main/resources/template/xhtml/controlfooter.ftl +++ b/core/src/main/resources/template/xhtml/controlfooter.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/controlheader-core.ftl b/core/src/main/resources/template/xhtml/controlheader-core.ftl index d121897d7..0be90efbd 100644 --- a/core/src/main/resources/template/xhtml/controlheader-core.ftl +++ b/core/src/main/resources/template/xhtml/controlheader-core.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/controlheader.ftl b/core/src/main/resources/template/xhtml/controlheader.ftl index 3ff7c9455..4c4075ec7 100644 --- a/core/src/main/resources/template/xhtml/controlheader.ftl +++ b/core/src/main/resources/template/xhtml/controlheader.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/debug.ftl b/core/src/main/resources/template/xhtml/debug.ftl index 20e284b25..63dcefcd7 100644 --- a/core/src/main/resources/template/xhtml/debug.ftl +++ b/core/src/main/resources/template/xhtml/debug.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/doubleselect.ftl b/core/src/main/resources/template/xhtml/doubleselect.ftl index e8b427239..b04fd9aef 100644 --- a/core/src/main/resources/template/xhtml/doubleselect.ftl +++ b/core/src/main/resources/template/xhtml/doubleselect.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/file.ftl b/core/src/main/resources/template/xhtml/file.ftl index 767758388..6d26e6411 100644 --- a/core/src/main/resources/template/xhtml/file.ftl +++ b/core/src/main/resources/template/xhtml/file.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/form-close-validate.ftl b/core/src/main/resources/template/xhtml/form-close-validate.ftl index 4ab23ce50..d7a58e19a 100644 --- a/core/src/main/resources/template/xhtml/form-close-validate.ftl +++ b/core/src/main/resources/template/xhtml/form-close-validate.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/form-close.ftl b/core/src/main/resources/template/xhtml/form-close.ftl index dbc774708..b000f91ed 100644 --- a/core/src/main/resources/template/xhtml/form-close.ftl +++ b/core/src/main/resources/template/xhtml/form-close.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/form-validate.ftl b/core/src/main/resources/template/xhtml/form-validate.ftl index 1d9f04d63..2782e26dc 100644 --- a/core/src/main/resources/template/xhtml/form-validate.ftl +++ b/core/src/main/resources/template/xhtml/form-validate.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/form.ftl b/core/src/main/resources/template/xhtml/form.ftl index 9f099bdfb..a271949b6 100644 --- a/core/src/main/resources/template/xhtml/form.ftl +++ b/core/src/main/resources/template/xhtml/form.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/head.ftl b/core/src/main/resources/template/xhtml/head.ftl index 6014e8c66..e8a8fb82d 100644 --- a/core/src/main/resources/template/xhtml/head.ftl +++ b/core/src/main/resources/template/xhtml/head.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/inputtransferselect.ftl b/core/src/main/resources/template/xhtml/inputtransferselect.ftl index e626ac797..c11c36105 100644 --- a/core/src/main/resources/template/xhtml/inputtransferselect.ftl +++ b/core/src/main/resources/template/xhtml/inputtransferselect.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/label.ftl b/core/src/main/resources/template/xhtml/label.ftl index 1d18371d4..5abae706d 100644 --- a/core/src/main/resources/template/xhtml/label.ftl +++ b/core/src/main/resources/template/xhtml/label.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/optiontransferselect.ftl b/core/src/main/resources/template/xhtml/optiontransferselect.ftl index b46553929..21e60e374 100644 --- a/core/src/main/resources/template/xhtml/optiontransferselect.ftl +++ b/core/src/main/resources/template/xhtml/optiontransferselect.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/password.ftl b/core/src/main/resources/template/xhtml/password.ftl index 95e4fdb6f..5babfbccb 100644 --- a/core/src/main/resources/template/xhtml/password.ftl +++ b/core/src/main/resources/template/xhtml/password.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/radiomap.ftl b/core/src/main/resources/template/xhtml/radiomap.ftl index 60eebd29e..76f538a86 100644 --- a/core/src/main/resources/template/xhtml/radiomap.ftl +++ b/core/src/main/resources/template/xhtml/radiomap.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/reset.ftl b/core/src/main/resources/template/xhtml/reset.ftl index 43870ad44..2a93bb71f 100644 --- a/core/src/main/resources/template/xhtml/reset.ftl +++ b/core/src/main/resources/template/xhtml/reset.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/select.ftl b/core/src/main/resources/template/xhtml/select.ftl index 66e9b1708..ceb45dac4 100644 --- a/core/src/main/resources/template/xhtml/select.ftl +++ b/core/src/main/resources/template/xhtml/select.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/styles.css b/core/src/main/resources/template/xhtml/styles.css index c33e2e7d4..7497f4529 100644 --- a/core/src/main/resources/template/xhtml/styles.css +++ b/core/src/main/resources/template/xhtml/styles.css @@ -1,5 +1,5 @@ /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/submit.ftl b/core/src/main/resources/template/xhtml/submit.ftl index 5f7b0343d..4f60fc7c0 100644 --- a/core/src/main/resources/template/xhtml/submit.ftl +++ b/core/src/main/resources/template/xhtml/submit.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/text.ftl b/core/src/main/resources/template/xhtml/text.ftl index 96b6d84ea..8bc31c946 100644 --- a/core/src/main/resources/template/xhtml/text.ftl +++ b/core/src/main/resources/template/xhtml/text.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/textarea.ftl b/core/src/main/resources/template/xhtml/textarea.ftl index d4b41edba..37f7c776a 100644 --- a/core/src/main/resources/template/xhtml/textarea.ftl +++ b/core/src/main/resources/template/xhtml/textarea.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/theme.properties b/core/src/main/resources/template/xhtml/theme.properties index 69efe7762..66c708ca9 100644 --- a/core/src/main/resources/template/xhtml/theme.properties +++ b/core/src/main/resources/template/xhtml/theme.properties @@ -1,4 +1,4 @@ -# $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ +# $Id$ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/tooltip.ftl b/core/src/main/resources/template/xhtml/tooltip.ftl index 3a6f88abe..5354301a0 100644 --- a/core/src/main/resources/template/xhtml/tooltip.ftl +++ b/core/src/main/resources/template/xhtml/tooltip.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/updownselect.ftl b/core/src/main/resources/template/xhtml/updownselect.ftl index 0a460e176..a5e7a4470 100644 --- a/core/src/main/resources/template/xhtml/updownselect.ftl +++ b/core/src/main/resources/template/xhtml/updownselect.ftl @@ -1,6 +1,6 @@ <#-- /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/main/resources/template/xhtml/validation.js b/core/src/main/resources/template/xhtml/validation.js index a5d190a22..ac5068438 100644 --- a/core/src/main/resources/template/xhtml/validation.js +++ b/core/src/main/resources/template/xhtml/validation.js @@ -1,5 +1,5 @@ /* - * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/site/confluence/ww-template-autoexport.html b/core/src/site/confluence/ww-template-autoexport.html index 18cdb5d48..2d4dc50f8 100644 --- a/core/src/site/confluence/ww-template-autoexport.html +++ b/core/src/site/confluence/ww-template-autoexport.html @@ -1,155 +1,155 @@ - - - - - - - - $page.title - - - - - - - -
-  $autoexport.breadcrumbs($page) - -
- - - - - - -
-
- -
- -
- #editReport() -
- -
-
- $body -
- - #if ($page.hasChildren()) -
- Children - - Show Children - -
- - #end - -
-
- - - + + + + + + + + $page.title + + + + + + + +
+  $autoexport.breadcrumbs($page) + +
+ + + + + + +
+
+ +
+ +
+ #editReport() +
+ +
+
+ $body +
+ + #if ($page.hasChildren()) +
+ Children + + Show Children + +
+ + #end + +
+
+ + + diff --git a/core/src/site/resources/tags/a.html b/core/src/site/resources/tags/a.html index 618bb3aa6..f7e2d2642 100644 --- a/core/src/site/resources/tags/a.html +++ b/core/src/site/resources/tags/a.html @@ -1,354 +1,354 @@ - - - - a - - - -

Tag Name: a

-

Description

-

- - Render a HTML href element that when clicked can optionally call a URL via remote XMLHttpRequest and updates its targets - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
hreffalsefalseStringThe URL.
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
openTemplatefalsefalseStringSet template to use for opening the rendered html.
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
- - - - + + + + a + + + +

Tag Name: a

+

Description

+

+ + Render a HTML href element that when clicked can optionally call a URL via remote XMLHttpRequest and updates its targets + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
hreffalsefalseStringThe URL.
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
openTemplatefalsefalseStringSet template to use for opening the rendered html.
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/action.html b/core/src/site/resources/tags/action.html index 459868cb8..169008f3d 100644 --- a/core/src/site/resources/tags/action.html +++ b/core/src/site/resources/tags/action.html @@ -1,90 +1,90 @@ - - - - action - - - -

Tag Name: action

-

Description

-

- - Execute an action from within a view - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

executeResultfalsefalsefalseBooleanWhether the result of this action (probably a view) should be executed/rendered
flushfalsetruefalseBooleanWhether the writer should be flush upon end of action component tag, default to true
idfalsefalseStringDeprecated. Use 'var' instead
ignoreContextParamsfalsefalsefalseBooleanWhether the request parameters are to be included when the action is invoked
nametruefalseStringName of the action to be executed (without the extension suffix eg. .action)
namespacefalsenamespace from where tag is usedfalseStringNamespace for action to call
varfalsefalseStringName used to reference the value pushed into the Value Stack
- - - - + + + + action + + + +

Tag Name: action

+

Description

+

+ + Execute an action from within a view + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

executeResultfalsefalsefalseBooleanWhether the result of this action (probably a view) should be executed/rendered
flushfalsetruefalseBooleanWhether the writer should be flush upon end of action component tag, default to true
idfalsefalseStringDeprecated. Use 'var' instead
ignoreContextParamsfalsefalsefalseBooleanWhether the request parameters are to be included when the action is invoked
nametruefalseStringName of the action to be executed (without the extension suffix eg. .action)
namespacefalsenamespace from where tag is usedfalseStringNamespace for action to call
varfalsefalseStringName used to reference the value pushed into the Value Stack
+ + + + diff --git a/core/src/site/resources/tags/actionerror.html b/core/src/site/resources/tags/actionerror.html index 2589d48a4..2c1b5886c 100644 --- a/core/src/site/resources/tags/actionerror.html +++ b/core/src/site/resources/tags/actionerror.html @@ -1,338 +1,338 @@ - - - - actionerror - - - -

Tag Name: actionerror

-

Description

-

- - Render action errors if they exists - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
- - - - + + + + actionerror + + + +

Tag Name: actionerror

+

Description

+

+ + Render action errors if they exists + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/actionmessage.html b/core/src/site/resources/tags/actionmessage.html index 106287d36..ec5225ca2 100644 --- a/core/src/site/resources/tags/actionmessage.html +++ b/core/src/site/resources/tags/actionmessage.html @@ -1,338 +1,338 @@ - - - - actionmessage - - - -

Tag Name: actionmessage

-

Description

-

- - Render action messages if they exists - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
- - - - + + + + actionmessage + + + +

Tag Name: actionmessage

+

Description

+

+ + Render action messages if they exists + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/ajax/a.html b/core/src/site/resources/tags/ajax/a.html index 54d7171cb..15b8604c6 100644 --- a/core/src/site/resources/tags/ajax/a.html +++ b/core/src/site/resources/tags/ajax/a.html @@ -1,522 +1,522 @@ - - - - a - - - -

Tag Name: a

-

Description

-

- - Renders an HTML anchor element that when clicked calls a URL via remote XMLHttpRequest and updates its targets content - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
afterNotifyTopicsfalsefalseStringComma delimmited list of topics that will published after the request(if the request succeeds)
ajaxAfterValidationfalsefalsefalseBooleanMake an asynchronous request if validation succeeds. Only valid if 'validate' is 'true'
beforeNotifyTopicsfalsefalseStringComma delimmited list of topics that will published before the request
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style to use for element
disabledfalsefalseStringSet the html disabled attribute on rendered html element
errorNotifyTopicsfalsefalseStringComma delimmited list of topics that will published after the request(if the request fails)
errorTextfalsefalseStringThe text to display to the user if the is an error fetching the content
executeScriptsfalsefalsefalseBooleanJavascript code in the fetched content will be executed
formFilterfalsefalseStringFunction name used to filter the fields of the form.
formIdfalsefalseStringForm id whose fields will be serialized and passed as parameters
handlerfalsefalseStringJavascript function name that will make the request
highlightColorfalsenonefalseStringColor used to perform a highlight effect on the elements specified in the 'targets' attribute
highlightDurationfalse2000falseIntegerDuration of highlight effect in milliseconds. Only valid if 'highlightColor' attribute is set
hreffalsefalseStringThe URL to call to obtain the content. Note: If used with ajax context, the value must be set as an url tag value.
idfalsefalseStringThe id to use for the element
indicatorfalsefalseStringId of element that will be shown while making request
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
listenTopicsfalsefalseStringTopic that will trigger the remote call
loadingTextfalseLoading...falseStringText to be shown while content is being fetched
namefalsefalseStringThe name to set for element
notifyTopicsfalsefalseStringComma delimmited list of topics that will published before and after the request, and on errors
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
openTemplatefalsefalseStringSet template to use for opening the rendered html.
parseContentfalsetruefalseBooleanParse returned HTML for Dojo widgets
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
separateScriptsfalsetruefalseStringRun scripts in a separate scope, unique for each tag
showErrorTransportTextfalsetruefalseBooleanSet whether errors will be shown or not
showLoadingTextfalsefalsefalseBooleanShow loading text on targets
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
targetsfalsefalseStringComma delimited list of ids of the elements whose content will be updated
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
transportfalseXMLHTTPTransportfalseStringTransport used by Dojo to make the request
validatefalsefalsefalseBooleanPerform Ajax calidation. 'ajaxValidation' interceptor must be applied to action
valuefalsefalseStringPreset the value of input element.
- - - - + + + + a + + + +

Tag Name: a

+

Description

+

+ + Renders an HTML anchor element that when clicked calls a URL via remote XMLHttpRequest and updates its targets content + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
afterNotifyTopicsfalsefalseStringComma delimmited list of topics that will published after the request(if the request succeeds)
ajaxAfterValidationfalsefalsefalseBooleanMake an asynchronous request if validation succeeds. Only valid if 'validate' is 'true'
beforeNotifyTopicsfalsefalseStringComma delimmited list of topics that will published before the request
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style to use for element
disabledfalsefalseStringSet the html disabled attribute on rendered html element
errorNotifyTopicsfalsefalseStringComma delimmited list of topics that will published after the request(if the request fails)
errorTextfalsefalseStringThe text to display to the user if the is an error fetching the content
executeScriptsfalsefalsefalseBooleanJavascript code in the fetched content will be executed
formFilterfalsefalseStringFunction name used to filter the fields of the form.
formIdfalsefalseStringForm id whose fields will be serialized and passed as parameters
handlerfalsefalseStringJavascript function name that will make the request
highlightColorfalsenonefalseStringColor used to perform a highlight effect on the elements specified in the 'targets' attribute
highlightDurationfalse2000falseIntegerDuration of highlight effect in milliseconds. Only valid if 'highlightColor' attribute is set
hreffalsefalseStringThe URL to call to obtain the content. Note: If used with ajax context, the value must be set as an url tag value.
idfalsefalseStringThe id to use for the element
indicatorfalsefalseStringId of element that will be shown while making request
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
listenTopicsfalsefalseStringTopic that will trigger the remote call
loadingTextfalseLoading...falseStringText to be shown while content is being fetched
namefalsefalseStringThe name to set for element
notifyTopicsfalsefalseStringComma delimmited list of topics that will published before and after the request, and on errors
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
openTemplatefalsefalseStringSet template to use for opening the rendered html.
parseContentfalsetruefalseBooleanParse returned HTML for Dojo widgets
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
separateScriptsfalsetruefalseStringRun scripts in a separate scope, unique for each tag
showErrorTransportTextfalsetruefalseBooleanSet whether errors will be shown or not
showLoadingTextfalsefalsefalseBooleanShow loading text on targets
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
targetsfalsefalseStringComma delimited list of ids of the elements whose content will be updated
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
transportfalseXMLHTTPTransportfalseStringTransport used by Dojo to make the request
validatefalsefalsefalseBooleanPerform Ajax calidation. 'ajaxValidation' interceptor must be applied to action
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/ajax/autocompleter.html b/core/src/site/resources/tags/ajax/autocompleter.html index 487dc61a4..3ee298977 100644 --- a/core/src/site/resources/tags/ajax/autocompleter.html +++ b/core/src/site/resources/tags/ajax/autocompleter.html @@ -1,626 +1,626 @@ - - - - autocompleter - - - -

Tag Name: autocompleter

-

Description

-

- - Renders a combobox with autocomplete and AJAX capabilities - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
afterNotifyTopicsfalsefalseStringComma delimmited list of topics that will published after the request(if the request succeeds)
autoCompletefalsefalsefalseBooleanWhether autocompleter should make suggestion on the textbox
beforeNotifyTopicsfalsefalseStringComma delimmited list of topics that will published before the request
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style to use for element
dataFieldNamefalseValue specified in 'name'falseStringName of the field in the returned JSON object that contains the data array
delayfalse100falseIntegerDelay before making the search
disabledfalsefalsefalseBooleanEnable or disable autocompleter
dropdownHeightfalse120falseIntegerDropdown's height in pixels
dropdownWidthfalsesame as textboxfalseIntegerDropdown's width
emptyOptionfalsefalseStringDecide if an empty option is to be inserted. Default false.
errorNotifyTopicsfalsefalseStringComma delimmited list of topics that will published after the request(if the request fails)
forceValidOptionfalsefalsefalseBooleanForce selection to be one of the options
formFilterfalsefalseStringFunction name used to filter the fields of the form
formIdfalsefalseStringForm id whose fields will be serialized and passed as parameters
headerKeyfalsefalseStringSet the header key for the header option.
headerValuefalsefalseStringSet the header value for the header option.
hreffalsefalseStringThe URL used to load the options
iconPathfalsefalseStringPath to icon used for the dropdown
idfalsefalseStringThe id to use for the element
indicatorfalsefalseStringId of element that will be shown while request is made
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
keyNamefalsefalseStringName of the field to which the selected key will be assigned
keyValuefalsefalseStringInitial key value
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
listfalsefalseStringIteratable source to populate from.
listKeyfalsefalseStringSet the key used to retrive the option key.
listValuefalsefalseStringSet the value used to retrive the option value.
listenTopicsfalsefalseStringTopic that will trigger a reload
loadMinimumCountfalse3falseIntegerMinimum number of characters that will force the content to be loaded
loadOnTextChangefalsetruefalseBooleanOptions will be reloaded everytime a character is typed on the textbox
maxLengthfalsefalseIntegerDeprecated. Use maxlength instead.
maxlengthfalsefalseIntegerHTML maxlength attribute
namefalsefalseStringThe name to set for element
notifyTopicsfalsefalseStringTopics that will be published when content is reloaded
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
preloadfalsetruefalseBooleanLoad options when page is loaded
readonlyfalsefalsefalseBooleanWhether the input is readonly
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
resultsLimitfalse30falseStringLimit how many results are shown as autocompletion options, set to -1 for unlimited results
searchTypefalsestringstartfalseStringhow the search must be performed, options are: 'startstring', 'startword' and 'substring'
showDownArrowfalsetruefalseBooleanShow or hide the down arrow button
sizefalsefalseIntegerHTML size attribute
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateCssPathfalsefalseStringTemplate css path
templateDirfalsefalseStringThe template directory.
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
transportfalseXMLHTTPTransportfalseStringTransport used by Dojo to make the request
valuefalsefalseStringPreset the value of input element
valueNotifyTopicsfalsefalseStringComma delimmited list of topics that will published when a value is selected
- - - - + + + + autocompleter + + + +

Tag Name: autocompleter

+

Description

+

+ + Renders a combobox with autocomplete and AJAX capabilities + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
afterNotifyTopicsfalsefalseStringComma delimmited list of topics that will published after the request(if the request succeeds)
autoCompletefalsefalsefalseBooleanWhether autocompleter should make suggestion on the textbox
beforeNotifyTopicsfalsefalseStringComma delimmited list of topics that will published before the request
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style to use for element
dataFieldNamefalseValue specified in 'name'falseStringName of the field in the returned JSON object that contains the data array
delayfalse100falseIntegerDelay before making the search
disabledfalsefalsefalseBooleanEnable or disable autocompleter
dropdownHeightfalse120falseIntegerDropdown's height in pixels
dropdownWidthfalsesame as textboxfalseIntegerDropdown's width
emptyOptionfalsefalseStringDecide if an empty option is to be inserted. Default false.
errorNotifyTopicsfalsefalseStringComma delimmited list of topics that will published after the request(if the request fails)
forceValidOptionfalsefalsefalseBooleanForce selection to be one of the options
formFilterfalsefalseStringFunction name used to filter the fields of the form
formIdfalsefalseStringForm id whose fields will be serialized and passed as parameters
headerKeyfalsefalseStringSet the header key for the header option.
headerValuefalsefalseStringSet the header value for the header option.
hreffalsefalseStringThe URL used to load the options
iconPathfalsefalseStringPath to icon used for the dropdown
idfalsefalseStringThe id to use for the element
indicatorfalsefalseStringId of element that will be shown while request is made
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
keyNamefalsefalseStringName of the field to which the selected key will be assigned
keyValuefalsefalseStringInitial key value
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
listfalsefalseStringIteratable source to populate from.
listKeyfalsefalseStringSet the key used to retrive the option key.
listValuefalsefalseStringSet the value used to retrive the option value.
listenTopicsfalsefalseStringTopic that will trigger a reload
loadMinimumCountfalse3falseIntegerMinimum number of characters that will force the content to be loaded
loadOnTextChangefalsetruefalseBooleanOptions will be reloaded everytime a character is typed on the textbox
maxLengthfalsefalseIntegerDeprecated. Use maxlength instead.
maxlengthfalsefalseIntegerHTML maxlength attribute
namefalsefalseStringThe name to set for element
notifyTopicsfalsefalseStringTopics that will be published when content is reloaded
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
preloadfalsetruefalseBooleanLoad options when page is loaded
readonlyfalsefalsefalseBooleanWhether the input is readonly
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
resultsLimitfalse30falseStringLimit how many results are shown as autocompletion options, set to -1 for unlimited results
searchTypefalsestringstartfalseStringhow the search must be performed, options are: 'startstring', 'startword' and 'substring'
showDownArrowfalsetruefalseBooleanShow or hide the down arrow button
sizefalsefalseIntegerHTML size attribute
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateCssPathfalsefalseStringTemplate css path
templateDirfalsefalseStringThe template directory.
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
transportfalseXMLHTTPTransportfalseStringTransport used by Dojo to make the request
valuefalsefalseStringPreset the value of input element
valueNotifyTopicsfalsefalseStringComma delimmited list of topics that will published when a value is selected
+ + + + diff --git a/core/src/site/resources/tags/ajax/bind.html b/core/src/site/resources/tags/ajax/bind.html index 9ce6b90b5..4ffa2a59d 100644 --- a/core/src/site/resources/tags/ajax/bind.html +++ b/core/src/site/resources/tags/ajax/bind.html @@ -1,234 +1,234 @@ - - - - bind - - - -

Tag Name: bind

-

Description

-

- - Attach event listeners to elements to make AJAX calls - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

afterNotifyTopicsfalsefalseStringComma delimmited list of topics that will published after the request(if the request succeeds)
ajaxAfterValidationfalsefalsefalseBooleanMake an asynchronous request if validation succeeds. Only valid is 'validate' is 'true'
beforeNotifyTopicsfalsefalseStringComma delimmited list of topics that will published before the request
errorNotifyTopicsfalsefalseStringComma delimmited list of topics that will published after the request(if the request fails)
errorTextfalsefalseStringThe text to display to the user if the is an error fetching the content
eventsfalsefalseStringComma delimited list of event names to attach to
executeScriptsfalsefalsefalseBooleanJavascript code in the fetched content will be executed
formFilterfalsefalseStringFunction name used to filter the fields of the form.
formIdfalsefalseStringForm id whose fields will be serialized and passed as parameters
handlerfalsefalseStringJavascript function name that will make the request
highlightColorfalsenonefalseStringColor used to perform a highlight effect on the elements specified in the 'targets' attribute
highlightDurationfalse2000falseIntegerDuration of highlight effect in milliseconds. Only valid if 'highlightColor' attribute is set
hreffalsefalseStringThe URL to call to obtain the content. Note: If used with ajax context, the value must be set as an url tag value.
idfalsefalseStringThe id to use for the element
indicatorfalsefalseStringId of element that will be shown while making request
listenTopicsfalsefalseStringTopic that will trigger the remote call
loadingTextfalseLoading...falseStringText to be shown while content is being fetched
notifyTopicsfalsefalseStringComma delimmited list of topics that will published before and after the request, and on errors
separateScriptsfalsetruefalseStringRun scripts in a separate scope, unique for each tag
showErrorTransportTextfalsetruefalseBooleanSet whether errors will be shown or not
showLoadingTextfalsefalsefalseBooleanShow loading text on targets
sourcesfalsefalseStringComma delimited list of ids of the elements to attach to
targetsfalsefalseStringComma delimited list of ids of the elements whose content will be updated
transportfalseXMLHTTPTransportfalseStringTransport used by Dojo to make the request
validatefalsefalsefalseBooleanPerform Ajax calidation. 'ajaxValidation' interceptor must be applied to action
- - - - + + + + bind + + + +

Tag Name: bind

+

Description

+

+ + Attach event listeners to elements to make AJAX calls + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

afterNotifyTopicsfalsefalseStringComma delimmited list of topics that will published after the request(if the request succeeds)
ajaxAfterValidationfalsefalsefalseBooleanMake an asynchronous request if validation succeeds. Only valid is 'validate' is 'true'
beforeNotifyTopicsfalsefalseStringComma delimmited list of topics that will published before the request
errorNotifyTopicsfalsefalseStringComma delimmited list of topics that will published after the request(if the request fails)
errorTextfalsefalseStringThe text to display to the user if the is an error fetching the content
eventsfalsefalseStringComma delimited list of event names to attach to
executeScriptsfalsefalsefalseBooleanJavascript code in the fetched content will be executed
formFilterfalsefalseStringFunction name used to filter the fields of the form.
formIdfalsefalseStringForm id whose fields will be serialized and passed as parameters
handlerfalsefalseStringJavascript function name that will make the request
highlightColorfalsenonefalseStringColor used to perform a highlight effect on the elements specified in the 'targets' attribute
highlightDurationfalse2000falseIntegerDuration of highlight effect in milliseconds. Only valid if 'highlightColor' attribute is set
hreffalsefalseStringThe URL to call to obtain the content. Note: If used with ajax context, the value must be set as an url tag value.
idfalsefalseStringThe id to use for the element
indicatorfalsefalseStringId of element that will be shown while making request
listenTopicsfalsefalseStringTopic that will trigger the remote call
loadingTextfalseLoading...falseStringText to be shown while content is being fetched
notifyTopicsfalsefalseStringComma delimmited list of topics that will published before and after the request, and on errors
separateScriptsfalsetruefalseStringRun scripts in a separate scope, unique for each tag
showErrorTransportTextfalsetruefalseBooleanSet whether errors will be shown or not
showLoadingTextfalsefalsefalseBooleanShow loading text on targets
sourcesfalsefalseStringComma delimited list of ids of the elements to attach to
targetsfalsefalseStringComma delimited list of ids of the elements whose content will be updated
transportfalseXMLHTTPTransportfalseStringTransport used by Dojo to make the request
validatefalsefalsefalseBooleanPerform Ajax calidation. 'ajaxValidation' interceptor must be applied to action
+ + + + diff --git a/core/src/site/resources/tags/ajax/datetimepicker.html b/core/src/site/resources/tags/ajax/datetimepicker.html index 5475b5ab5..ad396f8fd 100644 --- a/core/src/site/resources/tags/ajax/datetimepicker.html +++ b/core/src/site/resources/tags/ajax/datetimepicker.html @@ -1,458 +1,458 @@ - - - - datetimepicker - - - -

Tag Name: datetimepicker

-

Description

-

- - Render datetimepicker - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
adjustWeeksfalsefalsefalseBooleanIf true, weekly size of calendar changes to acomodate the month if false, 42 day format is used
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
dayWidthfalsenarrowfalseStringHow to render the names of the days in the header(narrow, abbr or wide)
disabledfalsefalseStringSet the html disabled attribute on rendered html element
displayFormatfalsefalseStringA pattern used for the visual display of the formatted date, e.g. dd/MM/yyyy
displayWeeksfalse6falseIntegerTotal weeks to display
endDatefalse2941-10-12falseDateLast available date in the calendar set
formatLengthfalseshortfalseStringType of formatting used for visual display. Possible values are long, short, medium or full
iconPathfalsefalseStringPath to icon used for the dropdown
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
languagefalsebrower's specified preferred languagefalseStringLanguage to display this widget in
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
startDatefalse1492-10-12falseDateFirst available date in the calendar set
staticDisplayfalsefalsefalseBooleanDisable all incremental controls, must pick a date in the current display
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateCssPathfalsefalseStringTemplate css path
templateDirfalsefalseStringThe template directory.
titlefalsefalseStringSet the html title attribute on rendered html element
toggleDurationfalse100falseIntegerDuration of toggle in milliseconds
toggleTypefalseplainfalseStringoggle type of the dropdown. Possible values are plain,wipe,explode,fade
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
typefalsedatefalseStringDefines the type of the picker on the dropdown. Possible values are 'date' for a DateTimePicker, and 'time' for a timePicker
valuefalsefalseStringPreset the value of input element
valueNotifyTopicsfalsefalseStringComma delimmited list of topics that will published when a value is selected
weekStartsOnfalse0falseIntegerAdjusts the first day of the week 0==Sunday..6==Saturday
- - - - + + + + datetimepicker + + + +

Tag Name: datetimepicker

+

Description

+

+ + Render datetimepicker + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
adjustWeeksfalsefalsefalseBooleanIf true, weekly size of calendar changes to acomodate the month if false, 42 day format is used
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
dayWidthfalsenarrowfalseStringHow to render the names of the days in the header(narrow, abbr or wide)
disabledfalsefalseStringSet the html disabled attribute on rendered html element
displayFormatfalsefalseStringA pattern used for the visual display of the formatted date, e.g. dd/MM/yyyy
displayWeeksfalse6falseIntegerTotal weeks to display
endDatefalse2941-10-12falseDateLast available date in the calendar set
formatLengthfalseshortfalseStringType of formatting used for visual display. Possible values are long, short, medium or full
iconPathfalsefalseStringPath to icon used for the dropdown
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
languagefalsebrower's specified preferred languagefalseStringLanguage to display this widget in
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
startDatefalse1492-10-12falseDateFirst available date in the calendar set
staticDisplayfalsefalsefalseBooleanDisable all incremental controls, must pick a date in the current display
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateCssPathfalsefalseStringTemplate css path
templateDirfalsefalseStringThe template directory.
titlefalsefalseStringSet the html title attribute on rendered html element
toggleDurationfalse100falseIntegerDuration of toggle in milliseconds
toggleTypefalseplainfalseStringoggle type of the dropdown. Possible values are plain,wipe,explode,fade
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
typefalsedatefalseStringDefines the type of the picker on the dropdown. Possible values are 'date' for a DateTimePicker, and 'time' for a timePicker
valuefalsefalseStringPreset the value of input element
valueNotifyTopicsfalsefalseStringComma delimmited list of topics that will published when a value is selected
weekStartsOnfalse0falseIntegerAdjusts the first day of the week 0==Sunday..6==Saturday
+ + + + diff --git a/core/src/site/resources/tags/ajax/div.html b/core/src/site/resources/tags/ajax/div.html index 5c33256bf..b88b79a53 100644 --- a/core/src/site/resources/tags/ajax/div.html +++ b/core/src/site/resources/tags/ajax/div.html @@ -1,570 +1,570 @@ - - - - div - - - -

Tag Name: div

-

Description

-

- - Render HTML div providing content from remote call via AJAX - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
afterNotifyTopicsfalsefalseStringComma delimmited list of topics that will published after the request(if the request succeeds)
autoStartfalsetruefalseBooleanStart timer automatically
beforeNotifyTopicsfalsefalseStringComma delimmited list of topics that will published before the request
closablefalsefalsefalseStringShow a close button when the div is inside a 'tabbedpanel'
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style to use for element
delayfalsefalseIntegerHow long to wait before fetching the content (in milliseconds)
disabledfalsefalseStringSet the html disabled attribute on rendered html element
errorNotifyTopicsfalsefalseStringComma delimmited list of topics that will published after the request(if the request fails)
errorTextfalsefalseStringThe text to display to the user if the is an error fetching the content
executeScriptsfalsefalsefalseBooleanJavascript code in the fetched content will be executed
formFilterfalsefalseStringFunction name used to filter the fields of the form.
formIdfalsefalseStringForm id whose fields will be serialized and passed as parameters
handlerfalsefalseStringJavascript function name that will make the request
highlightColorfalsenonefalseStringColor used to perform a highlight effect on this element
highlightDurationfalse2000falseIntegerDuration of highlight effect in milliseconds. Only valid if 'highlightColor' attribute is set
hreffalsefalseStringThe URL to call to obtain the content. Note: If used with ajax context, the value must be set as an url tag value.
idfalsefalseStringThe id to use for the element
indicatorfalsefalseStringId of element that will be shown while making request
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
listenTopicsfalsefalseStringTopic that will trigger the remote call
loadingTextfalseLoading...falseStringText to be shown while content is being fetched
namefalsefalseStringThe name to set for element
notifyTopicsfalsefalseStringComma delimmited list of topics that will published before and after the request, and on errors
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
openTemplatefalsefalseStringSet template to use for opening the rendered html.
parseContentfalsetruefalseBooleanParse returned HTML for Dojo widgets
preloadfalsetruefalseBooleanLoad content when page is loaded
refreshOnShowfalsefalsefalseBooleanContent will be loaded when div becomes visible, used only inside the tabbedpanel tag
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
separateScriptsfalsetruefalseStringRun scripts in a separate scope, unique for each tag
showErrorTransportTextfalsetruefalseBooleanSet whether errors will be shown or not
showLoadingTextfalsefalsefalseBooleanShow loading text on targets
startTimerListenTopicsfalsefalseStringTopics that will start the timer (for autoupdate)
stopTimerListenTopicsfalsefalseStringTopics that will stop the timer (for autoupdate)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
transportfalseXMLHTTPTransportfalseStringTransport used by Dojo to make the request
updateFreqfalsefalseIntegerHow often to reload the content (in milliseconds)
valuefalsefalseStringPreset the value of input element.
- - - - + + + + div + + + +

Tag Name: div

+

Description

+

+ + Render HTML div providing content from remote call via AJAX + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
afterNotifyTopicsfalsefalseStringComma delimmited list of topics that will published after the request(if the request succeeds)
autoStartfalsetruefalseBooleanStart timer automatically
beforeNotifyTopicsfalsefalseStringComma delimmited list of topics that will published before the request
closablefalsefalsefalseStringShow a close button when the div is inside a 'tabbedpanel'
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style to use for element
delayfalsefalseIntegerHow long to wait before fetching the content (in milliseconds)
disabledfalsefalseStringSet the html disabled attribute on rendered html element
errorNotifyTopicsfalsefalseStringComma delimmited list of topics that will published after the request(if the request fails)
errorTextfalsefalseStringThe text to display to the user if the is an error fetching the content
executeScriptsfalsefalsefalseBooleanJavascript code in the fetched content will be executed
formFilterfalsefalseStringFunction name used to filter the fields of the form.
formIdfalsefalseStringForm id whose fields will be serialized and passed as parameters
handlerfalsefalseStringJavascript function name that will make the request
highlightColorfalsenonefalseStringColor used to perform a highlight effect on this element
highlightDurationfalse2000falseIntegerDuration of highlight effect in milliseconds. Only valid if 'highlightColor' attribute is set
hreffalsefalseStringThe URL to call to obtain the content. Note: If used with ajax context, the value must be set as an url tag value.
idfalsefalseStringThe id to use for the element
indicatorfalsefalseStringId of element that will be shown while making request
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
listenTopicsfalsefalseStringTopic that will trigger the remote call
loadingTextfalseLoading...falseStringText to be shown while content is being fetched
namefalsefalseStringThe name to set for element
notifyTopicsfalsefalseStringComma delimmited list of topics that will published before and after the request, and on errors
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
openTemplatefalsefalseStringSet template to use for opening the rendered html.
parseContentfalsetruefalseBooleanParse returned HTML for Dojo widgets
preloadfalsetruefalseBooleanLoad content when page is loaded
refreshOnShowfalsefalsefalseBooleanContent will be loaded when div becomes visible, used only inside the tabbedpanel tag
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
separateScriptsfalsetruefalseStringRun scripts in a separate scope, unique for each tag
showErrorTransportTextfalsetruefalseBooleanSet whether errors will be shown or not
showLoadingTextfalsefalsefalseBooleanShow loading text on targets
startTimerListenTopicsfalsefalseStringTopics that will start the timer (for autoupdate)
stopTimerListenTopicsfalsefalseStringTopics that will stop the timer (for autoupdate)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
transportfalseXMLHTTPTransportfalseStringTransport used by Dojo to make the request
updateFreqfalsefalseIntegerHow often to reload the content (in milliseconds)
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/ajax/form.html b/core/src/site/resources/tags/ajax/form.html index e8d064520..c297ea70d 100644 --- a/core/src/site/resources/tags/ajax/form.html +++ b/core/src/site/resources/tags/ajax/form.html @@ -1,418 +1,418 @@ - - - - form - - - -

Tag Name: form

-

Description

-

- - Renders an input form - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

acceptcharsetfalsetrueStringThe accepted charsets for this form. The values may be comma or blank delimited.
accesskeyfalsetrueStringSet the html accesskey attribute on rendered html element
actionfalsecurrent actiontrueStringSet action nane to submit to, without .action suffix
cssClassfalsetrueStringThe css class to use for element
cssStylefalsetrueStringThe css style definitions for element ro use
disabledfalsetrueStringSet the html disabled attribute on rendered html element
enctypefalsetrueStringHTML form enctype attribute
idfalsetrueStringid for referencing element. For UI and form tags it will be used as HTML id attribute
javascriptTooltipfalsefalsetrueBooleanUse JavaScript to generate tooltips
keyfalsetrueStringSet the key (name, value, label) for this particular component
labelfalsetrueStringLabel expression used for rendering a element specific label
labelpositionfalsetrueStringDefine label position of form element (top/left)
methodfalsetrueStringHTML form method attribute
namefalsetrueStringThe name to set for element
namespacefalsecurrent namespacetrueStringNamespace for action to submit to
onblurfalsetrueString Set the html onblur attribute on rendered html element
onchangefalsetrueStringSet the html onchange attribute on rendered html element
onclickfalsetrueStringSet the html onclick attribute on rendered html element
ondblclickfalsetrueStringSet the html ondblclick attribute on rendered html element
onfocusfalsetrueStringSet the html onfocus attribute on rendered html element
onkeydownfalsetrueStringSet the html onkeydown attribute on rendered html element
onkeypressfalsetrueStringSet the html onkeypress attribute on rendered html element
onkeyupfalsetrueStringSet the html onkeyup attribute on rendered html element
onmousedownfalsetrueStringSet the html onmousedown attribute on rendered html element
onmousemovefalsetrueStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsetrueStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsetrueStringSet the html onmouseover attribute on rendered html element
onmouseupfalsetrueStringSet the html onmouseup attribute on rendered html element
onselectfalsetrueStringSet the html onselect attribute on rendered html element
onsubmitfalsetrueStringHTML onsubmit attribute
openTemplatefalsetrueStringSet template to use for opening the rendered html.
portletModefalsetrueStringhe portlet mode to display after the form submit
requiredfalsefalsetrueBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsetrueStringDefine required position of required form element (left|right)
tabindexfalsetrueStringSet the html tabindex attribute on rendered html element
tableLayoutfalsefalsetrueBooleanWrap this form's body with an html table element, like in the xhtml theme
targetfalsetrueStringHTML form target attribute
templatefalsetrueStringThe template (other than default) to use for rendering the element
templateDirfalsetrueStringThe template directory.
titlefalsetrueStringSet the html title attribute on rendered html element
tooltipfalsetrueStringSet the tooltip of this particular component
tooltipConfigfalsetrueStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassictrueStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassictrueStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsetrueStringIcon path used for image that will have the tooltip
validatefalsefalsetrueBooleanWhether client side/remote validation should be performed. Only useful with theme xhtml/ajax
valuefalsetrueStringPreset the value of input element.
windowStatefalsetrueStringThe window state to display after the form submit
- - - - + + + + form + + + +

Tag Name: form

+

Description

+

+ + Renders an input form + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

acceptcharsetfalsetrueStringThe accepted charsets for this form. The values may be comma or blank delimited.
accesskeyfalsetrueStringSet the html accesskey attribute on rendered html element
actionfalsecurrent actiontrueStringSet action nane to submit to, without .action suffix
cssClassfalsetrueStringThe css class to use for element
cssStylefalsetrueStringThe css style definitions for element ro use
disabledfalsetrueStringSet the html disabled attribute on rendered html element
enctypefalsetrueStringHTML form enctype attribute
idfalsetrueStringid for referencing element. For UI and form tags it will be used as HTML id attribute
javascriptTooltipfalsefalsetrueBooleanUse JavaScript to generate tooltips
keyfalsetrueStringSet the key (name, value, label) for this particular component
labelfalsetrueStringLabel expression used for rendering a element specific label
labelpositionfalsetrueStringDefine label position of form element (top/left)
methodfalsetrueStringHTML form method attribute
namefalsetrueStringThe name to set for element
namespacefalsecurrent namespacetrueStringNamespace for action to submit to
onblurfalsetrueString Set the html onblur attribute on rendered html element
onchangefalsetrueStringSet the html onchange attribute on rendered html element
onclickfalsetrueStringSet the html onclick attribute on rendered html element
ondblclickfalsetrueStringSet the html ondblclick attribute on rendered html element
onfocusfalsetrueStringSet the html onfocus attribute on rendered html element
onkeydownfalsetrueStringSet the html onkeydown attribute on rendered html element
onkeypressfalsetrueStringSet the html onkeypress attribute on rendered html element
onkeyupfalsetrueStringSet the html onkeyup attribute on rendered html element
onmousedownfalsetrueStringSet the html onmousedown attribute on rendered html element
onmousemovefalsetrueStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsetrueStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsetrueStringSet the html onmouseover attribute on rendered html element
onmouseupfalsetrueStringSet the html onmouseup attribute on rendered html element
onselectfalsetrueStringSet the html onselect attribute on rendered html element
onsubmitfalsetrueStringHTML onsubmit attribute
openTemplatefalsetrueStringSet template to use for opening the rendered html.
portletModefalsetrueStringhe portlet mode to display after the form submit
requiredfalsefalsetrueBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsetrueStringDefine required position of required form element (left|right)
tabindexfalsetrueStringSet the html tabindex attribute on rendered html element
tableLayoutfalsefalsetrueBooleanWrap this form's body with an html table element, like in the xhtml theme
targetfalsetrueStringHTML form target attribute
templatefalsetrueStringThe template (other than default) to use for rendering the element
templateDirfalsetrueStringThe template directory.
titlefalsetrueStringSet the html title attribute on rendered html element
tooltipfalsetrueStringSet the tooltip of this particular component
tooltipConfigfalsetrueStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassictrueStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassictrueStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsetrueStringIcon path used for image that will have the tooltip
validatefalsefalsetrueBooleanWhether client side/remote validation should be performed. Only useful with theme xhtml/ajax
valuefalsetrueStringPreset the value of input element.
windowStatefalsetrueStringThe window state to display after the form submit
+ + + + diff --git a/core/src/site/resources/tags/ajax/head.html b/core/src/site/resources/tags/ajax/head.html index 859411369..063a7b20e 100644 --- a/core/src/site/resources/tags/ajax/head.html +++ b/core/src/site/resources/tags/ajax/head.html @@ -1,90 +1,90 @@ - - - - head - - - -

Tag Name: head

-

Description

-

- - Render a chunk of HEAD for your HTML file - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

baseRelativePathfalse/struts/dojofalseStringContext relative path of Dojo distribution folder
cachefalsetruefalseBooleanUse Struts Dojo profile, which contains all Struts widgets in one file, making it possible to be chached by the browser
compressedfalsetruefalseBooleanUse compressed version of dojo.js
debugfalsefalsefalseBooleanEnable Dojo debug messages
extraLocalesfalsefalseStringComma separated list of locale names to be loaded by Dojo, locale names must be specified as in RFC3066
localefalsefalseStringDefault locale to be used by Dojo, locale name must be specified as in RFC3066
parseContentfalsefalsefalseBooleanParse the whole document for widgets
- - - - + + + + head + + + +

Tag Name: head

+

Description

+

+ + Render a chunk of HEAD for your HTML file + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

baseRelativePathfalse/struts/dojofalseStringContext relative path of Dojo distribution folder
cachefalsetruefalseBooleanUse Struts Dojo profile, which contains all Struts widgets in one file, making it possible to be chached by the browser
compressedfalsetruefalseBooleanUse compressed version of dojo.js
debugfalsefalsefalseBooleanEnable Dojo debug messages
extraLocalesfalsefalseStringComma separated list of locale names to be loaded by Dojo, locale names must be specified as in RFC3066
localefalsefalseStringDefault locale to be used by Dojo, locale name must be specified as in RFC3066
parseContentfalsefalsefalseBooleanParse the whole document for widgets
+ + + + diff --git a/core/src/site/resources/tags/ajax/submit.html b/core/src/site/resources/tags/ajax/submit.html index 1658b7036..7d3d848fe 100644 --- a/core/src/site/resources/tags/ajax/submit.html +++ b/core/src/site/resources/tags/ajax/submit.html @@ -1,546 +1,546 @@ - - - - submit - - - -

Tag Name: submit

-

Description

-

- - Render a submit button - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
afterNotifyTopicsfalsefalseStringComma delimmited list of topics that will published after the request(if the request succeeds)
ajaxAfterValidationfalsefalsefalseBooleanMake an asynchronous request if validation succeeds. Only valid if 'validate' is 'true'
alignfalsefalseStringHTML align attribute.
beforeNotifyTopicsfalsefalseStringComma delimmited list of topics that will published before the request
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style to use for element
disabledfalsefalseStringSet the html disabled attribute on rendered html element
errorNotifyTopicsfalsefalseStringComma delimmited list of topics that will published after the request(if the request fails)
errorTextfalsefalseStringThe text to display to the user if the is an error fetching the content
executeScriptsfalsefalsefalseBooleanJavascript code in the fetched content will be executed
formFilterfalsefalseStringFunction name used to filter the fields of the form.
formIdfalsefalseStringForm id whose fields will be serialized and passed as parameters
handlerfalsefalseStringJavascript function name that will make the request
highlightColorfalsenonefalseStringColor used to perform a highlight effect on the elements specified in the 'targets' attribute
highlightDurationfalse1000falseStringDuration of highlight effect in milliseconds. Only valid if 'highlightColor' attribute is set
hreffalsefalseStringThe URL to call to obtain the content. Note: If used with ajax context, the value must be set as an url tag value.
idfalsefalseStringThe id to use for the element
indicatorfalsefalseStringSet indicator
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
listenTopicsfalsefalseStringTopic that will trigger the remote call
loadingTextfalseLoading...falseStringText to be shown while content is being fetched
methodfalsefalseStringSet method attribute.
namefalsefalseStringThe name to set for element
notifyTopicsfalsefalseStringComma delimmited list of topics that will published before and after the request, and on errors
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
parseContentfalsetruefalseBooleanParse returned HTML for Dojo widgets
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
separateScriptsfalsetruefalseStringRun scripts in a separate scope, unique for each tag
showErrorTransportTextfalsetruefalseBooleanSet whether errors will be shown or not
showLoadingTextfalsefalsefalseBooleanShow loading text on targets
srcfalsefalseStringSupply an image src for image type submit button. Will have no effect for types input and button.
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
targetsfalsefalseStringComma delimited list of ids of the elements whose content will be updated
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
transportfalseXMLHTTPTransportfalseStringTransport used by Dojo to make the request
typefalseinputfalseStringThe type of submit to use. Valid values are input, button and image.
validatefalsefalsefalseBooleanPerform Ajax calidation. 'ajaxValidation' interceptor must be applied to action
valuefalsefalseStringPreset the value of input element.
- - - - + + + + submit + + + +

Tag Name: submit

+

Description

+

+ + Render a submit button + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
afterNotifyTopicsfalsefalseStringComma delimmited list of topics that will published after the request(if the request succeeds)
ajaxAfterValidationfalsefalsefalseBooleanMake an asynchronous request if validation succeeds. Only valid if 'validate' is 'true'
alignfalsefalseStringHTML align attribute.
beforeNotifyTopicsfalsefalseStringComma delimmited list of topics that will published before the request
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style to use for element
disabledfalsefalseStringSet the html disabled attribute on rendered html element
errorNotifyTopicsfalsefalseStringComma delimmited list of topics that will published after the request(if the request fails)
errorTextfalsefalseStringThe text to display to the user if the is an error fetching the content
executeScriptsfalsefalsefalseBooleanJavascript code in the fetched content will be executed
formFilterfalsefalseStringFunction name used to filter the fields of the form.
formIdfalsefalseStringForm id whose fields will be serialized and passed as parameters
handlerfalsefalseStringJavascript function name that will make the request
highlightColorfalsenonefalseStringColor used to perform a highlight effect on the elements specified in the 'targets' attribute
highlightDurationfalse1000falseStringDuration of highlight effect in milliseconds. Only valid if 'highlightColor' attribute is set
hreffalsefalseStringThe URL to call to obtain the content. Note: If used with ajax context, the value must be set as an url tag value.
idfalsefalseStringThe id to use for the element
indicatorfalsefalseStringSet indicator
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
listenTopicsfalsefalseStringTopic that will trigger the remote call
loadingTextfalseLoading...falseStringText to be shown while content is being fetched
methodfalsefalseStringSet method attribute.
namefalsefalseStringThe name to set for element
notifyTopicsfalsefalseStringComma delimmited list of topics that will published before and after the request, and on errors
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
parseContentfalsetruefalseBooleanParse returned HTML for Dojo widgets
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
separateScriptsfalsetruefalseStringRun scripts in a separate scope, unique for each tag
showErrorTransportTextfalsetruefalseBooleanSet whether errors will be shown or not
showLoadingTextfalsefalsefalseBooleanShow loading text on targets
srcfalsefalseStringSupply an image src for image type submit button. Will have no effect for types input and button.
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
targetsfalsefalseStringComma delimited list of ids of the elements whose content will be updated
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
transportfalseXMLHTTPTransportfalseStringTransport used by Dojo to make the request
typefalseinputfalseStringThe type of submit to use. Valid values are input, button and image.
validatefalsefalsefalseBooleanPerform Ajax calidation. 'ajaxValidation' interceptor must be applied to action
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/ajax/tabbedpanel.html b/core/src/site/resources/tags/ajax/tabbedpanel.html index 66cf1eae5..650f21471 100644 --- a/core/src/site/resources/tags/ajax/tabbedpanel.html +++ b/core/src/site/resources/tags/ajax/tabbedpanel.html @@ -1,402 +1,402 @@ - - - - tabbedpanel - - - -

Tag Name: tabbedpanel

-

Description

-

- - Render a tabbedPanel widget. - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
afterSelectTabNotifyTopicsfalsefalseStringComma separated list of topics to be published when a tab is clicked on (after it is selected).The tab container widget will be passed as the first argument to the topic. The second parameter is the tab widget.
beforeSelectTabNotifyTopicsfalsefalseStringComma separated list of topics to be published when a tab is clicked on (before it is selected)The tab container widget will be passed as the first argument to the topic. The second parameter is the tab widget.The event can be cancelled setting to 'true' the 'cancel' property of the third parameter passed to the topics.
closeButtonfalsefalseStringDeprecated. Use 'closable' on each div(tab)
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
disabledTabCssClassfalsestrutsDisabledTabfalseStringCss class to be applied to the tab button of disabled tabs
doLayoutfalsefalsefalseBooleanIf doLayout is false, the tab container's height equals the height of the currently selected tab
idtruefalseStringThe id to assign to the component.
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
openTemplatefalsefalseStringSet template to use for opening the rendered html.
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
selectedTabfalsefalseString The id of the tab that will be selected by default
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateCssPathfalsefalseStringTemplate css path
templateDirfalsefalseStringThe template directory.
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
useSelectedTabCookiefalsefalsefalseStringIf set to true, the id of the last selected tab will be stored in cookie. If the view is rendered, it will be tried to read this cookie and activate the corresponding tab on success, unless overridden by the selectedTab attribute. The cookie name is "Struts2TabbedPanel_selectedTab_"+id.
valuefalsefalseStringPreset the value of input element.
- - - - + + + + tabbedpanel + + + +

Tag Name: tabbedpanel

+

Description

+

+ + Render a tabbedPanel widget. + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
afterSelectTabNotifyTopicsfalsefalseStringComma separated list of topics to be published when a tab is clicked on (after it is selected).The tab container widget will be passed as the first argument to the topic. The second parameter is the tab widget.
beforeSelectTabNotifyTopicsfalsefalseStringComma separated list of topics to be published when a tab is clicked on (before it is selected)The tab container widget will be passed as the first argument to the topic. The second parameter is the tab widget.The event can be cancelled setting to 'true' the 'cancel' property of the third parameter passed to the topics.
closeButtonfalsefalseStringDeprecated. Use 'closable' on each div(tab)
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
disabledTabCssClassfalsestrutsDisabledTabfalseStringCss class to be applied to the tab button of disabled tabs
doLayoutfalsefalsefalseBooleanIf doLayout is false, the tab container's height equals the height of the currently selected tab
idtruefalseStringThe id to assign to the component.
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
openTemplatefalsefalseStringSet template to use for opening the rendered html.
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
selectedTabfalsefalseString The id of the tab that will be selected by default
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateCssPathfalsefalseStringTemplate css path
templateDirfalsefalseStringThe template directory.
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
useSelectedTabCookiefalsefalsefalseStringIf set to true, the id of the last selected tab will be stored in cookie. If the view is rendered, it will be tried to read this cookie and activate the corresponding tab on success, unless overridden by the selectedTab attribute. The cookie name is "Struts2TabbedPanel_selectedTab_"+id.
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/ajax/textarea.html b/core/src/site/resources/tags/ajax/textarea.html index a0afed54d..a884f6db5 100644 --- a/core/src/site/resources/tags/ajax/textarea.html +++ b/core/src/site/resources/tags/ajax/textarea.html @@ -1,370 +1,370 @@ - - - - textarea - - - -

Tag Name: textarea

-

Description

-

- - Renders Dojo Editor2 widget - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
colsfalsefalseIntegerHTML cols attribute
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
readonlyfalsefalsefalseBooleanWhether the textarea is readonly
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
rowsfalsefalseIntegerHTML rows attribute
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
wrapfalsefalseStringHTML wrap attribute
- - - - + + + + textarea + + + +

Tag Name: textarea

+

Description

+

+ + Renders Dojo Editor2 widget + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
colsfalsefalseIntegerHTML cols attribute
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
readonlyfalsefalsefalseBooleanWhether the textarea is readonly
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
rowsfalsefalseIntegerHTML rows attribute
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
wrapfalsefalseStringHTML wrap attribute
+ + + + diff --git a/core/src/site/resources/tags/ajax/tree.html b/core/src/site/resources/tags/ajax/tree.html index 7b64f3e9c..8928307ba 100644 --- a/core/src/site/resources/tags/ajax/tree.html +++ b/core/src/site/resources/tags/ajax/tree.html @@ -1,562 +1,562 @@ - - - - tree - - - -

Tag Name: tree

-

Description

-

- - Render a tree widget. - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
blankIconSrcfalsefalseStringBlank icon image source.
childCollectionPropertyfalsefalseStringThe childCollectionProperty property.
collapsedNotifyTopicsfalsefalseStringComma separated lis of topics to be published when a node is collapsed. An object with a 'node' property will be passed as parameter to the topics.
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style to use for element
disabledfalsefalseStringSet the html disabled attribute on rendered html element
errorNotifyTopicsfalsefalseStringComma delimmited list of topics that will published after the request(if the request fails).Only valid if 'href' is set
expandIconSrcMinusfalsefalseStringExpand icon (-) image source.
expandIconSrcPlusfalsefalseStringExpand Icon (+) image source.
expandedNotifyTopicsfalsefalseStringComma separated lis of topics to be published when a node is expanded. An object with a 'node' property will be passed as parameter to the topics.
gridIconSrcCfalsefalseStringImage source for under child item child icons.
gridIconSrcLfalsefalseString Image source for last child grid.
gridIconSrcPfalsefalseStringImage source for under parent item child icons.
gridIconSrcVfalsefalseStringImage source for vertical line.
gridIconSrcXfalsefalseStringImage source for grid for sole root item.
gridIconSrcYfalsefalseStringImage source for grid for last root item.
hreffalsefalseStringUrl used to load the list of children nodes for an specific node, whose id will be passed as a parameter named 'nodeId' (empty for root)
iconHeightfalse18pxfalseStringIcon height
iconWidthfalse19pxfalseStringIcon width
idfalsefalseStringThe id to use for the element
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
nodeIdPropertyfalsefalseStringThe nodeIdProperty property.
nodeTitlePropertyfalsefalseStringThe nodeTitleProperty property.
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
openTemplatefalsefalseStringSet template to use for opening the rendered html.
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
rootNodefalsefalseStringThe rootNode property.
selectedNotifyTopicsfalsefalseStringComma separated lis of topics to be published when a node is selected. An object with a 'node' property will be passed as parameter to the topics.
showGridfalsetruefalseBooleanShow grid
showRootGridfalsefalseStringThe showRootGrid property (default true).
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateCssPathfalse{contextPath}/struts/tree.css.falseStringTemplate css path
templateDirfalsefalseStringThe template directory.
titlefalsefalseStringSet the html title attribute on rendered html element
togglefalsefadefalseStringThe toggle property (either 'explode' or 'fade')
toggleDurationfalse150falseStringToggle duration in milliseconds
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
treeCollapsedTopicsfalsefalseStringDeprecated. Use 'collapsedNotifyTopics' instead.
treeExpandedTopicsfalsefalseStringDeprecated. Use 'expandedNotifyTopics' instead.
treeSelectedTopicfalsefalseStringDeprecated. Use 'selectedNotifyTopics' instead.
valuefalsefalseStringPreset the value of input element.
- - - - + + + + tree + + + +

Tag Name: tree

+

Description

+

+ + Render a tree widget. + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
blankIconSrcfalsefalseStringBlank icon image source.
childCollectionPropertyfalsefalseStringThe childCollectionProperty property.
collapsedNotifyTopicsfalsefalseStringComma separated lis of topics to be published when a node is collapsed. An object with a 'node' property will be passed as parameter to the topics.
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style to use for element
disabledfalsefalseStringSet the html disabled attribute on rendered html element
errorNotifyTopicsfalsefalseStringComma delimmited list of topics that will published after the request(if the request fails).Only valid if 'href' is set
expandIconSrcMinusfalsefalseStringExpand icon (-) image source.
expandIconSrcPlusfalsefalseStringExpand Icon (+) image source.
expandedNotifyTopicsfalsefalseStringComma separated lis of topics to be published when a node is expanded. An object with a 'node' property will be passed as parameter to the topics.
gridIconSrcCfalsefalseStringImage source for under child item child icons.
gridIconSrcLfalsefalseString Image source for last child grid.
gridIconSrcPfalsefalseStringImage source for under parent item child icons.
gridIconSrcVfalsefalseStringImage source for vertical line.
gridIconSrcXfalsefalseStringImage source for grid for sole root item.
gridIconSrcYfalsefalseStringImage source for grid for last root item.
hreffalsefalseStringUrl used to load the list of children nodes for an specific node, whose id will be passed as a parameter named 'nodeId' (empty for root)
iconHeightfalse18pxfalseStringIcon height
iconWidthfalse19pxfalseStringIcon width
idfalsefalseStringThe id to use for the element
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
nodeIdPropertyfalsefalseStringThe nodeIdProperty property.
nodeTitlePropertyfalsefalseStringThe nodeTitleProperty property.
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
openTemplatefalsefalseStringSet template to use for opening the rendered html.
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
rootNodefalsefalseStringThe rootNode property.
selectedNotifyTopicsfalsefalseStringComma separated lis of topics to be published when a node is selected. An object with a 'node' property will be passed as parameter to the topics.
showGridfalsetruefalseBooleanShow grid
showRootGridfalsefalseStringThe showRootGrid property (default true).
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateCssPathfalse{contextPath}/struts/tree.css.falseStringTemplate css path
templateDirfalsefalseStringThe template directory.
titlefalsefalseStringSet the html title attribute on rendered html element
togglefalsefadefalseStringThe toggle property (either 'explode' or 'fade')
toggleDurationfalse150falseStringToggle duration in milliseconds
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
treeCollapsedTopicsfalsefalseStringDeprecated. Use 'collapsedNotifyTopics' instead.
treeExpandedTopicsfalsefalseStringDeprecated. Use 'expandedNotifyTopics' instead.
treeSelectedTopicfalsefalseStringDeprecated. Use 'selectedNotifyTopics' instead.
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/ajax/treenode.html b/core/src/site/resources/tags/ajax/treenode.html index 8352c9ae2..a1d5a86de 100644 --- a/core/src/site/resources/tags/ajax/treenode.html +++ b/core/src/site/resources/tags/ajax/treenode.html @@ -1,338 +1,338 @@ - - - - treenode - - - -

Tag Name: treenode

-

Description

-

- - Render a tree node within a tree widget. - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style to use for element
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringThe id to use for the element
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labeltruefalseStringLabel expression used for rendering tree node label.
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
openTemplatefalsefalseStringSet template to use for opening the rendered html.
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
- - - - + + + + treenode + + + +

Tag Name: treenode

+

Description

+

+ + Render a tree node within a tree widget. + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style to use for element
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringThe id to use for the element
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labeltruefalseStringLabel expression used for rendering tree node label.
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
openTemplatefalsefalseStringSet template to use for opening the rendered html.
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/append.html b/core/src/site/resources/tags/append.html index a5a751456..dfe711907 100644 --- a/core/src/site/resources/tags/append.html +++ b/core/src/site/resources/tags/append.html @@ -1,50 +1,50 @@ - - - - append - - - -

Tag Name: append

-

Description

-

- - Append the values of a list of iterators to one iterator - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

idfalsefalseStringDeprecated. Use 'var' instead
varfalsefalseStringThe name of which if supplied will have the resultant appended iterator stored under in the stack's context
- - - - + + + + append + + + +

Tag Name: append

+

Description

+

+ + Append the values of a list of iterators to one iterator + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

idfalsefalseStringDeprecated. Use 'var' instead
varfalsefalseStringThe name of which if supplied will have the resultant appended iterator stored under in the stack's context
+ + + + diff --git a/core/src/site/resources/tags/bean.html b/core/src/site/resources/tags/bean.html index a77fae9bc..c8b2d8608 100644 --- a/core/src/site/resources/tags/bean.html +++ b/core/src/site/resources/tags/bean.html @@ -1,58 +1,58 @@ - - - - bean - - - -

Tag Name: bean

-

Description

-

- - Instantiate a JavaBean and place it in the context - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

idfalsefalseStringDeprecated. Use 'var' instead
nametruefalseStringThe class name of the bean to be instantiated (must respect JavaBean specification)
varfalsefalseStringName used to reference the value pushed into the Value Stack
- - - - + + + + bean + + + +

Tag Name: bean

+

Description

+

+ + Instantiate a JavaBean and place it in the context + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

idfalsefalseStringDeprecated. Use 'var' instead
nametruefalseStringThe class name of the bean to be instantiated (must respect JavaBean specification)
varfalsefalseStringName used to reference the value pushed into the Value Stack
+ + + + diff --git a/core/src/site/resources/tags/checkbox.html b/core/src/site/resources/tags/checkbox.html index 0aa2f04e0..4df6958c4 100644 --- a/core/src/site/resources/tags/checkbox.html +++ b/core/src/site/resources/tags/checkbox.html @@ -1,346 +1,346 @@ - - - - checkbox - - - -

Tag Name: checkbox

-

Description

-

- - Render a checkbox input field - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
fieldValuefalsetruefalseStringThe actual HTML value attribute of the checkbox.
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
- - - - + + + + checkbox + + + +

Tag Name: checkbox

+

Description

+

+ + Render a checkbox input field + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
fieldValuefalsetruefalseStringThe actual HTML value attribute of the checkbox.
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/checkboxlist.html b/core/src/site/resources/tags/checkboxlist.html index 13cce59c1..5900dce9e 100644 --- a/core/src/site/resources/tags/checkboxlist.html +++ b/core/src/site/resources/tags/checkboxlist.html @@ -1,362 +1,362 @@ - - - - checkboxlist - - - -

Tag Name: checkboxlist

-

Description

-

- - Render a list of checkboxes - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
listtruefalseStringIterable source to populate from. If the list is a Map (key, value), the Map key will become the option 'value' parameter and the Map value will become the option body.
listKeyfalsefalseString Property of list objects to get field value from
listValuefalsefalseStringProperty of list objects to get field content from
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
- - - - + + + + checkboxlist + + + +

Tag Name: checkboxlist

+

Description

+

+ + Render a list of checkboxes + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
listtruefalseStringIterable source to populate from. If the list is a Map (key, value), the Map key will become the option 'value' parameter and the Map value will become the option body.
listKeyfalsefalseString Property of list objects to get field value from
listValuefalsefalseStringProperty of list objects to get field content from
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/combobox.html b/core/src/site/resources/tags/combobox.html index d780460a8..e53fa5881 100644 --- a/core/src/site/resources/tags/combobox.html +++ b/core/src/site/resources/tags/combobox.html @@ -1,418 +1,418 @@ - - - - combobox - - - -

Tag Name: combobox

-

Description

-

- - Widget that fills a text box from a select - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
emptyOptionfalsefalseStringDecide if an empty option is to be inserted. Default false.
headerKeyfalsefalseStringSet the header key for the header option.
headerValuefalsefalseStringSet the header value for the header option.
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
listtruefalseStringIteratable source to populate from. If this is missing, the select widget is simply not displayed.
listKeyfalsefalseStringSet the key used to retrive the option key.
listValuefalsefalseStringSet the value used to retrive the option value.
maxLengthfalsefalseIntegerDeprecated. Use maxlength instead.
maxlengthfalsefalseIntegerHTML maxlength attribute
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
readonlyfalsefalsefalseBooleanWhether the input is readonly
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
sizefalsefalseIntegerHTML size attribute
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
- - - - + + + + combobox + + + +

Tag Name: combobox

+

Description

+

+ + Widget that fills a text box from a select + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
emptyOptionfalsefalseStringDecide if an empty option is to be inserted. Default false.
headerKeyfalsefalseStringSet the header key for the header option.
headerValuefalsefalseStringSet the header value for the header option.
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
listtruefalseStringIteratable source to populate from. If this is missing, the select widget is simply not displayed.
listKeyfalsefalseStringSet the key used to retrive the option key.
listValuefalsefalseStringSet the value used to retrive the option value.
maxLengthfalsefalseIntegerDeprecated. Use maxlength instead.
maxlengthfalsefalseIntegerHTML maxlength attribute
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
readonlyfalsefalsefalseBooleanWhether the input is readonly
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
sizefalsefalseIntegerHTML size attribute
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/component.html b/core/src/site/resources/tags/component.html index 20aa9f8b8..c005d0d80 100644 --- a/core/src/site/resources/tags/component.html +++ b/core/src/site/resources/tags/component.html @@ -1,338 +1,338 @@ - - - - component - - - -

Tag Name: component

-

Description

-

- - Render a custom ui widget - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
- - - - + + + + component + + + +

Tag Name: component

+

Description

+

+ + Render a custom ui widget + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/date.html b/core/src/site/resources/tags/date.html index d5dd73339..795f1c248 100644 --- a/core/src/site/resources/tags/date.html +++ b/core/src/site/resources/tags/date.html @@ -1,74 +1,74 @@ - - - - date - - - -

Tag Name: date

-

Description

-

- - Render a formatted date. - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

formatfalsefalseStringDate or DateTime format pattern
idfalsefalseStringDeprecated. Use 'var' instead
nametruefalseStringThe date value to format
nicefalsefalsefalseBooleanWhether to print out the date nicely
varfalsefalseStringName used to reference the value pushed into the Value Stack
- - - - + + + + date + + + +

Tag Name: date

+

Description

+

+ + Render a formatted date. + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

formatfalsefalseStringDate or DateTime format pattern
idfalsefalseStringDeprecated. Use 'var' instead
nametruefalseStringThe date value to format
nicefalsefalsefalseBooleanWhether to print out the date nicely
varfalsefalseStringName used to reference the value pushed into the Value Stack
+ + + + diff --git a/core/src/site/resources/tags/debug.html b/core/src/site/resources/tags/debug.html index 63254f4f7..3c94d383b 100644 --- a/core/src/site/resources/tags/debug.html +++ b/core/src/site/resources/tags/debug.html @@ -1,338 +1,338 @@ - - - - debug - - - -

Tag Name: debug

-

Description

-

- - Prints debugging information - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
- - - - + + + + debug + + + +

Tag Name: debug

+

Description

+

+ + Prints debugging information + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/div.html b/core/src/site/resources/tags/div.html index c19cad76e..a383e8d36 100644 --- a/core/src/site/resources/tags/div.html +++ b/core/src/site/resources/tags/div.html @@ -1,346 +1,346 @@ - - - - div - - - -

Tag Name: div

-

Description

-

- - Render an HTML div - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
openTemplatefalsefalseStringSet template to use for opening the rendered html.
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
- - - - + + + + div + + + +

Tag Name: div

+

Description

+

+ + Render an HTML div + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
openTemplatefalsefalseStringSet template to use for opening the rendered html.
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/doubleselect.html b/core/src/site/resources/tags/doubleselect.html index 669eae217..64e297cfe 100644 --- a/core/src/site/resources/tags/doubleselect.html +++ b/core/src/site/resources/tags/doubleselect.html @@ -1,642 +1,642 @@ - - - - doubleselect - - - -

Tag Name: doubleselect

-

Description

-

- - Renders two HTML select elements with second one changing displayed values depending on selected entry of first one. - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
doubleAccesskeyfalsefalseStringSet the html accesskey attribute.
doubleCssClassfalsefalseStringThe css class for the second list
doubleCssStylefalsefalseStringThe css style for the second list
doubleDisabledfalsefalseStringDecides if a disable attribute should be added to the second list
doubleEmptyOptionfalsefalseStringDecides if the second list will add an empty option
doubleHeaderKeyfalsefalseStringThe header key for the second list
doubleHeaderValuefalsefalseStringThe header value for the second list
doubleIdfalsefalseStringThe id of the second list
doubleListtruefalseStringThe second iterable source to populate from.
doubleListKeyfalsefalseStringThe key expression to use for second list
doubleListValuefalsefalseStringThe value expression to use for second list
doubleMultiplefalsefalseString Decides if multiple attribute should be set on the second list
doubleNametruefalseStringThe name for complete component
doubleOnblurfalsefalseStringSet the onblur attribute of the second list
doubleOnchangefalsefalseStringSet the onchange attribute of the second list
doubleOnclickfalsefalseStringSet the onclick attribute of the second list
doubleOndblclickfalsefalseStringSet the ondbclick attribute of the second list
doubleOnfocusfalsefalseStringSet the onfocus attribute of the second list
doubleOnkeydownfalsefalseStringSet the onkeydown attribute of the second list
doubleOnkeypressfalsefalseStringSet the onkeypress attribute of the second list
doubleOnkeyupfalsefalseStringSet the onkeyup attribute of the second list
doubleOnmousedownfalsefalseStringSet the onmousedown attribute of the second list
doubleOnmousemovefalsefalseStringSet the onmousemove attribute of the second list
doubleOnmouseoutfalsefalseStringSet the onmouseout attribute of the second list
doubleOnmouseoverfalsefalseStringSet the onmouseover attribute of the second list
doubleOnmouseupfalsefalseStringSet the onmouseup attribute of the second list
doubleOnselectfalsefalseStringSet the onselect attribute of the second list
doubleSizefalsefalseStringSet the size attribute of the second list
doubleValuefalsefalseStringThe value expression for complete component
emptyOptionfalsefalsefalseBooleanDecides of an empty option is to be inserted in the second list
formNamefalsefalseStringThe form name this component resides in and populates to
headerKeyfalsefalseStringSet the header key of the second list. Must not be empty! '-1' and '' is correct, '' is bad.
headerValuefalsefalseString Set the header value of the second list
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
listtruefalseStringIterable source to populate from. If the list is a Map (key, value), the Map key will become the option 'value' parameter and the Map value will become the option body.
listKeyfalsefalseString Property of list objects to get field value from
listValuefalsefalseStringProperty of list objects to get field content from
multiplefalsefalseStringCreates a multiple select. The tag will pre-select multiple values if the values are passed as an Array (of appropriate types) via the value attribute.
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
sizefalsefalseIntegerSize of the element box (# of elements to show)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
- - - - + + + + doubleselect + + + +

Tag Name: doubleselect

+

Description

+

+ + Renders two HTML select elements with second one changing displayed values depending on selected entry of first one. + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
doubleAccesskeyfalsefalseStringSet the html accesskey attribute.
doubleCssClassfalsefalseStringThe css class for the second list
doubleCssStylefalsefalseStringThe css style for the second list
doubleDisabledfalsefalseStringDecides if a disable attribute should be added to the second list
doubleEmptyOptionfalsefalseStringDecides if the second list will add an empty option
doubleHeaderKeyfalsefalseStringThe header key for the second list
doubleHeaderValuefalsefalseStringThe header value for the second list
doubleIdfalsefalseStringThe id of the second list
doubleListtruefalseStringThe second iterable source to populate from.
doubleListKeyfalsefalseStringThe key expression to use for second list
doubleListValuefalsefalseStringThe value expression to use for second list
doubleMultiplefalsefalseString Decides if multiple attribute should be set on the second list
doubleNametruefalseStringThe name for complete component
doubleOnblurfalsefalseStringSet the onblur attribute of the second list
doubleOnchangefalsefalseStringSet the onchange attribute of the second list
doubleOnclickfalsefalseStringSet the onclick attribute of the second list
doubleOndblclickfalsefalseStringSet the ondbclick attribute of the second list
doubleOnfocusfalsefalseStringSet the onfocus attribute of the second list
doubleOnkeydownfalsefalseStringSet the onkeydown attribute of the second list
doubleOnkeypressfalsefalseStringSet the onkeypress attribute of the second list
doubleOnkeyupfalsefalseStringSet the onkeyup attribute of the second list
doubleOnmousedownfalsefalseStringSet the onmousedown attribute of the second list
doubleOnmousemovefalsefalseStringSet the onmousemove attribute of the second list
doubleOnmouseoutfalsefalseStringSet the onmouseout attribute of the second list
doubleOnmouseoverfalsefalseStringSet the onmouseover attribute of the second list
doubleOnmouseupfalsefalseStringSet the onmouseup attribute of the second list
doubleOnselectfalsefalseStringSet the onselect attribute of the second list
doubleSizefalsefalseStringSet the size attribute of the second list
doubleValuefalsefalseStringThe value expression for complete component
emptyOptionfalsefalsefalseBooleanDecides of an empty option is to be inserted in the second list
formNamefalsefalseStringThe form name this component resides in and populates to
headerKeyfalsefalseStringSet the header key of the second list. Must not be empty! '-1' and '' is correct, '' is bad.
headerValuefalsefalseString Set the header value of the second list
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
listtruefalseStringIterable source to populate from. If the list is a Map (key, value), the Map key will become the option 'value' parameter and the Map value will become the option body.
listKeyfalsefalseString Property of list objects to get field value from
listValuefalsefalseStringProperty of list objects to get field content from
multiplefalsefalseStringCreates a multiple select. The tag will pre-select multiple values if the values are passed as an Array (of appropriate types) via the value attribute.
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
sizefalsefalseIntegerSize of the element box (# of elements to show)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/dropdowndatetimepicker.html b/core/src/site/resources/tags/dropdowndatetimepicker.html index 745b28fc0..a6f28799f 100644 --- a/core/src/site/resources/tags/dropdowndatetimepicker.html +++ b/core/src/site/resources/tags/dropdowndatetimepicker.html @@ -1,410 +1,410 @@ - - - - dropdowndatetimepicker - - - -

Tag Name: dropdowndatetimepicker

-

Description

-

- - Renders a dropdown picker(datepicker or timepicker) - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsetrueStringSet the html accesskey attribute on rendered html element
adjustWeeksfalsefalsetrueBooleanIf true, weekly size of calendar changes to acomodate the month if false, 42 day format is used
cssClassfalsetrueStringThe css class to use for element
cssStylefalsetrueStringThe css style definitions for element ro use
dayWidthfalsenarrowtrueStringHow to render the names of the days in the header(narrow, abbr or wide)
disabledfalsetrueStringSet the html disabled attribute on rendered html element
displayFormatfalsetrueStringA pattern used for the visual display of the formatted date, e.g. dd/MM/yyyy
displayWeeksfalse6trueIntegerTotal weeks to display
endDatefalse2941-10-12trueDateLast available date in the calendar set
formatLengthfalseshorttrueStringType of formatting used for visual display. Possible values are long, short, medium or full
iconPathfalsetrueString Path to icon used for the dropdown
idfalsetrueStringid for referencing element. For UI and form tags it will be used as HTML id attribute
keyfalsetrueStringSet the key (name, value, label) for this particular component
labelfalsetrueStringLabel expression used for rendering a element specific label
labelpositionfalsetrueStringDefine label position of form element (top/left)
languagefalsebrower's specified preferred languagetrueStringLanguage to display this widget in
namefalsetrueStringThe name to set for element
onblurfalsetrueString Set the html onblur attribute on rendered html element
onchangefalsetrueStringSet the html onchange attribute on rendered html element
onclickfalsetrueStringSet the html onclick attribute on rendered html element
ondblclickfalsetrueStringSet the html ondblclick attribute on rendered html element
onfocusfalsetrueStringSet the html onfocus attribute on rendered html element
onkeydownfalsetrueStringSet the html onkeydown attribute on rendered html element
onkeypressfalsetrueStringSet the html onkeypress attribute on rendered html element
onkeyupfalsetrueStringSet the html onkeyup attribute on rendered html element
onmousedownfalsetrueStringSet the html onmousedown attribute on rendered html element
onmousemovefalsetrueStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsetrueStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsetrueStringSet the html onmouseover attribute on rendered html element
onmouseupfalsetrueStringSet the html onmouseup attribute on rendered html element
onselectfalsetrueStringSet the html onselect attribute on rendered html element
requiredfalsefalsetrueBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsetrueStringDefine required position of required form element (left|right)
startDatefalse1492-10-12trueDateFirst available date in the calendar set
staticDisplayfalsefalsetrueBooleanDisable all incremental controls, must pick a date in the current display
tabindexfalsetrueStringSet the html tabindex attribute on rendered html element
templatefalsetrueStringThe template (other than default) to use for rendering the element
templateDirfalsetrueStringThe template directory.
themefalsetrueStringThe theme (other than default) to use for rendering the element
titlefalsetrueStringSet the html title attribute on rendered html element
toggleDurationfalse100trueIntegerDuration of toggle in milliseconds
toggleTypefalseplaintrueStringoggle type of the dropdown. Possible values are plain,wipe,explode,fade
tooltipfalsetrueStringSet the tooltip of this particular component
tooltipConfigfalsetrueStringSet the tooltip configuration
typefalsedatetrueStringDefines the type of the picker on the dropdown. Possible values are 'date' for a DatePicker, and 'time' for a timePicker
valuefalsetrueStringPreset the value of input element.
weekStartsOnfalse0trueIntegerAdjusts the first day of the week 0==Sunday..6==Saturday
- - - - + + + + dropdowndatetimepicker + + + +

Tag Name: dropdowndatetimepicker

+

Description

+

+ + Renders a dropdown picker(datepicker or timepicker) + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsetrueStringSet the html accesskey attribute on rendered html element
adjustWeeksfalsefalsetrueBooleanIf true, weekly size of calendar changes to acomodate the month if false, 42 day format is used
cssClassfalsetrueStringThe css class to use for element
cssStylefalsetrueStringThe css style definitions for element ro use
dayWidthfalsenarrowtrueStringHow to render the names of the days in the header(narrow, abbr or wide)
disabledfalsetrueStringSet the html disabled attribute on rendered html element
displayFormatfalsetrueStringA pattern used for the visual display of the formatted date, e.g. dd/MM/yyyy
displayWeeksfalse6trueIntegerTotal weeks to display
endDatefalse2941-10-12trueDateLast available date in the calendar set
formatLengthfalseshorttrueStringType of formatting used for visual display. Possible values are long, short, medium or full
iconPathfalsetrueString Path to icon used for the dropdown
idfalsetrueStringid for referencing element. For UI and form tags it will be used as HTML id attribute
keyfalsetrueStringSet the key (name, value, label) for this particular component
labelfalsetrueStringLabel expression used for rendering a element specific label
labelpositionfalsetrueStringDefine label position of form element (top/left)
languagefalsebrower's specified preferred languagetrueStringLanguage to display this widget in
namefalsetrueStringThe name to set for element
onblurfalsetrueString Set the html onblur attribute on rendered html element
onchangefalsetrueStringSet the html onchange attribute on rendered html element
onclickfalsetrueStringSet the html onclick attribute on rendered html element
ondblclickfalsetrueStringSet the html ondblclick attribute on rendered html element
onfocusfalsetrueStringSet the html onfocus attribute on rendered html element
onkeydownfalsetrueStringSet the html onkeydown attribute on rendered html element
onkeypressfalsetrueStringSet the html onkeypress attribute on rendered html element
onkeyupfalsetrueStringSet the html onkeyup attribute on rendered html element
onmousedownfalsetrueStringSet the html onmousedown attribute on rendered html element
onmousemovefalsetrueStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsetrueStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsetrueStringSet the html onmouseover attribute on rendered html element
onmouseupfalsetrueStringSet the html onmouseup attribute on rendered html element
onselectfalsetrueStringSet the html onselect attribute on rendered html element
requiredfalsefalsetrueBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsetrueStringDefine required position of required form element (left|right)
startDatefalse1492-10-12trueDateFirst available date in the calendar set
staticDisplayfalsefalsetrueBooleanDisable all incremental controls, must pick a date in the current display
tabindexfalsetrueStringSet the html tabindex attribute on rendered html element
templatefalsetrueStringThe template (other than default) to use for rendering the element
templateDirfalsetrueStringThe template directory.
themefalsetrueStringThe theme (other than default) to use for rendering the element
titlefalsetrueStringSet the html title attribute on rendered html element
toggleDurationfalse100trueIntegerDuration of toggle in milliseconds
toggleTypefalseplaintrueStringoggle type of the dropdown. Possible values are plain,wipe,explode,fade
tooltipfalsetrueStringSet the tooltip of this particular component
tooltipConfigfalsetrueStringSet the tooltip configuration
typefalsedatetrueStringDefines the type of the picker on the dropdown. Possible values are 'date' for a DatePicker, and 'time' for a timePicker
valuefalsetrueStringPreset the value of input element.
weekStartsOnfalse0trueIntegerAdjusts the first day of the week 0==Sunday..6==Saturday
+ + + + diff --git a/core/src/site/resources/tags/else.html b/core/src/site/resources/tags/else.html index 41090f682..86399aec6 100644 --- a/core/src/site/resources/tags/else.html +++ b/core/src/site/resources/tags/else.html @@ -1,34 +1,34 @@ - - - - else - - - -

Tag Name: else

-

Description

-

- - Else tag - -

- -

Attributes

- - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

- - - - + + + + else + + + +

Tag Name: else

+

Description

+

+ + Else tag + +

+ +

Attributes

+ + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

+ + + + diff --git a/core/src/site/resources/tags/elseif.html b/core/src/site/resources/tags/elseif.html index a1530f5b5..f046922e8 100644 --- a/core/src/site/resources/tags/elseif.html +++ b/core/src/site/resources/tags/elseif.html @@ -1,42 +1,42 @@ - - - - elseif - - - -

Tag Name: elseif

-

Description

-

- - Elseif tag - -

- -

Attributes

- - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

testtruefalseBooleanExpression to determine if body of tag is to be displayed
- - - - + + + + elseif + + + +

Tag Name: elseif

+

Description

+

+ + Elseif tag + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

testtruefalseBooleanExpression to determine if body of tag is to be displayed
+ + + + diff --git a/core/src/site/resources/tags/fielderror.html b/core/src/site/resources/tags/fielderror.html index 0c1010a1a..18fd3f742 100644 --- a/core/src/site/resources/tags/fielderror.html +++ b/core/src/site/resources/tags/fielderror.html @@ -1,338 +1,338 @@ - - - - fielderror - - - -

Tag Name: fielderror

-

Description

-

- - Render field error (all or partial depending on param tag nested)if they exists - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
- - - - + + + + fielderror + + + +

Tag Name: fielderror

+

Description

+

+ + Render field error (all or partial depending on param tag nested)if they exists + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/file.html b/core/src/site/resources/tags/file.html index a33cbc3a7..8b4498d07 100644 --- a/core/src/site/resources/tags/file.html +++ b/core/src/site/resources/tags/file.html @@ -1,354 +1,354 @@ - - - - file - - - -

Tag Name: file

-

Description

-

- - Render a file input field - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

acceptfalsefalseStringHTML accept attribute to indicate accepted file mimetypes
accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
sizefalsefalseIntegerHTML size attribute
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
- - - - + + + + file + + + +

Tag Name: file

+

Description

+

+ + Render a file input field + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

acceptfalsefalseStringHTML accept attribute to indicate accepted file mimetypes
accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
sizefalsefalseIntegerHTML size attribute
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/form.html b/core/src/site/resources/tags/form.html index 7e847756c..7dea007d6 100644 --- a/core/src/site/resources/tags/form.html +++ b/core/src/site/resources/tags/form.html @@ -1,434 +1,434 @@ - - - - form - - - -

Tag Name: form

-

Description

-

- - Renders an input form - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

acceptcharsetfalsefalseStringThe accepted charsets for this form. The values may be comma or blank delimited.
accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
actionfalsecurrent actionfalseStringSet action name to submit to, without .action suffix
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
enctypefalsefalseStringHTML form enctype attribute
focusElementfalsefalseStringId of element that will receive the focus when page loads.
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
methodfalsefalseStringHTML form method attribute
namefalsefalseStringThe name to set for element
namespacefalsecurrent namespacefalseStringNamespace for action to submit to
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
onsubmitfalsefalseStringHTML onsubmit attribute
openTemplatefalsefalseStringSet template to use for opening the rendered html.
portletModefalsefalseStringThe portlet mode to display after the form submit
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
targetfalsefalseStringHTML form target attribute
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
validatefalsefalsefalseBooleanWhether client side/remote validation should be performed. Only useful with theme xhtml/ajax
valuefalsefalseStringPreset the value of input element.
windowStatefalsefalseStringThe window state to display after the form submit
- - - - + + + + form + + + +

Tag Name: form

+

Description

+

+ + Renders an input form + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

acceptcharsetfalsefalseStringThe accepted charsets for this form. The values may be comma or blank delimited.
accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
actionfalsecurrent actionfalseStringSet action name to submit to, without .action suffix
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
enctypefalsefalseStringHTML form enctype attribute
focusElementfalsefalseStringId of element that will receive the focus when page loads.
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
methodfalsefalseStringHTML form method attribute
namefalsefalseStringThe name to set for element
namespacefalsecurrent namespacefalseStringNamespace for action to submit to
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
onsubmitfalsefalseStringHTML onsubmit attribute
openTemplatefalsefalseStringSet template to use for opening the rendered html.
portletModefalsefalseStringThe portlet mode to display after the form submit
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
targetfalsefalseStringHTML form target attribute
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
validatefalsefalsefalseBooleanWhether client side/remote validation should be performed. Only useful with theme xhtml/ajax
valuefalsefalseStringPreset the value of input element.
windowStatefalsefalseStringThe window state to display after the form submit
+ + + + diff --git a/core/src/site/resources/tags/generator.html b/core/src/site/resources/tags/generator.html index 0d171f7f0..7a60cfc44 100644 --- a/core/src/site/resources/tags/generator.html +++ b/core/src/site/resources/tags/generator.html @@ -1,82 +1,82 @@ - - - - generator - - - -

Tag Name: generator

-

Description

-

- - Generate an iterator for a iterable source. - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

converterfalsefalseorg.apache.struts2.util.IteratorGenerator.ConverterThe converter to convert the String entry parsed from val into an object
countfalsefalseIntegerThe max number entries to be in the iterator
idfalsefalseStringDeprecated. Use 'var' instead
separatortruefalseStringThe separator to be used in separating the val into entries of the iterator
valtruefalseStringThe source to be parsed into an iterator
varfalsefalseStringThe name to store the resultant iterator into page context, if such name is supplied
- - - - + + + + generator + + + +

Tag Name: generator

+

Description

+

+ + Generate an iterator for a iterable source. + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

converterfalsefalseorg.apache.struts2.util.IteratorGenerator.ConverterThe converter to convert the String entry parsed from val into an object
countfalsefalseIntegerThe max number entries to be in the iterator
idfalsefalseStringDeprecated. Use 'var' instead
separatortruefalseStringThe separator to be used in separating the val into entries of the iterator
valtruefalseStringThe source to be parsed into an iterator
varfalsefalseStringThe name to store the resultant iterator into page context, if such name is supplied
+ + + + diff --git a/core/src/site/resources/tags/head.html b/core/src/site/resources/tags/head.html index a68ed7706..41bebc772 100644 --- a/core/src/site/resources/tags/head.html +++ b/core/src/site/resources/tags/head.html @@ -1,338 +1,338 @@ - - - - head - - - -

Tag Name: head

-

Description

-

- - Render a chunk of HEAD for your HTML file - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
- - - - + + + + head + + + +

Tag Name: head

+

Description

+

+ + Render a chunk of HEAD for your HTML file + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/hidden.html b/core/src/site/resources/tags/hidden.html index 2c21ebb5d..c52d3378c 100644 --- a/core/src/site/resources/tags/hidden.html +++ b/core/src/site/resources/tags/hidden.html @@ -1,338 +1,338 @@ - - - - hidden - - - -

Tag Name: hidden

-

Description

-

- - Render a hidden input field - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
- - - - + + + + hidden + + + +

Tag Name: hidden

+

Description

+

+ + Render a hidden input field + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/i18n.html b/core/src/site/resources/tags/i18n.html index 5756c4981..e67fa5976 100644 --- a/core/src/site/resources/tags/i18n.html +++ b/core/src/site/resources/tags/i18n.html @@ -1,42 +1,42 @@ - - - - i18n - - - -

Tag Name: i18n

-

Description

-

- - Get a resource bundle and place it on the value stack - -

- -

Attributes

- - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

nametrueStringfalseStringName of resource bundle to use (eg foo/bar/customBundle)
- - - - + + + + i18n + + + +

Tag Name: i18n

+

Description

+

+ + Get a resource bundle and place it on the value stack + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

nametrueStringfalseStringName of resource bundle to use (eg foo/bar/customBundle)
+ + + + diff --git a/core/src/site/resources/tags/if.html b/core/src/site/resources/tags/if.html index fa8283772..0d5386f2e 100644 --- a/core/src/site/resources/tags/if.html +++ b/core/src/site/resources/tags/if.html @@ -1,42 +1,42 @@ - - - - if - - - -

Tag Name: if

-

Description

-

- - If tag - -

- -

Attributes

- - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

testtruefalseBooleanExpression to determine if body of tag is to be displayed
- - - - + + + + if + + + +

Tag Name: if

+

Description

+

+ + If tag + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

testtruefalseBooleanExpression to determine if body of tag is to be displayed
+ + + + diff --git a/core/src/site/resources/tags/include.html b/core/src/site/resources/tags/include.html index 616b4ebb8..f1be249af 100644 --- a/core/src/site/resources/tags/include.html +++ b/core/src/site/resources/tags/include.html @@ -1,42 +1,42 @@ - - - - include - - - -

Tag Name: include

-

Description

-

- - Include a servlet's output (result of servlet or a JSP page) - -

- -

Attributes

- - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

valuetruefalseStringThe jsp/servlet output to include
- - - - + + + + include + + + +

Tag Name: include

+

Description

+

+ + Include a servlet's output (result of servlet or a JSP page) + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

valuetruefalseStringThe jsp/servlet output to include
+ + + + diff --git a/core/src/site/resources/tags/inputtransferselect.html b/core/src/site/resources/tags/inputtransferselect.html index 71aa70b33..47b97ee3e 100644 --- a/core/src/site/resources/tags/inputtransferselect.html +++ b/core/src/site/resources/tags/inputtransferselect.html @@ -1,482 +1,482 @@ - - - - inputtransferselect - - - -

Tag Name: inputtransferselect

-

Description

-

- - Renders an input form - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
addLabelfalsefalseStringthe label used for the add button
allowRemoveAllfalsefalseStringDetermine whether the remove all button will display
allowUpDownfalsefalseStringDetermine whether items in the list can be reordered
buttonCssClassfalsefalseStringthe css class used for rendering buttons
buttonCssStylefalsefalseStringthe css style used for rendering buttons
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
downLabelfalsefalseStringthe label used for the down button
headerKeyfalsefalseStringthe header key of the select box
headerValuefalsefalseStringthe header value of the select box
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
leftTitlefalsefalseStringthe left hand title
listtruefalseStringIterable source to populate from. If the list is a Map (key, value), the Map key will become the option 'value' parameter and the Map value will become the option body.
listKeyfalsefalseString Property of list objects to get field value from
listValuefalsefalseStringProperty of list objects to get field content from
multiplefalsefalseStringDetermine whether or not multiple entries are shown
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
removeAllLabelfalsefalseStringthe label used for the remove all button
removeLabelfalsefalseStringthe label used for the remove button
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
rightTitlefalsefalseStringthe right hand title
sizefalsefalseStringthe size of the select box
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
upLabelfalsefalseStringthe label used for the up button
valuefalsefalseStringPreset the value of input element.
- - - - + + + + inputtransferselect + + + +

Tag Name: inputtransferselect

+

Description

+

+ + Renders an input form + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
addLabelfalsefalseStringthe label used for the add button
allowRemoveAllfalsefalseStringDetermine whether the remove all button will display
allowUpDownfalsefalseStringDetermine whether items in the list can be reordered
buttonCssClassfalsefalseStringthe css class used for rendering buttons
buttonCssStylefalsefalseStringthe css style used for rendering buttons
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
downLabelfalsefalseStringthe label used for the down button
headerKeyfalsefalseStringthe header key of the select box
headerValuefalsefalseStringthe header value of the select box
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
leftTitlefalsefalseStringthe left hand title
listtruefalseStringIterable source to populate from. If the list is a Map (key, value), the Map key will become the option 'value' parameter and the Map value will become the option body.
listKeyfalsefalseString Property of list objects to get field value from
listValuefalsefalseStringProperty of list objects to get field content from
multiplefalsefalseStringDetermine whether or not multiple entries are shown
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
removeAllLabelfalsefalseStringthe label used for the remove all button
removeLabelfalsefalseStringthe label used for the remove button
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
rightTitlefalsefalseStringthe right hand title
sizefalsefalseStringthe size of the select box
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
upLabelfalsefalseStringthe label used for the up button
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/iterator.html b/core/src/site/resources/tags/iterator.html index d330bce77..e525fe309 100644 --- a/core/src/site/resources/tags/iterator.html +++ b/core/src/site/resources/tags/iterator.html @@ -1,66 +1,66 @@ - - - - iterator - - - -

Tag Name: iterator

-

Description

-

- - Iterate over a iterable value - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

idfalsefalseStringDeprecated. Use 'var' instead
statusfalsefalsefalseBooleanIf specified, an instanceof IteratorStatus will be pushed into stack upon each iteration
valuefalsefalseStringthe iteratable source to iterate over, else an the object itself will be put into a newly created List
varfalsefalseStringName used to reference the value pushed into the Value Stack
- - - - + + + + iterator + + + +

Tag Name: iterator

+

Description

+

+ + Iterate over a iterable value + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

idfalsefalseStringDeprecated. Use 'var' instead
statusfalsefalsefalseBooleanIf specified, an instanceof IteratorStatus will be pushed into stack upon each iteration
valuefalsefalseStringthe iteratable source to iterate over, else an the object itself will be put into a newly created List
varfalsefalseStringName used to reference the value pushed into the Value Stack
+ + + + diff --git a/core/src/site/resources/tags/label.html b/core/src/site/resources/tags/label.html index 31e437815..7ef269390 100644 --- a/core/src/site/resources/tags/label.html +++ b/core/src/site/resources/tags/label.html @@ -1,346 +1,346 @@ - - - - label - - - -

Tag Name: label

-

Description

-

- - Render a label that displays read-only information - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
forfalsefalseString HTML for attribute
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
- - - - + + + + label + + + +

Tag Name: label

+

Description

+

+ + Render a label that displays read-only information + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
forfalsefalseString HTML for attribute
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/merge.html b/core/src/site/resources/tags/merge.html index 82a9e57f9..cc191fe0d 100644 --- a/core/src/site/resources/tags/merge.html +++ b/core/src/site/resources/tags/merge.html @@ -1,50 +1,50 @@ - - - - merge - - - -

Tag Name: merge

-

Description

-

- - Merge the values of a list of iterators into one iterator - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

idfalsefalseStringDeprecated. Use 'var' instead
varfalsefalseStringThe name where the resultant merged iterator will be stored in the stack's context
- - - - + + + + merge + + + +

Tag Name: merge

+

Description

+

+ + Merge the values of a list of iterators into one iterator + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

idfalsefalseStringDeprecated. Use 'var' instead
varfalsefalseStringThe name where the resultant merged iterator will be stored in the stack's context
+ + + + diff --git a/core/src/site/resources/tags/optgroup.html b/core/src/site/resources/tags/optgroup.html index bd1eee221..acbd52eca 100644 --- a/core/src/site/resources/tags/optgroup.html +++ b/core/src/site/resources/tags/optgroup.html @@ -1,74 +1,74 @@ - - - - optgroup - - - -

Tag Name: optgroup

-

Description

-

- - Renders a Select Tag's OptGroup Tag - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

disabledfalsefalseStringSet the disable attribute.
labelfalsefalseStringSet the label attribute
listfalsefalseStringSet the list attribute.
listKeyfalsefalseStringSet the listKey attribute.
listValuefalsefalseStringSet the listValue attribute.
- - - - + + + + optgroup + + + +

Tag Name: optgroup

+

Description

+

+ + Renders a Select Tag's OptGroup Tag + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

disabledfalsefalseStringSet the disable attribute.
labelfalsefalseStringSet the label attribute
listfalsefalseStringSet the list attribute.
listKeyfalsefalseStringSet the listKey attribute.
listValuefalsefalseStringSet the listValue attribute.
+ + + + diff --git a/core/src/site/resources/tags/optiontransferselect.html b/core/src/site/resources/tags/optiontransferselect.html index e6c3abcb8..dee4e4e79 100644 --- a/core/src/site/resources/tags/optiontransferselect.html +++ b/core/src/site/resources/tags/optiontransferselect.html @@ -1,858 +1,858 @@ - - - - optiontransferselect - - - -

Tag Name: optiontransferselect

-

Description

-

- - Renders an input form - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
addAllToLeftLabelfalsefalseStringSet Add To Left button label
addAllToLeftOnclickfalsefalseStringJavascript to run after Add All To Left button pressed
addAllToRightLabelfalsefalseStringSet Add All To Right button label
addAllToRightOnclickfalsefalseStringJavascript to run after Add All To Right button pressed
addToLeftLabelfalsefalseStringSet Add To Left button label
addToLeftOnclickfalsefalseStringJavascript to run after Add To Left button pressed
addToRightLabelfalsefalseStringSet Add To Right button label
addToRightOnclickfalsefalseStringJavascript to run after Add To Right button pressed
allowAddAllToLeftfalsefalseStringEnable Add All To Left button
allowAddAllToRightfalsefalseStringEnable Add All To Right button
allowAddToLeftfalsefalseStringEnable Add To Left button
allowAddToRightfalsefalseStringEnable Add To Right button
allowSelectAllfalsefalseStringEnable Select All button
allowUpDownOnLeftfalsefalseStringEnable up / down on the left side
allowUpDownOnRightfalsefalseStringEnable up / down on the right side
buttonCssClassfalsefalseStringSet buttons css class
buttonCssStylefalsefalseStringSet button css style
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
doubleAccesskeyfalsefalseStringSet the html accesskey attribute.
doubleCssClassfalsefalseStringThe css class for the second list
doubleCssStylefalsefalseStringThe css style for the second list
doubleDisabledfalsefalseStringDecides if a disable attribute should be added to the second list
doubleEmptyOptionfalsefalseStringDecides if the second list will add an empty option
doubleHeaderKeyfalsefalseStringThe header key for the second list
doubleHeaderValuefalsefalseStringThe header value for the second list
doubleIdfalsefalseStringThe id of the second list
doubleListtruefalseStringThe second iterable source to populate from.
doubleListKeyfalsefalseStringThe key expression to use for second list
doubleListValuefalsefalseStringThe value expression to use for second list
doubleMultiplefalsefalseString Decides if multiple attribute should be set on the second list
doubleNametruefalseStringThe name for complete component
doubleOnblurfalsefalseStringSet the onblur attribute of the second list
doubleOnchangefalsefalseStringSet the onchange attribute of the second list
doubleOnclickfalsefalseStringSet the onclick attribute of the second list
doubleOndblclickfalsefalseStringSet the ondbclick attribute of the second list
doubleOnfocusfalsefalseStringSet the onfocus attribute of the second list
doubleOnkeydownfalsefalseStringSet the onkeydown attribute of the second list
doubleOnkeypressfalsefalseStringSet the onkeypress attribute of the second list
doubleOnkeyupfalsefalseStringSet the onkeyup attribute of the second list
doubleOnmousedownfalsefalseStringSet the onmousedown attribute of the second list
doubleOnmousemovefalsefalseStringSet the onmousemove attribute of the second list
doubleOnmouseoutfalsefalseStringSet the onmouseout attribute of the second list
doubleOnmouseoverfalsefalseStringSet the onmouseover attribute of the second list
doubleOnmouseupfalsefalseStringSet the onmouseup attribute of the second list
doubleOnselectfalsefalseStringSet the onselect attribute of the second list
doubleSizefalsefalseStringSet the size attribute of the second list
doubleValuefalsefalseStringThe value expression for complete component
emptyOptionfalsefalsefalseBooleanDecides of an empty option is to be inserted in the second list
formNamefalsefalseStringThe form name this component resides in and populates to
headerKeyfalsefalseStringSet the header key of the second list. Must not be empty! '-1' and '' is correct, '' is bad.
headerValuefalsefalseString Set the header value of the second list
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
leftDownLabelfalsefalseStringDown label for the left side.
leftTitlefalsefalseStringSet Left title
leftUpLabelfalsefalseStringUp label for the left side
listtruefalseStringIterable source to populate from. If the list is a Map (key, value), the Map key will become the option 'value' parameter and the Map value will become the option body.
listKeyfalsefalseString Property of list objects to get field value from
listValuefalsefalseStringProperty of list objects to get field content from
multiplefalsefalseStringCreates a multiple select. The tag will pre-select multiple values if the values are passed as an Array (of appropriate types) via the value attribute.
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
rightDownLabelfalsefalseStringDown label for the left side.
rightTitlefalsefalseStringSet Right title
rightUpLabelfalsefalseStringUp label for the right side.
selectAllLabelfalsefalseStringSet Select All button label
selectAllOnclickfalsefalseStringJavascript to run after Select All button pressed
sizefalsefalseIntegerSize of the element box (# of elements to show)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
upDownOnLeftOnclickfalsefalseStringJavascript to run after up / down on the left side buttons pressed
upDownOnRightOnclickfalsefalseStringJavascript to run after up / down on the right side buttons pressed
valuefalsefalseStringPreset the value of input element.
- - - - + + + + optiontransferselect + + + +

Tag Name: optiontransferselect

+

Description

+

+ + Renders an input form + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
addAllToLeftLabelfalsefalseStringSet Add To Left button label
addAllToLeftOnclickfalsefalseStringJavascript to run after Add All To Left button pressed
addAllToRightLabelfalsefalseStringSet Add All To Right button label
addAllToRightOnclickfalsefalseStringJavascript to run after Add All To Right button pressed
addToLeftLabelfalsefalseStringSet Add To Left button label
addToLeftOnclickfalsefalseStringJavascript to run after Add To Left button pressed
addToRightLabelfalsefalseStringSet Add To Right button label
addToRightOnclickfalsefalseStringJavascript to run after Add To Right button pressed
allowAddAllToLeftfalsefalseStringEnable Add All To Left button
allowAddAllToRightfalsefalseStringEnable Add All To Right button
allowAddToLeftfalsefalseStringEnable Add To Left button
allowAddToRightfalsefalseStringEnable Add To Right button
allowSelectAllfalsefalseStringEnable Select All button
allowUpDownOnLeftfalsefalseStringEnable up / down on the left side
allowUpDownOnRightfalsefalseStringEnable up / down on the right side
buttonCssClassfalsefalseStringSet buttons css class
buttonCssStylefalsefalseStringSet button css style
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
doubleAccesskeyfalsefalseStringSet the html accesskey attribute.
doubleCssClassfalsefalseStringThe css class for the second list
doubleCssStylefalsefalseStringThe css style for the second list
doubleDisabledfalsefalseStringDecides if a disable attribute should be added to the second list
doubleEmptyOptionfalsefalseStringDecides if the second list will add an empty option
doubleHeaderKeyfalsefalseStringThe header key for the second list
doubleHeaderValuefalsefalseStringThe header value for the second list
doubleIdfalsefalseStringThe id of the second list
doubleListtruefalseStringThe second iterable source to populate from.
doubleListKeyfalsefalseStringThe key expression to use for second list
doubleListValuefalsefalseStringThe value expression to use for second list
doubleMultiplefalsefalseString Decides if multiple attribute should be set on the second list
doubleNametruefalseStringThe name for complete component
doubleOnblurfalsefalseStringSet the onblur attribute of the second list
doubleOnchangefalsefalseStringSet the onchange attribute of the second list
doubleOnclickfalsefalseStringSet the onclick attribute of the second list
doubleOndblclickfalsefalseStringSet the ondbclick attribute of the second list
doubleOnfocusfalsefalseStringSet the onfocus attribute of the second list
doubleOnkeydownfalsefalseStringSet the onkeydown attribute of the second list
doubleOnkeypressfalsefalseStringSet the onkeypress attribute of the second list
doubleOnkeyupfalsefalseStringSet the onkeyup attribute of the second list
doubleOnmousedownfalsefalseStringSet the onmousedown attribute of the second list
doubleOnmousemovefalsefalseStringSet the onmousemove attribute of the second list
doubleOnmouseoutfalsefalseStringSet the onmouseout attribute of the second list
doubleOnmouseoverfalsefalseStringSet the onmouseover attribute of the second list
doubleOnmouseupfalsefalseStringSet the onmouseup attribute of the second list
doubleOnselectfalsefalseStringSet the onselect attribute of the second list
doubleSizefalsefalseStringSet the size attribute of the second list
doubleValuefalsefalseStringThe value expression for complete component
emptyOptionfalsefalsefalseBooleanDecides of an empty option is to be inserted in the second list
formNamefalsefalseStringThe form name this component resides in and populates to
headerKeyfalsefalseStringSet the header key of the second list. Must not be empty! '-1' and '' is correct, '' is bad.
headerValuefalsefalseString Set the header value of the second list
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
leftDownLabelfalsefalseStringDown label for the left side.
leftTitlefalsefalseStringSet Left title
leftUpLabelfalsefalseStringUp label for the left side
listtruefalseStringIterable source to populate from. If the list is a Map (key, value), the Map key will become the option 'value' parameter and the Map value will become the option body.
listKeyfalsefalseString Property of list objects to get field value from
listValuefalsefalseStringProperty of list objects to get field content from
multiplefalsefalseStringCreates a multiple select. The tag will pre-select multiple values if the values are passed as an Array (of appropriate types) via the value attribute.
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
rightDownLabelfalsefalseStringDown label for the left side.
rightTitlefalsefalseStringSet Right title
rightUpLabelfalsefalseStringUp label for the right side.
selectAllLabelfalsefalseStringSet Select All button label
selectAllOnclickfalsefalseStringJavascript to run after Select All button pressed
sizefalsefalseIntegerSize of the element box (# of elements to show)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
upDownOnLeftOnclickfalsefalseStringJavascript to run after up / down on the left side buttons pressed
upDownOnRightOnclickfalsefalseStringJavascript to run after up / down on the right side buttons pressed
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/param.html b/core/src/site/resources/tags/param.html index 59dcb8a74..b42371631 100644 --- a/core/src/site/resources/tags/param.html +++ b/core/src/site/resources/tags/param.html @@ -1,50 +1,50 @@ - - - - param - - - -

Tag Name: param

-

Description

-

- - Parametrize other tags - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

namefalsefalseStringName of Parameter to set
valuefalseThe value of evaluating provided name against stackfalseStringValue expression for Parameter to set
- - - - + + + + param + + + +

Tag Name: param

+

Description

+

+ + Parametrize other tags + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

namefalsefalseStringName of Parameter to set
valuefalseThe value of evaluating provided name against stackfalseStringValue expression for Parameter to set
+ + + + diff --git a/core/src/site/resources/tags/password.html b/core/src/site/resources/tags/password.html index 307e08189..a23215b66 100644 --- a/core/src/site/resources/tags/password.html +++ b/core/src/site/resources/tags/password.html @@ -1,378 +1,378 @@ - - - - password - - - -

Tag Name: password

-

Description

-

- - Render an HTML input tag of type password - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
maxLengthfalsefalseIntegerDeprecated. Use maxlength instead.
maxlengthfalsefalseIntegerHTML maxlength attribute
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
readonlyfalsefalsefalseBooleanWhether the input is readonly
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
showPasswordfalsefalsefalseBooleanWhether to show input
sizefalsefalseIntegerHTML size attribute
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
- - - - + + + + password + + + +

Tag Name: password

+

Description

+

+ + Render an HTML input tag of type password + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
maxLengthfalsefalseIntegerDeprecated. Use maxlength instead.
maxlengthfalsefalseIntegerHTML maxlength attribute
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
readonlyfalsefalsefalseBooleanWhether the input is readonly
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
showPasswordfalsefalsefalseBooleanWhether to show input
sizefalsefalseIntegerHTML size attribute
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/property.html b/core/src/site/resources/tags/property.html index de2390244..7de6263b8 100644 --- a/core/src/site/resources/tags/property.html +++ b/core/src/site/resources/tags/property.html @@ -1,58 +1,58 @@ - - - - property - - - -

Tag Name: property

-

Description

-

- - Print out expression which evaluates against the stack - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

defaultfalsefalseStringThe default value to be used if value attribute is null
escapefalsetruefalseBoolean Whether to escape HTML
valuefalse<top of stack>falseObjectValue to be displayed
- - - - + + + + property + + + +

Tag Name: property

+

Description

+

+ + Print out expression which evaluates against the stack + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

defaultfalsefalseStringThe default value to be used if value attribute is null
escapefalsetruefalseBoolean Whether to escape HTML
valuefalse<top of stack>falseObjectValue to be displayed
+ + + + diff --git a/core/src/site/resources/tags/push.html b/core/src/site/resources/tags/push.html index 06711734a..ba47fdca0 100644 --- a/core/src/site/resources/tags/push.html +++ b/core/src/site/resources/tags/push.html @@ -1,42 +1,42 @@ - - - - push - - - -

Tag Name: push

-

Description

-

- - Push value on stack for simplified usage. - -

- -

Attributes

- - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

valuetruefalseStringValue to push on stack
- - - - + + + + push + + + +

Tag Name: push

+

Description

+

+ + Push value on stack for simplified usage. + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

valuetruefalseStringValue to push on stack
+ + + + diff --git a/core/src/site/resources/tags/radio.html b/core/src/site/resources/tags/radio.html index 360a2b281..bc0b2e0e4 100644 --- a/core/src/site/resources/tags/radio.html +++ b/core/src/site/resources/tags/radio.html @@ -1,362 +1,362 @@ - - - - radio - - - -

Tag Name: radio

-

Description

-

- - Renders a radio button input field - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
listtruefalseStringIterable source to populate from. If the list is a Map (key, value), the Map key will become the option 'value' parameter and the Map value will become the option body.
listKeyfalsefalseString Property of list objects to get field value from
listValuefalsefalseStringProperty of list objects to get field content from
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
- - - - + + + + radio + + + +

Tag Name: radio

+

Description

+

+ + Renders a radio button input field + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
listtruefalseStringIterable source to populate from. If the list is a Map (key, value), the Map key will become the option 'value' parameter and the Map value will become the option body.
listKeyfalsefalseString Property of list objects to get field value from
listValuefalsefalseStringProperty of list objects to get field content from
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/reset.html b/core/src/site/resources/tags/reset.html index e13fffc2a..7a6114378 100644 --- a/core/src/site/resources/tags/reset.html +++ b/core/src/site/resources/tags/reset.html @@ -1,370 +1,370 @@ - - - - reset - - - -

Tag Name: reset

-

Description

-

- - Render a reset button - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
actionfalsefalseStringSet action attribute.
alignfalsefalseStringHTML align attribute.
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringSupply a reset button text apart from reset value. Will have no effect for input type reset, since button text will always be the value parameter.
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
methodfalsefalseStringSet method attribute.
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
typefalseinputfalseStringThe type of submit to use. Valid values are input, button and image.
valuefalsefalseStringPreset the value of input element.
- - - - + + + + reset + + + +

Tag Name: reset

+

Description

+

+ + Render a reset button + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
actionfalsefalseStringSet action attribute.
alignfalsefalseStringHTML align attribute.
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringSupply a reset button text apart from reset value. Will have no effect for input type reset, since button text will always be the value parameter.
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
methodfalsefalseStringSet method attribute.
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
typefalseinputfalseStringThe type of submit to use. Valid values are input, button and image.
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/select.html b/core/src/site/resources/tags/select.html index 8b8ad0f4c..332af5b0c 100644 --- a/core/src/site/resources/tags/select.html +++ b/core/src/site/resources/tags/select.html @@ -1,402 +1,402 @@ - - - - select - - - -

Tag Name: select

-

Description

-

- - Render a select element - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
emptyOptionfalsefalsefalseBooleanWhether or not to add an empty (--) option after the header option
headerKeyfalsefalseString Key for first item in list. Must not be empty! '-1' and '' is correct, '' is bad.
headerValuefalsefalseStringValue expression for first item in list
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
listtruefalseStringIterable source to populate from. If the list is a Map (key, value), the Map key will become the option 'value' parameter and the Map value will become the option body.
listKeyfalsefalseString Property of list objects to get field value from
listValuefalsefalseStringProperty of list objects to get field content from
multiplefalsefalsefalseBoolean Creates a multiple select. The tag will pre-select multiple values if the values are passed as an Array or a Collection(of appropriate types) via the value attribute. If one of the keys equals one of the values in the Collection or Array it wil be selected
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
sizefalsefalseIntegerSize of the element box (# of elements to show)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
- - - - + + + + select + + + +

Tag Name: select

+

Description

+

+ + Render a select element + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
emptyOptionfalsefalsefalseBooleanWhether or not to add an empty (--) option after the header option
headerKeyfalsefalseString Key for first item in list. Must not be empty! '-1' and '' is correct, '' is bad.
headerValuefalsefalseStringValue expression for first item in list
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
listtruefalseStringIterable source to populate from. If the list is a Map (key, value), the Map key will become the option 'value' parameter and the Map value will become the option body.
listKeyfalsefalseString Property of list objects to get field value from
listValuefalsefalseStringProperty of list objects to get field content from
multiplefalsefalsefalseBoolean Creates a multiple select. The tag will pre-select multiple values if the values are passed as an Array or a Collection(of appropriate types) via the value attribute. If one of the keys equals one of the values in the Collection or Array it wil be selected
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
sizefalsefalseIntegerSize of the element box (# of elements to show)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/set.html b/core/src/site/resources/tags/set.html index d24527f11..7d1b37bc3 100644 --- a/core/src/site/resources/tags/set.html +++ b/core/src/site/resources/tags/set.html @@ -1,74 +1,74 @@ - - - - set - - - -

Tag Name: set

-

Description

-

- - Assigns a value to a variable in a specified scope - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

idfalsefalseStringDeprecated. Use 'var' instead
namefalsefalseStringDeprecated. Use 'var' instead
scopefalseactionfalseStringThe scope in which to assign the variable. Can be application, session, request, page, or action.
valuefalsefalseStringThe value that is assigned to the variable named name
varfalsefalseStringName used to reference the value pushed into the Value Stack
- - - - + + + + set + + + +

Tag Name: set

+

Description

+

+ + Assigns a value to a variable in a specified scope + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

idfalsefalseStringDeprecated. Use 'var' instead
namefalsefalseStringDeprecated. Use 'var' instead
scopefalseactionfalseStringThe scope in which to assign the variable. Can be application, session, request, page, or action.
valuefalsefalseStringThe value that is assigned to the variable named name
varfalsefalseStringName used to reference the value pushed into the Value Stack
+ + + + diff --git a/core/src/site/resources/tags/sort.html b/core/src/site/resources/tags/sort.html index 3271ca3ef..79ab3c024 100644 --- a/core/src/site/resources/tags/sort.html +++ b/core/src/site/resources/tags/sort.html @@ -1,66 +1,66 @@ - - - - sort - - - -

Tag Name: sort

-

Description

-

- - Sort a List using a Comparator both passed in as the tag attribute. - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

comparatortruefalsejava.util.ComparatorThe comparator to use
idfalsefalseStringDeprecated. Use 'var' instead
sourcefalsefalseStringThe iterable source to sort
varfalsefalseStringThe name to store the resultant iterator into page context, if such name is supplied
- - - - + + + + sort + + + +

Tag Name: sort

+

Description

+

+ + Sort a List using a Comparator both passed in as the tag attribute. + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

comparatortruefalsejava.util.ComparatorThe comparator to use
idfalsefalseStringDeprecated. Use 'var' instead
sourcefalsefalseStringThe iterable source to sort
varfalsefalseStringThe name to store the resultant iterator into page context, if such name is supplied
+ + + + diff --git a/core/src/site/resources/tags/submit.html b/core/src/site/resources/tags/submit.html index e33686322..a2566728f 100644 --- a/core/src/site/resources/tags/submit.html +++ b/core/src/site/resources/tags/submit.html @@ -1,378 +1,378 @@ - - - - submit - - - -

Tag Name: submit

-

Description

-

- - Render a submit button - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
actionfalsefalseStringSet action attribute.
alignfalsefalseStringHTML align attribute.
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
methodfalsefalseStringSet method attribute.
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
srcfalsefalseStringSupply an image src for image type submit button. Will have no effect for types input and button.
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
typefalseinputfalseStringThe type of submit to use. Valid values are input, button and image.
valuefalsefalseStringPreset the value of input element.
- - - - + + + + submit + + + +

Tag Name: submit

+

Description

+

+ + Render a submit button + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
actionfalsefalseStringSet action attribute.
alignfalsefalseStringHTML align attribute.
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
methodfalsefalseStringSet method attribute.
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
srcfalsefalseStringSupply an image src for image type submit button. Will have no effect for types input and button.
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
typefalseinputfalseStringThe type of submit to use. Valid values are input, button and image.
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/subset.html b/core/src/site/resources/tags/subset.html index b2cc189d8..2ce4b8f8c 100644 --- a/core/src/site/resources/tags/subset.html +++ b/core/src/site/resources/tags/subset.html @@ -1,82 +1,82 @@ - - - - subset - - - -

Tag Name: subset

-

Description

-

- - Takes an iterator and outputs a subset of it. - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

countfalsefalseIntegerIndicate the number of entries to be in the resulting subset iterator
deciderfalsefalseorg.apache.struts2.util.SubsetIteratorFilter.DeciderExtension to plug-in a decider to determine if that particular entry is to be included in the resulting subset iterator
idfalsefalseStringDeprecated. Use 'var' instead
sourcefalsefalseStringIndicate the source of which the resulting subset iterator is to be derived base on
startfalsefalseIntegerIndicate the starting index (eg. first entry is 0) of entries in the source to be available as the first entry in the resulting subset iterator
varfalsefalseStringThe name to store the resultant iterator into page context, if such name is supplied
- - - - + + + + subset + + + +

Tag Name: subset

+

Description

+

+ + Takes an iterator and outputs a subset of it. + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

countfalsefalseIntegerIndicate the number of entries to be in the resulting subset iterator
deciderfalsefalseorg.apache.struts2.util.SubsetIteratorFilter.DeciderExtension to plug-in a decider to determine if that particular entry is to be included in the resulting subset iterator
idfalsefalseStringDeprecated. Use 'var' instead
sourcefalsefalseStringIndicate the source of which the resulting subset iterator is to be derived base on
startfalsefalseIntegerIndicate the starting index (eg. first entry is 0) of entries in the source to be available as the first entry in the resulting subset iterator
varfalsefalseStringThe name to store the resultant iterator into page context, if such name is supplied
+ + + + diff --git a/core/src/site/resources/tags/text.html b/core/src/site/resources/tags/text.html index c007ba49c..0a85503f7 100644 --- a/core/src/site/resources/tags/text.html +++ b/core/src/site/resources/tags/text.html @@ -1,58 +1,58 @@ - - - - text - - - -

Tag Name: text

-

Description

-

- - Render a I18n text message - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

idfalsefalseStringDeprecated. Use 'var' instead
nametruefalseString Name of resource property to fetch
varfalsefalseStringName used to reference the value pushed into the Value Stack
- - - - + + + + text + + + +

Tag Name: text

+

Description

+

+ + Render a I18n text message + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

idfalsefalseStringDeprecated. Use 'var' instead
nametruefalseString Name of resource property to fetch
varfalsefalseStringName used to reference the value pushed into the Value Stack
+ + + + diff --git a/core/src/site/resources/tags/textarea.html b/core/src/site/resources/tags/textarea.html index d5d1e56a2..067473348 100644 --- a/core/src/site/resources/tags/textarea.html +++ b/core/src/site/resources/tags/textarea.html @@ -1,370 +1,370 @@ - - - - textarea - - - -

Tag Name: textarea

-

Description

-

- - Render HTML textarea tag. - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
colsfalsefalseIntegerHTML cols attribute
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
readonlyfalsefalsefalseBooleanWhether the textarea is readonly
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
rowsfalsefalseIntegerHTML rows attribute
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
wrapfalsefalseStringHTML wrap attribute
- - - - + + + + textarea + + + +

Tag Name: textarea

+

Description

+

+ + Render HTML textarea tag. + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
colsfalsefalseIntegerHTML cols attribute
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
readonlyfalsefalsefalseBooleanWhether the textarea is readonly
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
rowsfalsefalseIntegerHTML rows attribute
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
wrapfalsefalseStringHTML wrap attribute
+ + + + diff --git a/core/src/site/resources/tags/textfield.html b/core/src/site/resources/tags/textfield.html index b921292d7..99bba01f8 100644 --- a/core/src/site/resources/tags/textfield.html +++ b/core/src/site/resources/tags/textfield.html @@ -1,370 +1,370 @@ - - - - textfield - - - -

Tag Name: textfield

-

Description

-

- - Render an HTML input field of type text - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
maxLengthfalsefalseIntegerDeprecated. Use maxlength instead.
maxlengthfalsefalseIntegerHTML maxlength attribute
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
readonlyfalsefalsefalseBooleanWhether the input is readonly
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
sizefalsefalseIntegerHTML size attribute
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
- - - - + + + + textfield + + + +

Tag Name: textfield

+

Description

+

+ + Render an HTML input field of type text + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
maxLengthfalsefalseIntegerDeprecated. Use maxlength instead.
maxlengthfalsefalseIntegerHTML maxlength attribute
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
readonlyfalsefalsefalseBooleanWhether the input is readonly
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
sizefalsefalseIntegerHTML size attribute
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/token.html b/core/src/site/resources/tags/token.html index bd2331118..db5b32ab1 100644 --- a/core/src/site/resources/tags/token.html +++ b/core/src/site/resources/tags/token.html @@ -1,338 +1,338 @@ - - - - token - - - -

Tag Name: token

-

Description

-

- - Stop double-submission of forms - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
- - - - + + + + token + + + +

Tag Name: token

+

Description

+

+ + Stop double-submission of forms + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/updownselect.html b/core/src/site/resources/tags/updownselect.html index a2904a216..833d8c0a4 100644 --- a/core/src/site/resources/tags/updownselect.html +++ b/core/src/site/resources/tags/updownselect.html @@ -1,450 +1,450 @@ - - - - updownselect - - - -

Tag Name: updownselect

-

Description

-

- - Create a Select component with buttons to move the elements in the select component up and down - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
allowMoveDownfalsetruefalseBooleanWhether move down button should be displayed
allowMoveUpfalsetruefalseBooleanWhether move up button should be displayed
allowSelectAllfalsetruefalseBooleanWhether or not select all button should be displayed
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
emptyOptionfalsefalsefalseBooleanWhether or not to add an empty (--) option after the header option
headerKeyfalsefalseString Key for first item in list. Must not be empty! '-1' and '' is correct, '' is bad.
headerValuefalsefalseStringValue expression for first item in list
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
listtruefalseStringIterable source to populate from. If the list is a Map (key, value), the Map key will become the option 'value' parameter and the Map value will become the option body.
listKeyfalsefalseString Property of list objects to get field value from
listValuefalsefalseStringProperty of list objects to get field content from
moveDownLabelfalsevfalseStringText to display on the move down button
moveUpLabelfalse^falseStringText to display on the move up button
multiplefalsefalsefalseBoolean Creates a multiple select. The tag will pre-select multiple values if the values are passed as an Array or a Collection(of appropriate types) via the value attribute. If one of the keys equals one of the values in the Collection or Array it wil be selected
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
selectAllLabelfalse*falseStringText to display on the select all button
sizefalsefalseIntegerSize of the element box (# of elements to show)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
- - - - + + + + updownselect + + + +

Tag Name: updownselect

+

Description

+

+ + Create a Select component with buttons to move the elements in the select component up and down + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
allowMoveDownfalsetruefalseBooleanWhether move down button should be displayed
allowMoveUpfalsetruefalseBooleanWhether move up button should be displayed
allowSelectAllfalsetruefalseBooleanWhether or not select all button should be displayed
cssClassfalsefalseStringThe css class to use for element
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
emptyOptionfalsefalsefalseBooleanWhether or not to add an empty (--) option after the header option
headerKeyfalsefalseString Key for first item in list. Must not be empty! '-1' and '' is correct, '' is bad.
headerValuefalsefalseStringValue expression for first item in list
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering a element specific label
labelSeparatorfalse:falseStringString that will be appended to the labe
labelpositionfalsefalseStringDefine label position of form element (top/left)
listtruefalseStringIterable source to populate from. If the list is a Map (key, value), the Map key will become the option 'value' parameter and the Map value will become the option body.
listKeyfalsefalseString Property of list objects to get field value from
listValuefalsefalseStringProperty of list objects to get field content from
moveDownLabelfalsevfalseStringText to display on the move down button
moveUpLabelfalse^falseStringText to display on the move up button
multiplefalsefalsefalseBoolean Creates a multiple select. The tag will pre-select multiple values if the values are passed as an Array or a Collection(of appropriate types) via the value attribute. If one of the keys equals one of the values in the Collection or Array it wil be selected
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
requiredfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredpositionfalsefalseStringDefine required position of required form element (left|right)
selectAllLabelfalse*falseStringText to display on the select all button
sizefalsefalseIntegerSize of the element box (# of elements to show)
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
valuefalsefalseStringPreset the value of input element.
+ + + + diff --git a/core/src/site/resources/tags/url.html b/core/src/site/resources/tags/url.html index 151ac2c8c..01fe4aff9 100644 --- a/core/src/site/resources/tags/url.html +++ b/core/src/site/resources/tags/url.html @@ -1,162 +1,162 @@ - - - - url - - - -

Tag Name: url

-

Description

-

- - This tag is used to create a URL - -

- -

Attributes

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

Required

Default

Evaluated

Type

Description

actionfalsefalseStringThe action to generate the URL for, if not using value
anchorfalsefalseStringThe anchor for this URL
encodefalsetruefalseBooleanWhether to encode parameters
escapeAmpfalsetruefalseBooleanSpecifies whether to escape ampersand (&) to (&amp;) or not
forceAddSchemeHostAndPortfalsefalsefalseBooleanSpecifies whether to force the addition of scheme, host and port or not
idfalsefalseStringDeprecated. Use 'var' instead
includeContextfalsetruefalseBooleanWhether actual context should be included in URL
includeParamsfalsegetfalseStringThe includeParams attribute may have the value 'none', 'get' or 'all'
methodfalsefalseStringThe method of action to use
namespacefalsefalseStringThe namespace to use
portletModefalsefalseStringThe resulting portlet mode
portletUrlTypefalsefalseStringSpecifies if this should be a portlet render or action URL. Default is "render". To create an action URL, use "action".
schemefalsefalseStringSet scheme attribute
valuefalsefalseStringThe target value to use, if not using action
varfalsefalseStringName used to reference the value pushed into the Value Stack
windowStatefalsefalseStringThe resulting portlet window state
- - - - + + + + url + + + +

Tag Name: url

+

Description

+

+ + This tag is used to create a URL + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

actionfalsefalseStringThe action to generate the URL for, if not using value
anchorfalsefalseStringThe anchor for this URL
encodefalsetruefalseBooleanWhether to encode parameters
escapeAmpfalsetruefalseBooleanSpecifies whether to escape ampersand (&) to (&amp;) or not
forceAddSchemeHostAndPortfalsefalsefalseBooleanSpecifies whether to force the addition of scheme, host and port or not
idfalsefalseStringDeprecated. Use 'var' instead
includeContextfalsetruefalseBooleanWhether actual context should be included in URL
includeParamsfalsegetfalseStringThe includeParams attribute may have the value 'none', 'get' or 'all'
methodfalsefalseStringThe method of action to use
namespacefalsefalseStringThe namespace to use
portletModefalsefalseStringThe resulting portlet mode
portletUrlTypefalsefalseStringSpecifies if this should be a portlet render or action URL. Default is "render". To create an action URL, use "action".
schemefalsefalseStringSet scheme attribute
valuefalsefalseStringThe target value to use, if not using action
varfalsefalseStringName used to reference the value pushed into the Value Stack
windowStatefalsefalseStringThe resulting portlet window state
+ + + + diff --git a/core/src/test/java/org/apache/struts2/SomeEnum.java b/core/src/test/java/org/apache/struts2/SomeEnum.java index 35653bc48..2b3164f93 100644 --- a/core/src/test/java/org/apache/struts2/SomeEnum.java +++ b/core/src/test/java/org/apache/struts2/SomeEnum.java @@ -1,5 +1,5 @@ /* - * $Id: RequestUtils.java 471717 2006-11-06 12:50:18Z husted $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/test/java/org/apache/struts2/TestUtils.java b/core/src/test/java/org/apache/struts2/TestUtils.java index 15d500290..e888c1250 100644 --- a/core/src/test/java/org/apache/struts2/TestUtils.java +++ b/core/src/test/java/org/apache/struts2/TestUtils.java @@ -1,5 +1,5 @@ /* - * $Id: TestResult.java 471756 2006-11-06 15:01:43Z husted $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/test/java/org/apache/struts2/components/ActionComponentTest.java b/core/src/test/java/org/apache/struts2/components/ActionComponentTest.java index 027724423..8c7efa6a0 100644 --- a/core/src/test/java/org/apache/struts2/components/ActionComponentTest.java +++ b/core/src/test/java/org/apache/struts2/components/ActionComponentTest.java @@ -1,5 +1,5 @@ /* - * $Id: ComponentTest.java 471756 2006-11-06 15:01:43Z husted $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/core/src/test/java/org/apache/struts2/views/freemarker/FreeMarkerResultTest.java b/core/src/test/java/org/apache/struts2/views/freemarker/FreeMarkerResultTest.java index 83664b272..2f252723c 100644 --- a/core/src/test/java/org/apache/struts2/views/freemarker/FreeMarkerResultTest.java +++ b/core/src/test/java/org/apache/struts2/views/freemarker/FreeMarkerResultTest.java @@ -1,120 +1,120 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.views.freemarker; - -import java.io.PrintWriter; -import java.io.StringWriter; - -import junit.framework.TestCase; - -import org.apache.struts2.ServletActionContext; -import org.apache.struts2.StrutsStatics; -import org.apache.struts2.StrutsTestCase; -import org.apache.struts2.views.jsp.StrutsMockHttpServletResponse; -import org.apache.struts2.views.jsp.StrutsMockServletContext; -import org.springframework.mock.web.MockHttpServletRequest; - -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.mock.MockActionInvocation; -import com.opensymphony.xwork2.util.ValueStack; -import com.opensymphony.xwork2.util.ValueStackFactory; - -/** - * Test case for FreeMarkerResult. - * - */ -public class FreeMarkerResultTest extends StrutsTestCase { - - ValueStack stack; - MockActionInvocation invocation; - ActionContext context; - StrutsMockHttpServletResponse response; - PrintWriter writer; - StringWriter stringWriter; - StrutsMockServletContext servletContext; - private FreemarkerManager mgr; - private MockHttpServletRequest request; - - public void testWriteIfCompleted() throws Exception { - FreemarkerResult result = new FreemarkerResult(); - result.setLocation("someFreeMarkerFile.ftl"); - result.setFreemarkerManager(mgr); - result.setWriteIfCompleted(true); - - try { - result.execute(invocation); - assertTrue(false); - } catch (Exception e) { - assertEquals(0, stringWriter.getBuffer().length()); - } - } - - public void testWithoutWriteIfCompleted() throws Exception { - FreemarkerResult result = new FreemarkerResult(); - result.setLocation("someFreeMarkerFile.ftl"); - result.setFreemarkerManager(mgr); - - try { - result.execute(invocation); - assertTrue(false); - } catch (Exception e) { - assertTrue(stringWriter.getBuffer().length() > 0); - } - } - - protected void setUp() throws Exception { - super.setUp(); - mgr = new FreemarkerManager(); - mgr.setEncoding("UTF-8"); - stringWriter = new StringWriter(); - writer = new PrintWriter(stringWriter); - response = new StrutsMockHttpServletResponse(); - response.setWriter(writer); - request = new MockHttpServletRequest(); - servletContext = new StrutsMockServletContext(); - stack = ActionContext.getContext().getValueStack(); - context = new ActionContext(stack.getContext()); - context.put(StrutsStatics.HTTP_RESPONSE, response); - context.put(StrutsStatics.HTTP_REQUEST, request); - context.put(StrutsStatics.SERVLET_CONTEXT, servletContext); - ServletActionContext.setServletContext(servletContext); - ServletActionContext.setRequest(request); - ServletActionContext.setResponse(response); - servletContext.setAttribute(FreemarkerManager.CONFIG_SERVLET_CONTEXT_KEY, null); - invocation = new MockActionInvocation(); - invocation.setStack(stack); - invocation.setInvocationContext(context); - servletContext.setRealPath(FreeMarkerResultTest.class.getResource( - "someFreeMarkerFile.ftl").getFile()); - } - - protected void tearDown() throws Exception { - stack = null; - invocation = null; - context = null; - response = null; - writer = null; - stringWriter = null; - servletContext = null; - - super.tearDown(); - } -} +/* + * $Id$ + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.struts2.views.freemarker; + +import java.io.PrintWriter; +import java.io.StringWriter; + +import junit.framework.TestCase; + +import org.apache.struts2.ServletActionContext; +import org.apache.struts2.StrutsStatics; +import org.apache.struts2.StrutsTestCase; +import org.apache.struts2.views.jsp.StrutsMockHttpServletResponse; +import org.apache.struts2.views.jsp.StrutsMockServletContext; +import org.springframework.mock.web.MockHttpServletRequest; + +import com.opensymphony.xwork2.ActionContext; +import com.opensymphony.xwork2.mock.MockActionInvocation; +import com.opensymphony.xwork2.util.ValueStack; +import com.opensymphony.xwork2.util.ValueStackFactory; + +/** + * Test case for FreeMarkerResult. + * + */ +public class FreeMarkerResultTest extends StrutsTestCase { + + ValueStack stack; + MockActionInvocation invocation; + ActionContext context; + StrutsMockHttpServletResponse response; + PrintWriter writer; + StringWriter stringWriter; + StrutsMockServletContext servletContext; + private FreemarkerManager mgr; + private MockHttpServletRequest request; + + public void testWriteIfCompleted() throws Exception { + FreemarkerResult result = new FreemarkerResult(); + result.setLocation("someFreeMarkerFile.ftl"); + result.setFreemarkerManager(mgr); + result.setWriteIfCompleted(true); + + try { + result.execute(invocation); + assertTrue(false); + } catch (Exception e) { + assertEquals(0, stringWriter.getBuffer().length()); + } + } + + public void testWithoutWriteIfCompleted() throws Exception { + FreemarkerResult result = new FreemarkerResult(); + result.setLocation("someFreeMarkerFile.ftl"); + result.setFreemarkerManager(mgr); + + try { + result.execute(invocation); + assertTrue(false); + } catch (Exception e) { + assertTrue(stringWriter.getBuffer().length() > 0); + } + } + + protected void setUp() throws Exception { + super.setUp(); + mgr = new FreemarkerManager(); + mgr.setEncoding("UTF-8"); + stringWriter = new StringWriter(); + writer = new PrintWriter(stringWriter); + response = new StrutsMockHttpServletResponse(); + response.setWriter(writer); + request = new MockHttpServletRequest(); + servletContext = new StrutsMockServletContext(); + stack = ActionContext.getContext().getValueStack(); + context = new ActionContext(stack.getContext()); + context.put(StrutsStatics.HTTP_RESPONSE, response); + context.put(StrutsStatics.HTTP_REQUEST, request); + context.put(StrutsStatics.SERVLET_CONTEXT, servletContext); + ServletActionContext.setServletContext(servletContext); + ServletActionContext.setRequest(request); + ServletActionContext.setResponse(response); + servletContext.setAttribute(FreemarkerManager.CONFIG_SERVLET_CONTEXT_KEY, null); + invocation = new MockActionInvocation(); + invocation.setStack(stack); + invocation.setInvocationContext(context); + servletContext.setRealPath(FreeMarkerResultTest.class.getResource( + "someFreeMarkerFile.ftl").getFile()); + } + + protected void tearDown() throws Exception { + stack = null; + invocation = null; + context = null; + response = null; + writer = null; + stringWriter = null; + servletContext = null; + + super.tearDown(); + } +} diff --git a/core/src/test/resources/XSLTResultTest.xsl b/core/src/test/resources/XSLTResultTest.xsl index 4d25dbd70..0d97e1525 100644 --- a/core/src/test/resources/XSLTResultTest.xsl +++ b/core/src/test/resources/XSLTResultTest.xsl @@ -1,6 +1,6 @@ -Text - +<#-- +/* + * $Id$ + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +--> +Text + <#if something>out \ No newline at end of file diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Anchor-2.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Anchor-2.txt index aff7247cb..bd1214e5c 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Anchor-2.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Anchor-2.txt @@ -1,5 +1,5 @@ - - + + diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/ComboBox-4.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/ComboBox-4.txt index d4483fc79..2ccd24e0c 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/ComboBox-4.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/ComboBox-4.txt @@ -1,14 +1,14 @@ - - - - -
- - - + + + + +
+ + + diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/DoubleSelect-3.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/DoubleSelect-3.txt index 6778f5dff..0e178ffb8 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/DoubleSelect-3.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/DoubleSelect-3.txt @@ -1,41 +1,41 @@ - - - - -
- - - - + + + + +
+ + + + diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-12.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-12.txt index 0d88de79f..6e7cff122 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-12.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-12.txt @@ -1,13 +1,13 @@ -
- -
-
- - \ No newline at end of file diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Select-12.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Select-12.txt index a3b44f18b..0993e4bff 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Select-12.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Select-12.txt @@ -1,8 +1,8 @@ - - - - + + + + diff --git a/core/src/test/resources/struts.properties b/core/src/test/resources/struts.properties index f35055326..e00c4e9c6 100644 --- a/core/src/test/resources/struts.properties +++ b/core/src/test/resources/struts.properties @@ -1,4 +1,4 @@ -# $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $ +# $Id$ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file diff --git a/core/src/test/resources/struts.xml b/core/src/test/resources/struts.xml index 5257a6c76..c75b604c1 100644 --- a/core/src/test/resources/struts.xml +++ b/core/src/test/resources/struts.xml @@ -1,6 +1,6 @@ - *

The autocomplete tag is a combobox that can autocomplete text entered on the input box. If an action - * is used to populate the autocompleter, the output of the action must be a well formed JSON string.

- *

The autocompleter follows this rule to find its datasource:

- *

1. If the response is an array, assume that it contains 2-dimension array elements, like: - *

- * [
- *      ["Alabama", "AL"],
- *      ["Alaska", "AK"]
- * ]
- * 
- *

2. If a value is specified in the "dataFieldName" attribute, and the response has a field with that - * name, assume that's the datasource, which can be an array of 2-dimension array elements, or a map, - * like (assuming dataFieldName="state"):

- *
- * {
- *      "state" : [
- *           ["Alabama","AL"],
- *           ["Alaska","AK"]
- *      ]
- * }     
- * or
- * {
- *      "state" : {
- *            "Alabama" : "AL",
- *            "Alaska" : "AK"
- *      }
- * }
- * 
- *
- *

3. If there is a field that starts with the value specified on the "name" attribute, assume - * that's the datasource, like (assuming name="state"):

- *
- * {
- *      "states" : [
- *           ["Alabama","AL"],
- *           ["Alaska","AK"]
- *      ]
- * }
- * 
- *

4. Use first array that is found, like:

- *

- * {
- *      "anything" : [
- *            ["Alabama", "AL"],
- *            ["Alaska", "AK"]
- *     ]       
- * }
- * 

5. If the response is a map, use it (recommended as it is the easiest one to generate): - *

- * {
- *      "Alabama" : "AL",
- *      "Alaska" : "AK"
- * }
- * 
- * - *

Examples

- * - * <sx:autocompleter name="autocompleter1" href="%{jsonList}"/> - * - * - * - * <s:autocompleter name="test" list="{'apple','banana','grape','pear'}" autoComplete="false"/> - * - * - * - * <sx:autocompleter name="mvc" href="%{jsonList}" loadOnTextChange="true" loadMinimumCount="3"/> - * - * The text entered on the autocompleter is passed as a parameter to the url specified in "href", like (text is "struts"): - * - * http://host/example/myaction.do?mvc=struts - * - * - * - * <form id="selectForm"> - * <sx:autocompleter name="select" list="{'fruits','colors'}" valueNotifyTopics="/changed" /> - * </form> - * <sx:autocompleter href="%{jsonList}" formId="selectForm" listenTopics="/changed"/> - * - * - * - * <sx:autocompleter href="%{jsonList}" id="auto"/> - * <script type="text/javascript"> - * function getValues() { - * var autoCompleter = dojo.widget.byId("auto"); - * - * //key (in the states example above, "AL") - * var key = autoCompleter.getSelectedKey(); - * alert(key); - * - * //value (in the states example above, "Alabama") - * var value = autoCompleter.getSelectedValue(); - * alert(value); - * - * //text currently on the textbox (anything the user typed) - * var text = autoCompleter.getText(); - * alert(text); - * } - * - * function setValues() { - * var autoCompleter = dojo.widget.byId("auto"); - * - * //key (key will be set to "AL" and value to "Alabama") - * autoCompleter.setSelectedKey("AL"); - * - * //value (key will be set to "AL" and value to "Alabama") - * autoCompleter.setAllValues("AL", "Alabama"); - * } - * </script> - * - * - * - * <script type="text/javascript"> - * dojo.event.topic.subscribe("/before", function(event, widget){ - * alert('inside a topic event. before request'); - * //event: set event.cancel = true, to cancel request - * //widget: widget that published the topic - * }); - * </script> - * - * <sx:autocompleter beforeNotifyTopics="/before" href="%{#ajaxTest} /> - * - * - * - * <script type="text/javascript"> - * dojo.event.topic.subscribe("/after", function(data, request, widget){ - * alert('inside a topic event. after request'); - * //data : JavaScript object from parsing response - * //request: XMLHttpRequest object - * //widget: widget that published the topic - * }); - * </script> - * - * <sx:autocompleter afterNotifyTopics="/after" href="%{#ajaxTest}" /> - * - * - * - * <script type="text/javascript"> - * dojo.event.topic.subscribe("/error", function(error, request, widget){ - * alert('inside a topic event. on error'); - * //error : error object (error.message has the error message) - * //request: XMLHttpRequest object - * //widget: widget that published the topic - * }); - * </script> - * - * <sx:autocompleter errorNotifyTopics="/error" href="%{#ajaxTest}" /> - * - * - * - * <script type="text/javascript"> - * dojo.event.topic.subscribe("/value", function(value, key, text, widget){ - * alert('inside a topic event. after value changed'); - * //value : selected value (like "Florida" in example above) - * //key: selected key (like "FL" in example above) - * //text: text typed into textbox - * //widget: widget that published the topic - * }); - * </script> - * - * <sx:autocompleter valueNotifyTopics="/value" href="%{#ajaxTest}" /> - * - */ -@StrutsTag(name="autocompleter", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.AutocompleterTag", description="Renders a combobox with autocomplete and AJAX capabilities") -public class Autocompleter extends ComboBox { - public static final String TEMPLATE = "autocompleter"; - final private static String COMPONENT_NAME = Autocompleter.class.getName(); - - protected String forceValidOption; - protected String searchType; - protected String autoComplete; - protected String delay; - protected String disabled; - protected String href; - protected String dropdownWidth; - protected String dropdownHeight; - protected String formId; - protected String formFilter; - protected String listenTopics; - protected String notifyTopics; - protected String indicator; - protected String loadOnTextChange; - protected String loadMinimumCount; - protected String showDownArrow; - protected String templateCssPath; - protected String iconPath; - protected String keyName; - protected String dataFieldName; - protected String beforeNotifyTopics; - protected String afterNotifyTopics; - protected String errorNotifyTopics; - protected String valueNotifyTopics; - protected String resultsLimit; - protected String transport; - protected String preload; - protected String keyValue; - - public Autocompleter(ValueStack stack, HttpServletRequest request, - HttpServletResponse response) { - super(stack, request, response); - } - - protected String getDefaultTemplate() { - return TEMPLATE; - } - - public String getComponentName() { - return COMPONENT_NAME; - } - - - public void evaluateExtraParams() { - super.evaluateExtraParams(); - - if (forceValidOption != null) - addParameter("forceValidOption", findValue(forceValidOption, - Boolean.class)); - if (searchType != null) { - String type = findString(searchType); - if(type != null) - addParameter("searchType", type.toUpperCase()); - } - if (autoComplete != null) - addParameter("autoComplete", findValue(autoComplete, Boolean.class)); - if (delay != null) - addParameter("delay", findValue(delay, Integer.class)); - if (disabled != null) - addParameter("disabled", findValue(disabled, Boolean.class)); - if (href != null) { - addParameter("href", findString(href)); - addParameter("mode", "remote"); - } - if (dropdownHeight != null) - addParameter("dropdownHeight", findValue(dropdownHeight, Integer.class)); - if (dropdownWidth != null) - addParameter("dropdownWidth", findValue(dropdownWidth, Integer.class)); - if (formFilter != null) - addParameter("formFilter", findString(formFilter)); - if (formId != null) - addParameter("formId", findString(formId)); - if (listenTopics != null) - addParameter("listenTopics", findString(listenTopics)); - if (notifyTopics != null) - addParameter("notifyTopics", findString(notifyTopics)); - if (indicator != null) - addParameter("indicator", findString(indicator)); - if (loadOnTextChange != null) - addParameter("loadOnTextChange", findValue(loadOnTextChange, Boolean.class)); - if (loadMinimumCount != null) - addParameter("loadMinimumCount", findValue(loadMinimumCount, Integer.class)); - if (showDownArrow != null) - addParameter("showDownArrow", findValue(showDownArrow, Boolean.class)); - else - addParameter("showDownArrow", Boolean.TRUE); - if (templateCssPath != null) - addParameter("templateCssPath", findString(templateCssPath)); - if (iconPath != null) - addParameter("iconPath", findString(iconPath)); - if (dataFieldName != null) - addParameter("dataFieldName", findString(dataFieldName)); - if (keyName != null) - addParameter("keyName", findString(keyName)); - else { - keyName = name + "Key"; - addParameter("keyName", findString(keyName)); - } - if (transport != null) - addParameter("transport", findString(transport)); - if (preload != null) - addParameter("preload", findValue(preload, Boolean.class)); - - if (keyValue != null) - addParameter("nameKeyValue", findString(keyValue)); - else { - String keyNameExpr = "%{" + keyName + "}"; - addParameter("nameKeyValue", findString(keyNameExpr)); - } - - - if (beforeNotifyTopics != null) - addParameter("beforeNotifyTopics", findString(beforeNotifyTopics)); - if (afterNotifyTopics != null) - addParameter("afterNotifyTopics", findString(afterNotifyTopics)); - if (errorNotifyTopics != null) - addParameter("errorNotifyTopics", findString(errorNotifyTopics)); - if (valueNotifyTopics != null) - addParameter("valueNotifyTopics", findString(valueNotifyTopics)); - if (resultsLimit != null) - addParameter("searchLimit", findString(resultsLimit)); - - boolean generateId = !(Boolean)stack.getContext().get(Head.PARSE_CONTENT); - addParameter("pushId", generateId); - if ((this.id == null || this.id.length() == 0) && generateId) { - Random random = new Random(); - this.id = "widget_" + Math.abs(random.nextInt()); - addParameter("id", this.id); - } - } - - @Override - @StrutsTagSkipInheritance - public void setTheme(String theme) { - super.setTheme(theme); - } - - @Override - public String getTheme() { - return "ajax"; - } - - protected Object findListValue() { - return (list != null) ? findValue(list, Object.class) : null; - } - - @StrutsTagAttribute(description="Whether autocompleter should make suggestion on the textbox", type="Boolean", defaultValue="false") - public void setAutoComplete(String autoComplete) { - this.autoComplete = autoComplete; - } - - @StrutsTagAttribute(description="Enable or disable autocompleter", type="Boolean", defaultValue="false") - public void setDisabled(String disabled) { - this.disabled = disabled; - } - - @StrutsTagAttribute(description="Force selection to be one of the options", type="Boolean", defaultValue="false") - public void setForceValidOption(String forceValidOption) { - this.forceValidOption = forceValidOption; - } - - @StrutsTagAttribute(description="The URL used to load the options") - public void setHref(String href) { - this.href = href; - } - - @StrutsTagAttribute(description="Delay before making the search", type="Integer", defaultValue="100") - public void setDelay(String searchDelay) { - this.delay = searchDelay; - } - - @StrutsTagAttribute(description="how the search must be performed, options are: 'startstring', 'startword' " + - "and 'substring'", defaultValue="stringstart") - public void setSearchType(String searchType) { - this.searchType = searchType; - } - - @StrutsTagAttribute(description="Dropdown's height in pixels", type="Integer", defaultValue="120") - public void setDropdownHeight(String height) { - this.dropdownHeight = height; - } - - @StrutsTagAttribute(description="Dropdown's width", type="Integer", defaultValue="same as textbox") - public void setDropdownWidth(String width) { - this.dropdownWidth = width; - } - - @StrutsTagAttribute(description="Function name used to filter the fields of the form") - public void setFormFilter(String formFilter) { - this.formFilter = formFilter; - } - - @StrutsTagAttribute(description="Form id whose fields will be serialized and passed as parameters") - public void setFormId(String formId) { - this.formId = formId; - } - - @StrutsTagAttribute(description="Topic that will trigger a reload") - public void setListenTopics(String listenTopics) { - this.listenTopics = listenTopics; - } - - @StrutsTagAttribute(description="Topics that will be published when content is reloaded") - public void setNotifyTopics(String onValueChangedPublishTopic) { - this.notifyTopics = onValueChangedPublishTopic; - } - - @StrutsTagAttribute(description="Id of element that will be shown while request is made") - public void setIndicator(String indicator) { - this.indicator = indicator; - } - - @StrutsTagAttribute(description="Minimum number of characters that will force the content to be loaded", type="Integer", defaultValue="3") - public void setLoadMinimumCount(String loadMinimumCount) { - this.loadMinimumCount = loadMinimumCount; - } - - @StrutsTagAttribute(description="Options will be reloaded everytime a character is typed on the textbox", type="Boolean", defaultValue="true") - public void setLoadOnTextChange(String loadOnType) { - this.loadOnTextChange = loadOnType; - } - - @StrutsTagAttribute(description="Show or hide the down arrow button", type="Boolean", defaultValue="true") - public void setShowDownArrow(String showDownArrow) { - this.showDownArrow = showDownArrow; - } - - // Override as not required - @StrutsTagAttribute(description="Iteratable source to populate from.") - public void setList(String list) { - super.setList(list); - } - - @StrutsTagAttribute(description="Template css path") - public void setTemplateCssPath(String templateCssPath) { - this.templateCssPath = templateCssPath; - } - - @StrutsTagAttribute(description="Path to icon used for the dropdown") - public void setIconPath(String iconPath) { - this.iconPath = iconPath; - } - - @StrutsTagAttribute(description="Name of the field to which the selected key will be assigned") - public void setKeyName(String keyName) { - this.keyName = keyName; - } - - @StrutsTagAttribute(description="Name of the field in the returned JSON object that contains the data array", defaultValue="Value specified in 'name'") - public void setDataFieldName(String dataFieldName) { - this.dataFieldName = dataFieldName; - } - - @StrutsTagAttribute(description="The css class to use for element") - public void setCssClass(String cssClass) { - super.setCssClass(cssClass); - } - - @StrutsTagAttribute(description="The css style to use for element") - public void setCssStyle(String cssStyle) { - super.setCssStyle(cssStyle); - } - - @StrutsTagAttribute(description="The id to use for the element") - public void setId(String id) { - super.setId(id); - } - - @StrutsTagAttribute(description="The name to set for element") - public void setName(String name) { - super.setName(name); - } - - @StrutsTagAttribute(description="Preset the value of input element") - public void setValue(String arg0) { - super.setValue(arg0); - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request succeeds)") - public void setAfterNotifyTopics(String afterNotifyTopics) { - this.afterNotifyTopics = afterNotifyTopics; - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published before the request") - public void setBeforeNotifyTopics(String beforeNotifyTopics) { - this.beforeNotifyTopics = beforeNotifyTopics; - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request fails)") - public void setErrorNotifyTopics(String errorNotifyTopics) { - this.errorNotifyTopics = errorNotifyTopics; - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published when a value is selected") - public void setValueNotifyTopics(String valueNotifyTopics) { - this.valueNotifyTopics = valueNotifyTopics; - } - - @StrutsTagAttribute(description="Limit how many results are shown as autocompletion options, set to -1 for unlimited results", defaultValue="30") - public void setResultsLimit(String resultsLimit) { - this.resultsLimit = resultsLimit; - } - - @StrutsTagAttribute(description="Transport used by Dojo to make the request", defaultValue="XMLHTTPTransport") - public void setTransport(String transport) { - this.transport = transport; - } - - @StrutsTagAttribute(description="Load options when page is loaded", type="Boolean", defaultValue="true") - public void setPreload(String preload) { - this.preload = preload; - } - - @StrutsTagAttribute(description="Initial key value") - public void setKeyValue(String keyValue) { - this.keyValue = keyValue; - } -} +/* + * $Id$ + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.struts2.dojo.components; + +import java.util.Random; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts2.components.ComboBox; +import org.apache.struts2.views.annotations.StrutsTag; +import org.apache.struts2.views.annotations.StrutsTagAttribute; +import org.apache.struts2.views.annotations.StrutsTagSkipInheritance; + +import com.opensymphony.xwork2.util.ValueStack; + +/** + * + *

The autocomplete tag is a combobox that can autocomplete text entered on the input box. If an action + * is used to populate the autocompleter, the output of the action must be a well formed JSON string.

+ *

The autocompleter follows this rule to find its datasource:

+ *

1. If the response is an array, assume that it contains 2-dimension array elements, like: + *

+ * [
+ *      ["Alabama", "AL"],
+ *      ["Alaska", "AK"]
+ * ]
+ * 
+ *

2. If a value is specified in the "dataFieldName" attribute, and the response has a field with that + * name, assume that's the datasource, which can be an array of 2-dimension array elements, or a map, + * like (assuming dataFieldName="state"):

+ *
+ * {
+ *      "state" : [
+ *           ["Alabama","AL"],
+ *           ["Alaska","AK"]
+ *      ]
+ * }     
+ * or
+ * {
+ *      "state" : {
+ *            "Alabama" : "AL",
+ *            "Alaska" : "AK"
+ *      }
+ * }
+ * 
+ *
+ *

3. If there is a field that starts with the value specified on the "name" attribute, assume + * that's the datasource, like (assuming name="state"):

+ *
+ * {
+ *      "states" : [
+ *           ["Alabama","AL"],
+ *           ["Alaska","AK"]
+ *      ]
+ * }
+ * 
+ *

4. Use first array that is found, like:

+ *

+ * {
+ *      "anything" : [
+ *            ["Alabama", "AL"],
+ *            ["Alaska", "AK"]
+ *     ]       
+ * }
+ * 

5. If the response is a map, use it (recommended as it is the easiest one to generate): + *

+ * {
+ *      "Alabama" : "AL",
+ *      "Alaska" : "AK"
+ * }
+ * 
+ * + *

Examples

+ * + * <sx:autocompleter name="autocompleter1" href="%{jsonList}"/> + * + * + * + * <s:autocompleter name="test" list="{'apple','banana','grape','pear'}" autoComplete="false"/> + * + * + * + * <sx:autocompleter name="mvc" href="%{jsonList}" loadOnTextChange="true" loadMinimumCount="3"/> + * + * The text entered on the autocompleter is passed as a parameter to the url specified in "href", like (text is "struts"): + * + * http://host/example/myaction.do?mvc=struts + * + * + * + * <form id="selectForm"> + * <sx:autocompleter name="select" list="{'fruits','colors'}" valueNotifyTopics="/changed" /> + * </form> + * <sx:autocompleter href="%{jsonList}" formId="selectForm" listenTopics="/changed"/> + * + * + * + * <sx:autocompleter href="%{jsonList}" id="auto"/> + * <script type="text/javascript"> + * function getValues() { + * var autoCompleter = dojo.widget.byId("auto"); + * + * //key (in the states example above, "AL") + * var key = autoCompleter.getSelectedKey(); + * alert(key); + * + * //value (in the states example above, "Alabama") + * var value = autoCompleter.getSelectedValue(); + * alert(value); + * + * //text currently on the textbox (anything the user typed) + * var text = autoCompleter.getText(); + * alert(text); + * } + * + * function setValues() { + * var autoCompleter = dojo.widget.byId("auto"); + * + * //key (key will be set to "AL" and value to "Alabama") + * autoCompleter.setSelectedKey("AL"); + * + * //value (key will be set to "AL" and value to "Alabama") + * autoCompleter.setAllValues("AL", "Alabama"); + * } + * </script> + * + * + * + * <script type="text/javascript"> + * dojo.event.topic.subscribe("/before", function(event, widget){ + * alert('inside a topic event. before request'); + * //event: set event.cancel = true, to cancel request + * //widget: widget that published the topic + * }); + * </script> + * + * <sx:autocompleter beforeNotifyTopics="/before" href="%{#ajaxTest} /> + * + * + * + * <script type="text/javascript"> + * dojo.event.topic.subscribe("/after", function(data, request, widget){ + * alert('inside a topic event. after request'); + * //data : JavaScript object from parsing response + * //request: XMLHttpRequest object + * //widget: widget that published the topic + * }); + * </script> + * + * <sx:autocompleter afterNotifyTopics="/after" href="%{#ajaxTest}" /> + * + * + * + * <script type="text/javascript"> + * dojo.event.topic.subscribe("/error", function(error, request, widget){ + * alert('inside a topic event. on error'); + * //error : error object (error.message has the error message) + * //request: XMLHttpRequest object + * //widget: widget that published the topic + * }); + * </script> + * + * <sx:autocompleter errorNotifyTopics="/error" href="%{#ajaxTest}" /> + * + * + * + * <script type="text/javascript"> + * dojo.event.topic.subscribe("/value", function(value, key, text, widget){ + * alert('inside a topic event. after value changed'); + * //value : selected value (like "Florida" in example above) + * //key: selected key (like "FL" in example above) + * //text: text typed into textbox + * //widget: widget that published the topic + * }); + * </script> + * + * <sx:autocompleter valueNotifyTopics="/value" href="%{#ajaxTest}" /> + * + */ +@StrutsTag(name="autocompleter", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.AutocompleterTag", description="Renders a combobox with autocomplete and AJAX capabilities") +public class Autocompleter extends ComboBox { + public static final String TEMPLATE = "autocompleter"; + final private static String COMPONENT_NAME = Autocompleter.class.getName(); + + protected String forceValidOption; + protected String searchType; + protected String autoComplete; + protected String delay; + protected String disabled; + protected String href; + protected String dropdownWidth; + protected String dropdownHeight; + protected String formId; + protected String formFilter; + protected String listenTopics; + protected String notifyTopics; + protected String indicator; + protected String loadOnTextChange; + protected String loadMinimumCount; + protected String showDownArrow; + protected String templateCssPath; + protected String iconPath; + protected String keyName; + protected String dataFieldName; + protected String beforeNotifyTopics; + protected String afterNotifyTopics; + protected String errorNotifyTopics; + protected String valueNotifyTopics; + protected String resultsLimit; + protected String transport; + protected String preload; + protected String keyValue; + + public Autocompleter(ValueStack stack, HttpServletRequest request, + HttpServletResponse response) { + super(stack, request, response); + } + + protected String getDefaultTemplate() { + return TEMPLATE; + } + + public String getComponentName() { + return COMPONENT_NAME; + } + + + public void evaluateExtraParams() { + super.evaluateExtraParams(); + + if (forceValidOption != null) + addParameter("forceValidOption", findValue(forceValidOption, + Boolean.class)); + if (searchType != null) { + String type = findString(searchType); + if(type != null) + addParameter("searchType", type.toUpperCase()); + } + if (autoComplete != null) + addParameter("autoComplete", findValue(autoComplete, Boolean.class)); + if (delay != null) + addParameter("delay", findValue(delay, Integer.class)); + if (disabled != null) + addParameter("disabled", findValue(disabled, Boolean.class)); + if (href != null) { + addParameter("href", findString(href)); + addParameter("mode", "remote"); + } + if (dropdownHeight != null) + addParameter("dropdownHeight", findValue(dropdownHeight, Integer.class)); + if (dropdownWidth != null) + addParameter("dropdownWidth", findValue(dropdownWidth, Integer.class)); + if (formFilter != null) + addParameter("formFilter", findString(formFilter)); + if (formId != null) + addParameter("formId", findString(formId)); + if (listenTopics != null) + addParameter("listenTopics", findString(listenTopics)); + if (notifyTopics != null) + addParameter("notifyTopics", findString(notifyTopics)); + if (indicator != null) + addParameter("indicator", findString(indicator)); + if (loadOnTextChange != null) + addParameter("loadOnTextChange", findValue(loadOnTextChange, Boolean.class)); + if (loadMinimumCount != null) + addParameter("loadMinimumCount", findValue(loadMinimumCount, Integer.class)); + if (showDownArrow != null) + addParameter("showDownArrow", findValue(showDownArrow, Boolean.class)); + else + addParameter("showDownArrow", Boolean.TRUE); + if (templateCssPath != null) + addParameter("templateCssPath", findString(templateCssPath)); + if (iconPath != null) + addParameter("iconPath", findString(iconPath)); + if (dataFieldName != null) + addParameter("dataFieldName", findString(dataFieldName)); + if (keyName != null) + addParameter("keyName", findString(keyName)); + else { + keyName = name + "Key"; + addParameter("keyName", findString(keyName)); + } + if (transport != null) + addParameter("transport", findString(transport)); + if (preload != null) + addParameter("preload", findValue(preload, Boolean.class)); + + if (keyValue != null) + addParameter("nameKeyValue", findString(keyValue)); + else { + String keyNameExpr = "%{" + keyName + "}"; + addParameter("nameKeyValue", findString(keyNameExpr)); + } + + + if (beforeNotifyTopics != null) + addParameter("beforeNotifyTopics", findString(beforeNotifyTopics)); + if (afterNotifyTopics != null) + addParameter("afterNotifyTopics", findString(afterNotifyTopics)); + if (errorNotifyTopics != null) + addParameter("errorNotifyTopics", findString(errorNotifyTopics)); + if (valueNotifyTopics != null) + addParameter("valueNotifyTopics", findString(valueNotifyTopics)); + if (resultsLimit != null) + addParameter("searchLimit", findString(resultsLimit)); + + boolean generateId = !(Boolean)stack.getContext().get(Head.PARSE_CONTENT); + addParameter("pushId", generateId); + if ((this.id == null || this.id.length() == 0) && generateId) { + Random random = new Random(); + this.id = "widget_" + Math.abs(random.nextInt()); + addParameter("id", this.id); + } + } + + @Override + @StrutsTagSkipInheritance + public void setTheme(String theme) { + super.setTheme(theme); + } + + @Override + public String getTheme() { + return "ajax"; + } + + protected Object findListValue() { + return (list != null) ? findValue(list, Object.class) : null; + } + + @StrutsTagAttribute(description="Whether autocompleter should make suggestion on the textbox", type="Boolean", defaultValue="false") + public void setAutoComplete(String autoComplete) { + this.autoComplete = autoComplete; + } + + @StrutsTagAttribute(description="Enable or disable autocompleter", type="Boolean", defaultValue="false") + public void setDisabled(String disabled) { + this.disabled = disabled; + } + + @StrutsTagAttribute(description="Force selection to be one of the options", type="Boolean", defaultValue="false") + public void setForceValidOption(String forceValidOption) { + this.forceValidOption = forceValidOption; + } + + @StrutsTagAttribute(description="The URL used to load the options") + public void setHref(String href) { + this.href = href; + } + + @StrutsTagAttribute(description="Delay before making the search", type="Integer", defaultValue="100") + public void setDelay(String searchDelay) { + this.delay = searchDelay; + } + + @StrutsTagAttribute(description="how the search must be performed, options are: 'startstring', 'startword' " + + "and 'substring'", defaultValue="stringstart") + public void setSearchType(String searchType) { + this.searchType = searchType; + } + + @StrutsTagAttribute(description="Dropdown's height in pixels", type="Integer", defaultValue="120") + public void setDropdownHeight(String height) { + this.dropdownHeight = height; + } + + @StrutsTagAttribute(description="Dropdown's width", type="Integer", defaultValue="same as textbox") + public void setDropdownWidth(String width) { + this.dropdownWidth = width; + } + + @StrutsTagAttribute(description="Function name used to filter the fields of the form") + public void setFormFilter(String formFilter) { + this.formFilter = formFilter; + } + + @StrutsTagAttribute(description="Form id whose fields will be serialized and passed as parameters") + public void setFormId(String formId) { + this.formId = formId; + } + + @StrutsTagAttribute(description="Topic that will trigger a reload") + public void setListenTopics(String listenTopics) { + this.listenTopics = listenTopics; + } + + @StrutsTagAttribute(description="Topics that will be published when content is reloaded") + public void setNotifyTopics(String onValueChangedPublishTopic) { + this.notifyTopics = onValueChangedPublishTopic; + } + + @StrutsTagAttribute(description="Id of element that will be shown while request is made") + public void setIndicator(String indicator) { + this.indicator = indicator; + } + + @StrutsTagAttribute(description="Minimum number of characters that will force the content to be loaded", type="Integer", defaultValue="3") + public void setLoadMinimumCount(String loadMinimumCount) { + this.loadMinimumCount = loadMinimumCount; + } + + @StrutsTagAttribute(description="Options will be reloaded everytime a character is typed on the textbox", type="Boolean", defaultValue="true") + public void setLoadOnTextChange(String loadOnType) { + this.loadOnTextChange = loadOnType; + } + + @StrutsTagAttribute(description="Show or hide the down arrow button", type="Boolean", defaultValue="true") + public void setShowDownArrow(String showDownArrow) { + this.showDownArrow = showDownArrow; + } + + // Override as not required + @StrutsTagAttribute(description="Iteratable source to populate from.") + public void setList(String list) { + super.setList(list); + } + + @StrutsTagAttribute(description="Template css path") + public void setTemplateCssPath(String templateCssPath) { + this.templateCssPath = templateCssPath; + } + + @StrutsTagAttribute(description="Path to icon used for the dropdown") + public void setIconPath(String iconPath) { + this.iconPath = iconPath; + } + + @StrutsTagAttribute(description="Name of the field to which the selected key will be assigned") + public void setKeyName(String keyName) { + this.keyName = keyName; + } + + @StrutsTagAttribute(description="Name of the field in the returned JSON object that contains the data array", defaultValue="Value specified in 'name'") + public void setDataFieldName(String dataFieldName) { + this.dataFieldName = dataFieldName; + } + + @StrutsTagAttribute(description="The css class to use for element") + public void setCssClass(String cssClass) { + super.setCssClass(cssClass); + } + + @StrutsTagAttribute(description="The css style to use for element") + public void setCssStyle(String cssStyle) { + super.setCssStyle(cssStyle); + } + + @StrutsTagAttribute(description="The id to use for the element") + public void setId(String id) { + super.setId(id); + } + + @StrutsTagAttribute(description="The name to set for element") + public void setName(String name) { + super.setName(name); + } + + @StrutsTagAttribute(description="Preset the value of input element") + public void setValue(String arg0) { + super.setValue(arg0); + } + + @StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request succeeds)") + public void setAfterNotifyTopics(String afterNotifyTopics) { + this.afterNotifyTopics = afterNotifyTopics; + } + + @StrutsTagAttribute(description="Comma delimmited list of topics that will published before the request") + public void setBeforeNotifyTopics(String beforeNotifyTopics) { + this.beforeNotifyTopics = beforeNotifyTopics; + } + + @StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request fails)") + public void setErrorNotifyTopics(String errorNotifyTopics) { + this.errorNotifyTopics = errorNotifyTopics; + } + + @StrutsTagAttribute(description="Comma delimmited list of topics that will published when a value is selected") + public void setValueNotifyTopics(String valueNotifyTopics) { + this.valueNotifyTopics = valueNotifyTopics; + } + + @StrutsTagAttribute(description="Limit how many results are shown as autocompletion options, set to -1 for unlimited results", defaultValue="30") + public void setResultsLimit(String resultsLimit) { + this.resultsLimit = resultsLimit; + } + + @StrutsTagAttribute(description="Transport used by Dojo to make the request", defaultValue="XMLHTTPTransport") + public void setTransport(String transport) { + this.transport = transport; + } + + @StrutsTagAttribute(description="Load options when page is loaded", type="Boolean", defaultValue="true") + public void setPreload(String preload) { + this.preload = preload; + } + + @StrutsTagAttribute(description="Initial key value") + public void setKeyValue(String keyValue) { + this.keyValue = keyValue; + } +} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Bind.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Bind.java index 56c7a233c..2923ae2f2 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Bind.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Bind.java @@ -1,294 +1,294 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.dojo.components; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.views.annotations.StrutsTag; -import org.apache.struts2.views.annotations.StrutsTagAttribute; -import org.apache.struts2.views.annotations.StrutsTagSkipInheritance; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * - *

- * This tag will generate event listeners for multiple events on multiple sources, - * making an asynchronous request to the specified href, and updating multiple targets. - *

- * - * - *

Examples

- * - * - * <sx:bind href="%{#ajaxTest}" listenTopics="/makecall"/> - * <s:submit onclick="dojo.event.topic.publish('/makecall')"/> - * - * - * - * <img id="indicator" src="${pageContext.request.contextPath}/images/indicator.gif" alt="Loading..." style="display:none"/> - * <sx:bind id="ex1" href="%{#ajaxTest}" sources="button" targets="div1" events="onclick" indicator="indicator" /> - * <s:submit theme="simple" type="submit" value="submit" id="button"/> - * - * - * - * <sx:bind id="ex3" href="%{#ajaxTest}" sources="chk1" targets="div1" events="onchange" formId="form1" /> - * <form id="form1"> - * <s:checkbox name="data" label="Hit me" id="chk1"/> - * </form> - * - * - * - * <script type="text/javascript"> - * dojo.event.topic.subscribe("/before", function(event, widget){ - * alert('inside a topic event. before request'); - * //event: set event.cancel = true, to cancel request - * //widget: widget that published the topic - * }); - * </script> - * - * <input type="button" id="button"> - * <sx:bind id="ex1" href="%{#ajaxTest}" beforeNotifyTopics="/before" sources="button" events="onclick"/> - * - * - * - * <script type="text/javascript"> - * dojo.event.topic.subscribe("/after", function(data, request, widget){ - * alert('inside a topic event. after request'); - * //data : text returned from request(the html) - * //request: XMLHttpRequest object - * //widget: widget that published the topic - * }); - * </script> - * - * <input type="button" id="button"> - * <sx:bind id="ex1" href="%{#ajaxTest}" highlightColor="red" afterNotifyTopics="/after" sources="button" events="onclick"/> - * - * - * - * <script type="text/javascript"> - * dojo.event.topic.subscribe("/error", function(error, request, widget){ - * alert('inside a topic event. on error'); - * //error : error object (error.message has the error message) - * //request: XMLHttpRequest object - * //widget: widget that published the topic - * }); - * </script> - * - * <input type="button" id="button"> - * <img id="ind1" src="${pageContext.request.contextPath}/images/indicator.gif" style="display:none"/> - * <sx:bind href="%{#ajaxTest}" indicator="ind1" errorNotifyTopics="/error" sources="button" events="onclick"/> - * - */ -@StrutsTag(name="bind", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.BindTag", description="Attach event listeners to elements to make AJAX calls") -@StrutsTagSkipInheritance -public class Bind extends AbstractValidateBean { - public static final String TEMPLATE = "bind-close"; - public static final String OPEN_TEMPLATE = "bind"; - - protected String targets; - protected String sources; - protected String events; - - public Bind(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { - super(stack, request, response); - } - - public String getDefaultOpenTemplate() { - return OPEN_TEMPLATE; - } - - protected String getDefaultTemplate() { - return TEMPLATE; - } - - public void evaluateExtraParams() { - super.evaluateExtraParams(); - - if (targets != null) - addParameter("targets", findString(targets)); - if (sources != null) - addParameter("sources", findString(sources)); - if (events != null) - addParameter("events", findString(events)); - } - - @StrutsTagAttribute(description="Comma delimited list of event names to attach to") - public void setEvents(String events) { - this.events = events; - } - - @StrutsTagAttribute(description="Comma delimited list of ids of the elements to attach to") - public void setSources(String sources) { - this.sources = sources; - } - - @StrutsTagAttribute(description="Comma delimited list of ids of the elements whose content will be updated") - public void setTargets(String targets) { - this.targets = targets; - } - - @Override - @StrutsTagSkipInheritance - public void setTheme(String theme) { - super.setTheme(theme); - } - - @Override - public String getTheme() { - return "ajax"; - } - - //these attributes are overwritten here just for the TLD generation - - @StrutsTagAttribute(description="Topic that will trigger the remote call") - public void setListenTopics(String listenTopics) { - this.listenTopics = listenTopics; - } - - @StrutsTagAttribute(description="The URL to call to obtain the content. Note: If used with ajax context, the value must be set as an url tag value.") - public void setHref(String href) { - this.href = href; - } - - - @StrutsTagAttribute(description="The text to display to the user if the is an error fetching the content") - public void setErrorText(String errorText) { - this.errorText = errorText; - } - - @StrutsTagAttribute(description="Javascript code in the fetched content will be executed", type="Boolean", defaultValue="false") - public void setExecuteScripts(String executeScripts) { - this.executeScripts = executeScripts; - } - - @StrutsTagAttribute(description="Text to be shown while content is being fetched", defaultValue="Loading...") - public void setLoadingText(String loadingText) { - this.loadingText = loadingText; - } - - - @StrutsTagAttribute(description="Javascript function name that will make the request") - public void setHandler(String handler) { - this.handler = handler; - } - - - @StrutsTagAttribute(description="Function name used to filter the fields of the form.") - public void setFormFilter(String formFilter) { - this.formFilter = formFilter; - } - - @StrutsTagAttribute(description="Form id whose fields will be serialized and passed as parameters") - public void setFormId(String formId) { - this.formId = formId; - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published before and after the request, and on errors") - public void setNotifyTopics(String notifyTopics) { - this.notifyTopics = notifyTopics; - } - - @StrutsTagAttribute(description="Set whether errors will be shown or not", type="Boolean", defaultValue="true") - public void setShowErrorTransportText(String showError) { - this.showErrorTransportText = showError; - } - - @StrutsTagAttribute(description="Id of element that will be shown while making request") - public void setIndicator(String indicator) { - this.indicator = indicator; - } - - @StrutsTagAttribute(description="Show loading text on targets", type="Boolean", defaultValue="false") - public void setShowLoadingText(String showLoadingText) { - this.showLoadingText = showLoadingText; - } - - @StrutsTagSkipInheritance - public void setCssClass(String cssClass) { - super.setCssClass(cssClass); - } - - @StrutsTagSkipInheritance - public void setCssStyle(String cssStyle) { - super.setCssStyle(cssStyle); - } - - @StrutsTagSkipInheritance - public void setName(String name) { - super.setName(name); - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request succeeds)") - public void setAfterNotifyTopics(String afterNotifyTopics) { - this.afterNotifyTopics = afterNotifyTopics; - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published before the request") - public void setBeforeNotifyTopics(String beforeNotifyTopics) { - this.beforeNotifyTopics = beforeNotifyTopics; - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request fails)") - public void setErrorNotifyTopics(String errorNotifyTopics) { - this.errorNotifyTopics = errorNotifyTopics; - } - - @StrutsTagAttribute(description="The id to use for the element") - public void setId(String id) { - super.setId(id); - } - - @StrutsTagAttribute(description = "Color used to perform a highlight effect on the elements specified in the 'targets' attribute", - defaultValue = "none") - public void setHighlightColor(String highlightColor) { - this.highlightColor = highlightColor; - } - - @StrutsTagAttribute(description = "Duration of highlight effect in milliseconds. Only valid if 'highlightColor' attribute is set", - defaultValue = "2000", type="Integer") - public void setHighlightDuration(String highlightDuration) { - this.highlightDuration = highlightDuration; - } - - @StrutsTagAttribute(description = "Perform Ajax calidation. 'ajaxValidation' interceptor must be applied to action", type="Boolean", - defaultValue = "false") - public void setValidate(String validate) { - this.validate = validate; - } - - @StrutsTagAttribute(description = "Make an asynchronous request if validation succeeds. Only valid is 'validate' is 'true'", type="Boolean", - defaultValue = "false") - public void setAjaxAfterValidation(String ajaxAfterValidation) { - this.ajaxAfterValidation = ajaxAfterValidation; - } - - @StrutsTagAttribute(description="Run scripts in a separate scope, unique for each tag", defaultValue="true") - public void setSeparateScripts(String separateScripts) { - this.separateScripts = separateScripts; - } - - @StrutsTagAttribute(description="Transport used by Dojo to make the request", defaultValue="XMLHTTPTransport") - public void setTransport(String transport) { - this.transport = transport; - } -} +/* + * $Id$ + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.struts2.dojo.components; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts2.views.annotations.StrutsTag; +import org.apache.struts2.views.annotations.StrutsTagAttribute; +import org.apache.struts2.views.annotations.StrutsTagSkipInheritance; + +import com.opensymphony.xwork2.util.ValueStack; + +/** + * + *

+ * This tag will generate event listeners for multiple events on multiple sources, + * making an asynchronous request to the specified href, and updating multiple targets. + *

+ * + * + *

Examples

+ * + * + * <sx:bind href="%{#ajaxTest}" listenTopics="/makecall"/> + * <s:submit onclick="dojo.event.topic.publish('/makecall')"/> + * + * + * + * <img id="indicator" src="${pageContext.request.contextPath}/images/indicator.gif" alt="Loading..." style="display:none"/> + * <sx:bind id="ex1" href="%{#ajaxTest}" sources="button" targets="div1" events="onclick" indicator="indicator" /> + * <s:submit theme="simple" type="submit" value="submit" id="button"/> + * + * + * + * <sx:bind id="ex3" href="%{#ajaxTest}" sources="chk1" targets="div1" events="onchange" formId="form1" /> + * <form id="form1"> + * <s:checkbox name="data" label="Hit me" id="chk1"/> + * </form> + * + * + * + * <script type="text/javascript"> + * dojo.event.topic.subscribe("/before", function(event, widget){ + * alert('inside a topic event. before request'); + * //event: set event.cancel = true, to cancel request + * //widget: widget that published the topic + * }); + * </script> + * + * <input type="button" id="button"> + * <sx:bind id="ex1" href="%{#ajaxTest}" beforeNotifyTopics="/before" sources="button" events="onclick"/> + * + * + * + * <script type="text/javascript"> + * dojo.event.topic.subscribe("/after", function(data, request, widget){ + * alert('inside a topic event. after request'); + * //data : text returned from request(the html) + * //request: XMLHttpRequest object + * //widget: widget that published the topic + * }); + * </script> + * + * <input type="button" id="button"> + * <sx:bind id="ex1" href="%{#ajaxTest}" highlightColor="red" afterNotifyTopics="/after" sources="button" events="onclick"/> + * + * + * + * <script type="text/javascript"> + * dojo.event.topic.subscribe("/error", function(error, request, widget){ + * alert('inside a topic event. on error'); + * //error : error object (error.message has the error message) + * //request: XMLHttpRequest object + * //widget: widget that published the topic + * }); + * </script> + * + * <input type="button" id="button"> + * <img id="ind1" src="${pageContext.request.contextPath}/images/indicator.gif" style="display:none"/> + * <sx:bind href="%{#ajaxTest}" indicator="ind1" errorNotifyTopics="/error" sources="button" events="onclick"/> + * + */ +@StrutsTag(name="bind", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.BindTag", description="Attach event listeners to elements to make AJAX calls") +@StrutsTagSkipInheritance +public class Bind extends AbstractValidateBean { + public static final String TEMPLATE = "bind-close"; + public static final String OPEN_TEMPLATE = "bind"; + + protected String targets; + protected String sources; + protected String events; + + public Bind(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { + super(stack, request, response); + } + + public String getDefaultOpenTemplate() { + return OPEN_TEMPLATE; + } + + protected String getDefaultTemplate() { + return TEMPLATE; + } + + public void evaluateExtraParams() { + super.evaluateExtraParams(); + + if (targets != null) + addParameter("targets", findString(targets)); + if (sources != null) + addParameter("sources", findString(sources)); + if (events != null) + addParameter("events", findString(events)); + } + + @StrutsTagAttribute(description="Comma delimited list of event names to attach to") + public void setEvents(String events) { + this.events = events; + } + + @StrutsTagAttribute(description="Comma delimited list of ids of the elements to attach to") + public void setSources(String sources) { + this.sources = sources; + } + + @StrutsTagAttribute(description="Comma delimited list of ids of the elements whose content will be updated") + public void setTargets(String targets) { + this.targets = targets; + } + + @Override + @StrutsTagSkipInheritance + public void setTheme(String theme) { + super.setTheme(theme); + } + + @Override + public String getTheme() { + return "ajax"; + } + + //these attributes are overwritten here just for the TLD generation + + @StrutsTagAttribute(description="Topic that will trigger the remote call") + public void setListenTopics(String listenTopics) { + this.listenTopics = listenTopics; + } + + @StrutsTagAttribute(description="The URL to call to obtain the content. Note: If used with ajax context, the value must be set as an url tag value.") + public void setHref(String href) { + this.href = href; + } + + + @StrutsTagAttribute(description="The text to display to the user if the is an error fetching the content") + public void setErrorText(String errorText) { + this.errorText = errorText; + } + + @StrutsTagAttribute(description="Javascript code in the fetched content will be executed", type="Boolean", defaultValue="false") + public void setExecuteScripts(String executeScripts) { + this.executeScripts = executeScripts; + } + + @StrutsTagAttribute(description="Text to be shown while content is being fetched", defaultValue="Loading...") + public void setLoadingText(String loadingText) { + this.loadingText = loadingText; + } + + + @StrutsTagAttribute(description="Javascript function name that will make the request") + public void setHandler(String handler) { + this.handler = handler; + } + + + @StrutsTagAttribute(description="Function name used to filter the fields of the form.") + public void setFormFilter(String formFilter) { + this.formFilter = formFilter; + } + + @StrutsTagAttribute(description="Form id whose fields will be serialized and passed as parameters") + public void setFormId(String formId) { + this.formId = formId; + } + + @StrutsTagAttribute(description="Comma delimmited list of topics that will published before and after the request, and on errors") + public void setNotifyTopics(String notifyTopics) { + this.notifyTopics = notifyTopics; + } + + @StrutsTagAttribute(description="Set whether errors will be shown or not", type="Boolean", defaultValue="true") + public void setShowErrorTransportText(String showError) { + this.showErrorTransportText = showError; + } + + @StrutsTagAttribute(description="Id of element that will be shown while making request") + public void setIndicator(String indicator) { + this.indicator = indicator; + } + + @StrutsTagAttribute(description="Show loading text on targets", type="Boolean", defaultValue="false") + public void setShowLoadingText(String showLoadingText) { + this.showLoadingText = showLoadingText; + } + + @StrutsTagSkipInheritance + public void setCssClass(String cssClass) { + super.setCssClass(cssClass); + } + + @StrutsTagSkipInheritance + public void setCssStyle(String cssStyle) { + super.setCssStyle(cssStyle); + } + + @StrutsTagSkipInheritance + public void setName(String name) { + super.setName(name); + } + + @StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request succeeds)") + public void setAfterNotifyTopics(String afterNotifyTopics) { + this.afterNotifyTopics = afterNotifyTopics; + } + + @StrutsTagAttribute(description="Comma delimmited list of topics that will published before the request") + public void setBeforeNotifyTopics(String beforeNotifyTopics) { + this.beforeNotifyTopics = beforeNotifyTopics; + } + + @StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request fails)") + public void setErrorNotifyTopics(String errorNotifyTopics) { + this.errorNotifyTopics = errorNotifyTopics; + } + + @StrutsTagAttribute(description="The id to use for the element") + public void setId(String id) { + super.setId(id); + } + + @StrutsTagAttribute(description = "Color used to perform a highlight effect on the elements specified in the 'targets' attribute", + defaultValue = "none") + public void setHighlightColor(String highlightColor) { + this.highlightColor = highlightColor; + } + + @StrutsTagAttribute(description = "Duration of highlight effect in milliseconds. Only valid if 'highlightColor' attribute is set", + defaultValue = "2000", type="Integer") + public void setHighlightDuration(String highlightDuration) { + this.highlightDuration = highlightDuration; + } + + @StrutsTagAttribute(description = "Perform Ajax calidation. 'ajaxValidation' interceptor must be applied to action", type="Boolean", + defaultValue = "false") + public void setValidate(String validate) { + this.validate = validate; + } + + @StrutsTagAttribute(description = "Make an asynchronous request if validation succeeds. Only valid is 'validate' is 'true'", type="Boolean", + defaultValue = "false") + public void setAjaxAfterValidation(String ajaxAfterValidation) { + this.ajaxAfterValidation = ajaxAfterValidation; + } + + @StrutsTagAttribute(description="Run scripts in a separate scope, unique for each tag", defaultValue="true") + public void setSeparateScripts(String separateScripts) { + this.separateScripts = separateScripts; + } + + @StrutsTagAttribute(description="Transport used by Dojo to make the request", defaultValue="XMLHTTPTransport") + public void setTransport(String transport) { + this.transport = transport; + } +} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/DateTimePicker.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/DateTimePicker.java index ecd970bc7..c1230afdb 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/DateTimePicker.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/DateTimePicker.java @@ -1,417 +1,417 @@ -/* - * $Id: DateTimePicker.java 512580 2007-02-28 02:48:06Z musachy $ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.dojo.components; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Calendar; -import java.util.Date; -import java.util.List; -import java.util.Random; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.UIBean; -import org.apache.struts2.views.annotations.StrutsTag; -import org.apache.struts2.views.annotations.StrutsTagAttribute; -import org.apache.struts2.views.annotations.StrutsTagSkipInheritance; - -import com.opensymphony.xwork2.util.ValueStack; -import com.opensymphony.xwork2.util.logging.Logger; -import com.opensymphony.xwork2.util.logging.LoggerFactory; - -/** - * - *

- * Renders a date/time picker in a dropdown container. - *

- *

- * A stand-alone DateTimePicker widget that makes it easy to select a date/time, or increment by week, month, - * and/or year. - *

- * - *

- * It is possible to customize the user-visible formatting with either the - * 'formatLength' (long, short, medium or full) or 'displayFormat' attributes. By defaulty current - * locale will be used.

- *

- * - * Syntax supported by 'displayFormat' is (http://www.unicode.org/reports/tr35/tr35-4.html#Date_Format_Patterns):- - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
FormatDescription
dDay of the month
DDay of year
MMonth - Use one or two for the numerical month, three for the abbreviation, or four for the full name, or 5 for the narrow name.
yYear
hHour [1-12].
HHour [0-23].
mMinute. Use one or two for zero padding.
sSecond. Use one or two for zero padding.
- * - *

- * The value sent to the server is a locale-independent value, in a hidden field as defined - * by the name attribute. The value will be formatted conforming to RFC3 339 - * (yyyy-MM-dd'T'HH:mm:ss) - *

- *

- * The following formats(in order) will be used to parse the values of the attributes 'value', - * 'startDate' and 'endDate': - *

- *
    - *
  • SimpleDateFormat built using RFC 3339 (yyyy-MM-dd'T'HH:mm:ss) - *
  • SimpleDateFormat.getTimeInstance(DateFormat.SHORT) - *
  • SimpleDateFormat.getDateInstance(DateFormat.SHORT) - *
  • SimpleDateFormat.getDateInstance(DateFormat.MEDIUM) - *
  • SimpleDateFormat.getDateInstance(DateFormat.FULL) - *
  • SimpleDateFormat.getDateInstance(DateFormat.LONG) - *
  • SimpleDateFormat built using the value of the 'displayFormat' attribute(if any) - *
- * - * - * Examples - * - *
- * 
- *   <sx:datetimepicker name="order.date" label="Order Date" />
- *   <sx:datetimepicker name="delivery.date" label="Delivery Date" displayFormat="yyyy-MM-dd"  />
- *   <sx:datetimepicker name="delivery.date" label="Delivery Date" value="%{date}"  />
- *   <sx:datetimepicker name="delivery.date" label="Delivery Date" value="%{'2007-01-01'}"  />
- *   <sx:datetimepicker name="order.date" label="Order Date" value="%{'today'}"/>
- * 
- * 
- * - * - * <sx:datetimepicker id="picker" label="Order Date" /> - * <script type="text/javascript"> - * function setValue() { - * var picker = dojo.widget.byId("picker"); - * - * //string value - * picker.setValue('2007-01-01'); - * - * //Date value - * picker.setValue(new Date()); - * } - * - * function showValue() { - * var picker = dojo.widget.byId("picker"); - * - * //string value - * var stringValue = picker.getValue(); - * alert(stringValue); - * - * //date value - * var dateValue = picker.getDate(); - * alert(dateValue); - * } - * </script> - * - * - * - * <sx:datetimepicker id="picker" label="Order Date" valueNotifyTopics="/value"/> - * - * <script type="text/javascript"> - * dojo.event.topic.subscribe("/value", function(textEntered, date, widget){ - * alert('value changed'); - * //textEntered: String enetered in the textbox - * //date: JavaScript Date object with the value selected - * //widet: widget that published the topic - * }); - * </script> - * - */ -@StrutsTag(name="datetimepicker", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.DateTimePickerTag", description="Render datetimepicker") -public class DateTimePicker extends UIBean { - - final public static String TEMPLATE = "datetimepicker"; - final private static SimpleDateFormat RFC3339_FORMAT = new SimpleDateFormat( - "yyyy-MM-dd'T'HH:mm:ss"); - final protected static Logger LOG = LoggerFactory.getLogger(DateTimePicker.class); - - protected String iconPath; - protected String formatLength; - protected String displayFormat; - protected String toggleType; - protected String toggleDuration; - protected String type; - - protected String displayWeeks; - protected String adjustWeeks; - protected String startDate; - protected String endDate; - protected String weekStartsOn; - protected String staticDisplay; - protected String dayWidth; - protected String language; - protected String templateCssPath; - protected String valueNotifyTopics; - - public DateTimePicker(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { - super(stack, request, response); - } - - protected String getDefaultTemplate() { - return TEMPLATE; - } - - public void evaluateParams() { - super.evaluateParams(); - - if(displayFormat != null) - addParameter("displayFormat", findString(displayFormat)); - if(displayWeeks != null) - addParameter("displayWeeks", findString(displayWeeks)); - if(adjustWeeks != null) - addParameter("adjustWeeks", findValue(adjustWeeks, Boolean.class)); - if(startDate != null) - addParameter("startDate", format(findValue(startDate))); - if(endDate != null) - addParameter("endDate", format(findValue(endDate))); - if(weekStartsOn != null) - addParameter("weekStartsOn", findString(weekStartsOn)); - if(staticDisplay != null) - addParameter("staticDisplay", findValue(staticDisplay, Boolean.class)); - if(dayWidth != null) - addParameter("dayWidth", findValue(dayWidth, Integer.class)); - if(language != null) - addParameter("language", findString(language)); - if(value != null) - addParameter("value", format(findValue(value))); - - if(iconPath != null) - addParameter("iconPath", findString(iconPath)); - if(formatLength != null) - addParameter("formatLength", findString(formatLength)); - if(toggleType != null) - addParameter("toggleType", findString(toggleType)); - if(toggleDuration != null) - addParameter("toggleDuration", findValue(toggleDuration, - Integer.class)); - if(type != null) - addParameter("type", findString(type)); - else - addParameter("type", "date"); - if(templateCssPath != null) - addParameter("templateCssPath", findString(templateCssPath)); - if(valueNotifyTopics != null) - addParameter("valueNotifyTopics", findString(valueNotifyTopics)); - - // format the value to RFC 3399 - if(parameters.containsKey("value")) { - parameters.put("nameValue", parameters.get("value")); - } else { - if(name != null) { - addParameter("nameValue", format(findValue(name))); - } - } - - boolean generateId = !(Boolean)stack.getContext().get(Head.PARSE_CONTENT); - addParameter("pushId", generateId); - if ((this.id == null || this.id.length() == 0) && generateId) { - Random random = new Random(); - this.id = "widget_" + Math.abs(random.nextInt()); - addParameter("id", this.id); - } - } - - @Override - @StrutsTagSkipInheritance - public void setTheme(String theme) { - super.setTheme(theme); - } - - @Override - public String getTheme() { - return "ajax"; - } - - @StrutsTagAttribute(description="If true, weekly size of calendar changes to acomodate the month if false," + - " 42 day format is used", type="Boolean", defaultValue="false") - public void setAdjustWeeks(String adjustWeeks) { - this.adjustWeeks = adjustWeeks; - } - - @StrutsTagAttribute(description="How to render the names of the days in the header(narrow, abbr or wide)", defaultValue="narrow") - public void setDayWidth(String dayWidth) { - this.dayWidth = dayWidth; - } - - @StrutsTagAttribute(description="Total weeks to display", type="Integer", defaultValue="6") - public void setDisplayWeeks(String displayWeeks) { - this.displayWeeks = displayWeeks; - } - - @StrutsTagAttribute(description="Last available date in the calendar set", type="Date", defaultValue="2941-10-12") - public void setEndDate(String endDate) { - this.endDate = endDate; - } - - @StrutsTagAttribute(description="First available date in the calendar set", type="Date", defaultValue="1492-10-12") - public void setStartDate(String startDate) { - this.startDate = startDate; - } - - @StrutsTagAttribute(description="Disable all incremental controls, must pick a date in the current display", type="Boolean", defaultValue="false") - public void setStaticDisplay(String staticDisplay) { - this.staticDisplay = staticDisplay; - } - - @StrutsTagAttribute(description="Adjusts the first day of the week 0==Sunday..6==Saturday", type="Integer", defaultValue="0") - public void setWeekStartsOn(String weekStartsOn) { - this.weekStartsOn = weekStartsOn; - } - - @StrutsTagAttribute(description="Language to display this widget in", defaultValue="brower's specified preferred language") - public void setLanguage(String language) { - this.language = language; - } - - @StrutsTagAttribute(description="A pattern used for the visual display of the formatted date, e.g. dd/MM/yyyy") - public void setDisplayFormat(String displayFormat) { - this.displayFormat = displayFormat; - } - - @StrutsTagAttribute(description="Type of formatting used for visual display. Possible values are " + - "long, short, medium or full", defaultValue="short") - public void setFormatLength(String formatLength) { - this.formatLength = formatLength; - } - - @StrutsTagAttribute(description="Path to icon used for the dropdown") - public void setIconPath(String iconPath) { - this.iconPath = iconPath; - } - - @StrutsTagAttribute(description="Duration of toggle in milliseconds", type="Integer", defaultValue="100") - public void setToggleDuration(String toggleDuration) { - this.toggleDuration = toggleDuration; - } - - @StrutsTagAttribute(description="Defines the type of the picker on the dropdown. Possible values are 'date'" + - " for a DateTimePicker, and 'time' for a timePicker", defaultValue="date") - public void setType(String type) { - this.type = type; - } - - @StrutsTagAttribute(description="oggle type of the dropdown. Possible values are plain,wipe,explode,fade", defaultValue="plain") - public void setToggleType(String toggleType) { - this.toggleType = toggleType; - } - - @StrutsTagAttribute(description="Template css path") - public void setTemplateCssPath(String templateCssPath) { - this.templateCssPath = templateCssPath; - } - - @StrutsTagAttribute(description="Preset the value of input element") - public void setValue(String arg0) { - super.setValue(arg0); - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published when a value is selected") - public void setValueNotifyTopics(String valueNotifyTopics) { - this.valueNotifyTopics = valueNotifyTopics; - } - - private String format(Object obj) { - if(obj == null) - return null; - - if(obj instanceof Date) { - return RFC3339_FORMAT.format((Date) obj); - } else if(obj instanceof Calendar) { - return RFC3339_FORMAT.format(((Calendar) obj).getTime()); - } - else { - // try to parse a date - String dateStr = obj.toString(); - if(dateStr.equalsIgnoreCase("today")) - return RFC3339_FORMAT.format(new Date()); - - - Date date = null; - //formats used to parse the date - List formats = new ArrayList(); - formats.add(RFC3339_FORMAT); - formats.add(SimpleDateFormat.getTimeInstance(DateFormat.SHORT)); - formats.add(SimpleDateFormat.getDateInstance(DateFormat.SHORT)); - formats.add(SimpleDateFormat.getDateInstance(DateFormat.MEDIUM)); - formats.add(SimpleDateFormat.getDateInstance(DateFormat.FULL)); - formats.add(SimpleDateFormat.getDateInstance(DateFormat.LONG)); - if (this.displayFormat != null) { - try { - SimpleDateFormat displayFormat = new SimpleDateFormat( - (String) getParameters().get("displayFormat")); - formats.add(displayFormat); - } catch (Exception e) { - // don't use it then (this attribute is used by Dojo, not java code) - LOG.error("Cannot use attribute", e); - } - } - - for (DateFormat format : formats) { - try { - date = format.parse(dateStr); - if (date != null) - return RFC3339_FORMAT.format(date); - } catch (Exception e) { - //keep going - } - } - - // last resource, assume already in correct/default format - if (LOG.isDebugEnabled()) - LOG.debug("Unable to parse date " + dateStr); - return dateStr; - } - } - -} +/* + * $Id$ + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.struts2.dojo.components; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import java.util.Random; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts2.components.UIBean; +import org.apache.struts2.views.annotations.StrutsTag; +import org.apache.struts2.views.annotations.StrutsTagAttribute; +import org.apache.struts2.views.annotations.StrutsTagSkipInheritance; + +import com.opensymphony.xwork2.util.ValueStack; +import com.opensymphony.xwork2.util.logging.Logger; +import com.opensymphony.xwork2.util.logging.LoggerFactory; + +/** + * + *

+ * Renders a date/time picker in a dropdown container. + *

+ *

+ * A stand-alone DateTimePicker widget that makes it easy to select a date/time, or increment by week, month, + * and/or year. + *

+ * + *

+ * It is possible to customize the user-visible formatting with either the + * 'formatLength' (long, short, medium or full) or 'displayFormat' attributes. By defaulty current + * locale will be used.

+ *

+ * + * Syntax supported by 'displayFormat' is (http://www.unicode.org/reports/tr35/tr35-4.html#Date_Format_Patterns):- + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
FormatDescription
dDay of the month
DDay of year
MMonth - Use one or two for the numerical month, three for the abbreviation, or four for the full name, or 5 for the narrow name.
yYear
hHour [1-12].
HHour [0-23].
mMinute. Use one or two for zero padding.
sSecond. Use one or two for zero padding.
+ * + *

+ * The value sent to the server is a locale-independent value, in a hidden field as defined + * by the name attribute. The value will be formatted conforming to RFC3 339 + * (yyyy-MM-dd'T'HH:mm:ss) + *

+ *

+ * The following formats(in order) will be used to parse the values of the attributes 'value', + * 'startDate' and 'endDate': + *

+ *
    + *
  • SimpleDateFormat built using RFC 3339 (yyyy-MM-dd'T'HH:mm:ss) + *
  • SimpleDateFormat.getTimeInstance(DateFormat.SHORT) + *
  • SimpleDateFormat.getDateInstance(DateFormat.SHORT) + *
  • SimpleDateFormat.getDateInstance(DateFormat.MEDIUM) + *
  • SimpleDateFormat.getDateInstance(DateFormat.FULL) + *
  • SimpleDateFormat.getDateInstance(DateFormat.LONG) + *
  • SimpleDateFormat built using the value of the 'displayFormat' attribute(if any) + *
+ * + * + * Examples + * + *
+ * 
+ *   <sx:datetimepicker name="order.date" label="Order Date" />
+ *   <sx:datetimepicker name="delivery.date" label="Delivery Date" displayFormat="yyyy-MM-dd"  />
+ *   <sx:datetimepicker name="delivery.date" label="Delivery Date" value="%{date}"  />
+ *   <sx:datetimepicker name="delivery.date" label="Delivery Date" value="%{'2007-01-01'}"  />
+ *   <sx:datetimepicker name="order.date" label="Order Date" value="%{'today'}"/>
+ * 
+ * 
+ * + * + * <sx:datetimepicker id="picker" label="Order Date" /> + * <script type="text/javascript"> + * function setValue() { + * var picker = dojo.widget.byId("picker"); + * + * //string value + * picker.setValue('2007-01-01'); + * + * //Date value + * picker.setValue(new Date()); + * } + * + * function showValue() { + * var picker = dojo.widget.byId("picker"); + * + * //string value + * var stringValue = picker.getValue(); + * alert(stringValue); + * + * //date value + * var dateValue = picker.getDate(); + * alert(dateValue); + * } + * </script> + * + * + * + * <sx:datetimepicker id="picker" label="Order Date" valueNotifyTopics="/value"/> + * + * <script type="text/javascript"> + * dojo.event.topic.subscribe("/value", function(textEntered, date, widget){ + * alert('value changed'); + * //textEntered: String enetered in the textbox + * //date: JavaScript Date object with the value selected + * //widet: widget that published the topic + * }); + * </script> + * + */ +@StrutsTag(name="datetimepicker", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.DateTimePickerTag", description="Render datetimepicker") +public class DateTimePicker extends UIBean { + + final public static String TEMPLATE = "datetimepicker"; + final private static SimpleDateFormat RFC3339_FORMAT = new SimpleDateFormat( + "yyyy-MM-dd'T'HH:mm:ss"); + final protected static Logger LOG = LoggerFactory.getLogger(DateTimePicker.class); + + protected String iconPath; + protected String formatLength; + protected String displayFormat; + protected String toggleType; + protected String toggleDuration; + protected String type; + + protected String displayWeeks; + protected String adjustWeeks; + protected String startDate; + protected String endDate; + protected String weekStartsOn; + protected String staticDisplay; + protected String dayWidth; + protected String language; + protected String templateCssPath; + protected String valueNotifyTopics; + + public DateTimePicker(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { + super(stack, request, response); + } + + protected String getDefaultTemplate() { + return TEMPLATE; + } + + public void evaluateParams() { + super.evaluateParams(); + + if(displayFormat != null) + addParameter("displayFormat", findString(displayFormat)); + if(displayWeeks != null) + addParameter("displayWeeks", findString(displayWeeks)); + if(adjustWeeks != null) + addParameter("adjustWeeks", findValue(adjustWeeks, Boolean.class)); + if(startDate != null) + addParameter("startDate", format(findValue(startDate))); + if(endDate != null) + addParameter("endDate", format(findValue(endDate))); + if(weekStartsOn != null) + addParameter("weekStartsOn", findString(weekStartsOn)); + if(staticDisplay != null) + addParameter("staticDisplay", findValue(staticDisplay, Boolean.class)); + if(dayWidth != null) + addParameter("dayWidth", findValue(dayWidth, Integer.class)); + if(language != null) + addParameter("language", findString(language)); + if(value != null) + addParameter("value", format(findValue(value))); + + if(iconPath != null) + addParameter("iconPath", findString(iconPath)); + if(formatLength != null) + addParameter("formatLength", findString(formatLength)); + if(toggleType != null) + addParameter("toggleType", findString(toggleType)); + if(toggleDuration != null) + addParameter("toggleDuration", findValue(toggleDuration, + Integer.class)); + if(type != null) + addParameter("type", findString(type)); + else + addParameter("type", "date"); + if(templateCssPath != null) + addParameter("templateCssPath", findString(templateCssPath)); + if(valueNotifyTopics != null) + addParameter("valueNotifyTopics", findString(valueNotifyTopics)); + + // format the value to RFC 3399 + if(parameters.containsKey("value")) { + parameters.put("nameValue", parameters.get("value")); + } else { + if(name != null) { + addParameter("nameValue", format(findValue(name))); + } + } + + boolean generateId = !(Boolean)stack.getContext().get(Head.PARSE_CONTENT); + addParameter("pushId", generateId); + if ((this.id == null || this.id.length() == 0) && generateId) { + Random random = new Random(); + this.id = "widget_" + Math.abs(random.nextInt()); + addParameter("id", this.id); + } + } + + @Override + @StrutsTagSkipInheritance + public void setTheme(String theme) { + super.setTheme(theme); + } + + @Override + public String getTheme() { + return "ajax"; + } + + @StrutsTagAttribute(description="If true, weekly size of calendar changes to acomodate the month if false," + + " 42 day format is used", type="Boolean", defaultValue="false") + public void setAdjustWeeks(String adjustWeeks) { + this.adjustWeeks = adjustWeeks; + } + + @StrutsTagAttribute(description="How to render the names of the days in the header(narrow, abbr or wide)", defaultValue="narrow") + public void setDayWidth(String dayWidth) { + this.dayWidth = dayWidth; + } + + @StrutsTagAttribute(description="Total weeks to display", type="Integer", defaultValue="6") + public void setDisplayWeeks(String displayWeeks) { + this.displayWeeks = displayWeeks; + } + + @StrutsTagAttribute(description="Last available date in the calendar set", type="Date", defaultValue="2941-10-12") + public void setEndDate(String endDate) { + this.endDate = endDate; + } + + @StrutsTagAttribute(description="First available date in the calendar set", type="Date", defaultValue="1492-10-12") + public void setStartDate(String startDate) { + this.startDate = startDate; + } + + @StrutsTagAttribute(description="Disable all incremental controls, must pick a date in the current display", type="Boolean", defaultValue="false") + public void setStaticDisplay(String staticDisplay) { + this.staticDisplay = staticDisplay; + } + + @StrutsTagAttribute(description="Adjusts the first day of the week 0==Sunday..6==Saturday", type="Integer", defaultValue="0") + public void setWeekStartsOn(String weekStartsOn) { + this.weekStartsOn = weekStartsOn; + } + + @StrutsTagAttribute(description="Language to display this widget in", defaultValue="brower's specified preferred language") + public void setLanguage(String language) { + this.language = language; + } + + @StrutsTagAttribute(description="A pattern used for the visual display of the formatted date, e.g. dd/MM/yyyy") + public void setDisplayFormat(String displayFormat) { + this.displayFormat = displayFormat; + } + + @StrutsTagAttribute(description="Type of formatting used for visual display. Possible values are " + + "long, short, medium or full", defaultValue="short") + public void setFormatLength(String formatLength) { + this.formatLength = formatLength; + } + + @StrutsTagAttribute(description="Path to icon used for the dropdown") + public void setIconPath(String iconPath) { + this.iconPath = iconPath; + } + + @StrutsTagAttribute(description="Duration of toggle in milliseconds", type="Integer", defaultValue="100") + public void setToggleDuration(String toggleDuration) { + this.toggleDuration = toggleDuration; + } + + @StrutsTagAttribute(description="Defines the type of the picker on the dropdown. Possible values are 'date'" + + " for a DateTimePicker, and 'time' for a timePicker", defaultValue="date") + public void setType(String type) { + this.type = type; + } + + @StrutsTagAttribute(description="oggle type of the dropdown. Possible values are plain,wipe,explode,fade", defaultValue="plain") + public void setToggleType(String toggleType) { + this.toggleType = toggleType; + } + + @StrutsTagAttribute(description="Template css path") + public void setTemplateCssPath(String templateCssPath) { + this.templateCssPath = templateCssPath; + } + + @StrutsTagAttribute(description="Preset the value of input element") + public void setValue(String arg0) { + super.setValue(arg0); + } + + @StrutsTagAttribute(description="Comma delimmited list of topics that will published when a value is selected") + public void setValueNotifyTopics(String valueNotifyTopics) { + this.valueNotifyTopics = valueNotifyTopics; + } + + private String format(Object obj) { + if(obj == null) + return null; + + if(obj instanceof Date) { + return RFC3339_FORMAT.format((Date) obj); + } else if(obj instanceof Calendar) { + return RFC3339_FORMAT.format(((Calendar) obj).getTime()); + } + else { + // try to parse a date + String dateStr = obj.toString(); + if(dateStr.equalsIgnoreCase("today")) + return RFC3339_FORMAT.format(new Date()); + + + Date date = null; + //formats used to parse the date + List formats = new ArrayList(); + formats.add(RFC3339_FORMAT); + formats.add(SimpleDateFormat.getTimeInstance(DateFormat.SHORT)); + formats.add(SimpleDateFormat.getDateInstance(DateFormat.SHORT)); + formats.add(SimpleDateFormat.getDateInstance(DateFormat.MEDIUM)); + formats.add(SimpleDateFormat.getDateInstance(DateFormat.FULL)); + formats.add(SimpleDateFormat.getDateInstance(DateFormat.LONG)); + if (this.displayFormat != null) { + try { + SimpleDateFormat displayFormat = new SimpleDateFormat( + (String) getParameters().get("displayFormat")); + formats.add(displayFormat); + } catch (Exception e) { + // don't use it then (this attribute is used by Dojo, not java code) + LOG.error("Cannot use attribute", e); + } + } + + for (DateFormat format : formats) { + try { + date = format.parse(dateStr); + if (date != null) + return RFC3339_FORMAT.format(date); + } catch (Exception e) { + //keep going + } + } + + // last resource, assume already in correct/default format + if (LOG.isDebugEnabled()) + LOG.debug("Unable to parse date " + dateStr); + return dateStr; + } + } + +} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Div.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Div.java index 51a6b45d6..6677e099d 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Div.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Div.java @@ -1,5 +1,5 @@ /* - * $Id: Div.java 511300 2007-02-24 16:41:38Z musachy $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/RemoteBean.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/RemoteBean.java index 01260f924..2c4f3f9f2 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/RemoteBean.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/RemoteBean.java @@ -1,5 +1,5 @@ /* - * $Id: RemoteUICallBean.java 508285 2007-02-16 02:42:24Z musachy $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Submit.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Submit.java index 20250ae22..bb47d047c 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Submit.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Submit.java @@ -1,451 +1,451 @@ -/* - * $Id: Submit.java 508285 2007-02-16 02:42:24Z musachy $ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.dojo.components; - -import java.io.Writer; -import java.util.Random; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Form; -import org.apache.struts2.components.FormButton; -import org.apache.struts2.views.annotations.StrutsTag; -import org.apache.struts2.views.annotations.StrutsTagAttribute; -import org.apache.struts2.views.annotations.StrutsTagSkipInheritance; - -import com.opensymphony.xwork2.util.ValueStack; -import com.opensymphony.xwork2.util.logging.Logger; -import com.opensymphony.xwork2.util.logging.LoggerFactory; - -/** - * - * Renders a submit button that can submit a form asynchronously. - * The submit can have three different types of rendering: - *
    - *
  • input: renders as html <input type="submit"...>
  • - *
  • image: renders as html <input type="image"...>
  • - *
  • button: renders as html <button type="submit"...>
  • - *
- * Please note that the button type has advantages by adding the possibility to seperate the submitted value from the - * text shown on the button face, but has issues with Microsoft Internet Explorer at least up to 6.0 - * - * - *

Examples

- * - * <sx:submit value="%{'Submit'}" /> - * - * - * - * <sx:submit type="image" value="%{'Submit'}" label="Submit the form" src="submit.gif"/> - * - - * - * <sx:submit type="button" value="%{'Submit'}" label="Submit the form"/> - * - * - * - * <div id="div1">Div 1</div> - * <s:url id="ajaxTest" value="/AjaxTest.action"/> - * - * <sx:submit id="link1" href="%{ajaxTest}" target="div1" /> - * - * - * - * <s:form id="form" action="AjaxTest"> - * <input type="textbox" name="data"> - * <sx:submit /> - * </s:form> - * - * - * - * <s:form id="form" action="AjaxTest"> - * <input type="textbox" name="data"> - * </s:form> - * - * <sx:submit formId="form" /> - * - * - * - * <script type="text/javascript"> - * dojo.event.topic.subscribe("/before", function(event, widget){ - * alert('inside a topic event. before request'); - * //event: set event.cancel = true, to cancel request - * //widget: widget that published the topic - * }); - * </script> - * - * <sx:submit beforeNotifyTopics="/before" /> - * - * - * - * <script type="text/javascript"> - * dojo.event.topic.subscribe("/after", function(data, request, widget){ - * alert('inside a topic event. after request'); - * //data : text returned from request(the html) - * //request: XMLHttpRequest object - * //widget: widget that published the topic - * }); - * </script> - * - * <sx:submit afterNotifyTopics="/after" highlightColor="red" href="%{#ajaxTest}" /> - * - * - * - * <script type="text/javascript"> - * dojo.event.topic.subscribe("/error", function(error, request, widget){ - * alert('inside a topic event. on error'); - * //error : error object (error.message has the error message) - * //request: XMLHttpRequest object - * //widget: widget that published the topic - * }); - * </script> - * - * <img id="ind1" src="${pageContext.request.contextPath}/images/indicator.gif" style="display:none"/> - * <sx:submit errorNotifyTopics="/error" indicator="ind1" href="%{#ajaxTest}" /> - * - */ -@StrutsTag(name="submit", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.SubmitTag", description="Render a submit button") -public class Submit extends FormButton implements RemoteBean { - - private static final Logger LOG = LoggerFactory.getLogger(Submit.class); - - final public static String TEMPLATE = "submit"; - - protected String href; - protected String errorText; - protected String executeScripts; - protected String loadingText; - protected String listenTopics; - protected String handler; - protected String formId; - protected String formFilter; - protected String src; - protected String notifyTopics; - protected String showErrorTransportText; - protected String indicator; - protected String showLoadingText; - protected String targets; - protected String beforeNotifyTopics; - protected String afterNotifyTopics; - protected String errorNotifyTopics; - protected String highlightColor; - protected String highlightDuration; - protected String validate; - protected String ajaxAfterValidation; - protected String separateScripts; - protected String transport; - protected String parseContent; - - public Submit(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { - super(stack, request, response); - } - - protected String getDefaultTemplate() { - return TEMPLATE; - } - - public void evaluateParams() { - if ((key == null) && (value == null)) { - value = "Submit"; - } - - if (((key != null)) && (value == null)) { - this.value = "%{getText('"+key +"')}"; - } - - super.evaluateParams(); - } - - public void evaluateExtraParams() { - super.evaluateExtraParams(); - - if (href != null) - addParameter("href", findString(href)); - if (errorText != null) - addParameter("errorText", findString(errorText)); - if (loadingText != null) - addParameter("loadingText", findString(loadingText)); - if (executeScripts != null) - addParameter("executeScripts", findValue(executeScripts, Boolean.class)); - if (listenTopics != null) - addParameter("listenTopics", findString(listenTopics)); - if (notifyTopics != null) - addParameter("notifyTopics", findString(notifyTopics)); - if (handler != null) - addParameter("handler", findString(handler)); - if (formId != null) - addParameter("formId", findString(formId)); - if (formFilter != null) - addParameter("formFilter", findString(formFilter)); - if (src != null) - addParameter("src", findString(src)); - if (indicator != null) - addParameter("indicator", findString(indicator)); - if (targets != null) - addParameter("targets", findString(targets)); - if (showLoadingText != null) - addParameter("showLoadingText", findString(showLoadingText)); - if (showLoadingText != null) - addParameter("showLoadingText", findString(showLoadingText)); - if (beforeNotifyTopics != null) - addParameter("beforeNotifyTopics", findString(beforeNotifyTopics)); - if (afterNotifyTopics != null) - addParameter("afterNotifyTopics", findString(afterNotifyTopics)); - if (errorNotifyTopics != null) - addParameter("errorNotifyTopics", findString(errorNotifyTopics)); - if (highlightColor != null) - addParameter("highlightColor", findString(highlightColor)); - if (highlightDuration != null) - addParameter("highlightDuration", findString(highlightDuration)); - if (separateScripts != null) - addParameter("separateScripts", findValue(separateScripts, Boolean.class)); - if (transport != null) - addParameter("transport", findString(transport)); - if (parseContent != null) - addParameter("parseContent", findValue(parseContent, Boolean.class)); - - Boolean validateValue = false; - if (validate != null) { - validateValue = (Boolean) findValue(validate, Boolean.class); - addParameter("validate", validateValue); - } - - Form form = (Form) findAncestor(Form.class); - if (form != null) - addParameter("parentTheme", form.getTheme()); - - if (ajaxAfterValidation != null) - addParameter("ajaxAfterValidation", findValue(ajaxAfterValidation, Boolean.class)); - - boolean generateId = !(Boolean)stack.getContext().get(Head.PARSE_CONTENT); - addParameter("pushId", generateId); - if ((this.id == null || this.id.length() == 0) && generateId) { - Random random = new Random(); - this.id = "widget_" + Math.abs(random.nextInt()); - addParameter("id", this.id); - } - } - - @Override - @StrutsTagSkipInheritance - public void setTheme(String theme) { - super.setTheme(theme); - } - - @Override - public String getTheme() { - return "ajax"; - } - - /** - * Indicate whether the concrete button supports the type "image". - * - * @return true to indicate type image is supported. - */ - protected boolean supportsImageType() { - return true; - } - - /** - * Overrides to be able to render body in a template rather than always before the template - */ - public boolean end(Writer writer, String body) { - evaluateParams(); - try { - addParameter("body", body); - - mergeTemplate(writer, buildTemplateName(template, getDefaultTemplate())); - } catch (Exception e) { - LOG.error("error when rendering", e); - } - finally { - popComponentStack(); - } - - return false; - } - - @StrutsTagAttribute(description="Topic that will trigger the remote call") - public void setListenTopics(String listenTopics) { - this.listenTopics = listenTopics; - } - - @StrutsTagAttribute(description="The URL to call to obtain the content. Note: If used with ajax context, the value must be set as an url tag value.") - public void setHref(String href) { - this.href = href; - } - - @StrutsTagAttribute(description="The text to display to the user if the is an error fetching the content") - public void setErrorText(String errorText) { - this.errorText = errorText; - } - - @StrutsTagAttribute(description="Javascript code in the fetched content will be executed", type="Boolean", defaultValue="false") - public void setExecuteScripts(String executeScripts) { - this.executeScripts = executeScripts; - } - - @StrutsTagAttribute(description="Text to be shown while content is being fetched", defaultValue="Loading...") - public void setLoadingText(String loadingText) { - this.loadingText = loadingText; - } - - @StrutsTagAttribute(description="Javascript function name that will make the request") - public void setHandler(String handler) { - this.handler = handler; - } - - @StrutsTagAttribute(description="Function name used to filter the fields of the form.") - public void setFormFilter(String formFilter) { - this.formFilter = formFilter; - } - - @StrutsTagAttribute(description="Form id whose fields will be serialized and passed as parameters") - public void setFormId(String formId) { - this.formId = formId; - } - - @StrutsTagAttribute(description="Supply an image src for image type submit button. Will have no effect for types input and button.") - public void setSrc(String src) { - this.src = src; - } - - @StrutsTagAttribute(description="Comma delimited list of ids of the elements whose content will be updated") - public void setTargets(String targets) { - this.targets = targets; - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published before and after the request, and on errors") - public void setNotifyTopics(String notifyTopics) { - this.notifyTopics = notifyTopics; - } - - @StrutsTagAttribute(description="Set whether errors will be shown or not", type="Boolean", defaultValue="true") - public void setShowErrorTransportText(String showErrorTransportText) { - this.showErrorTransportText = showErrorTransportText; - } - - @StrutsTagAttribute(description="Set indicator") - public void setIndicator(String indicator) { - this.indicator = indicator; - } - - @StrutsTagAttribute(description="Show loading text on targets", type="Boolean", defaultValue="false") - public void setShowLoadingText(String showLoadingText) { - this.showLoadingText = showLoadingText; - } - - @StrutsTagAttribute(description="The css class to use for element") - public void setCssClass(String cssClass) { - super.setCssClass(cssClass); - } - - @StrutsTagAttribute(description="The css style to use for element") - public void setCssStyle(String cssStyle) { - super.setCssStyle(cssStyle); - } - - @StrutsTagAttribute(description="The id to use for the element") - public void setId(String id) { - super.setId(id); - } - - @StrutsTagAttribute(description="The name to set for element") - public void setName(String name) { - super.setName(name); - } - - @StrutsTagAttribute(description="The type of submit to use. Valid values are input, " + - "button and image.", defaultValue="input") - public void setType(String type) { - super.setType(type); - } - - @StrutsTagAttribute(description="Preset the value of input element.") - public void setValue(String value) { - super.setValue(value); - } - - @StrutsTagAttribute(description="Label expression used for rendering a element specific label") - public void setLabel(String label) { - super.setLabel(label); - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request succeeds)") - public void setAfterNotifyTopics(String afterNotifyTopics) { - this.afterNotifyTopics = afterNotifyTopics; - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published before the request") - public void setBeforeNotifyTopics(String beforeNotifyTopics) { - this.beforeNotifyTopics = beforeNotifyTopics; - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request fails)") - public void setErrorNotifyTopics(String errorNotifyTopics) { - this.errorNotifyTopics = errorNotifyTopics; - } - - @StrutsTagAttribute(description = "Color used to perform a highlight effect on the elements specified in the 'targets' attribute", - defaultValue = "none") - public void setHighlightColor(String highlightColor) { - this.highlightColor = highlightColor; - } - - @StrutsTagAttribute(description = "Duration of highlight effect in milliseconds. Only valid if 'highlightColor' attribute is set", - defaultValue = "1000") - public void setHighlightDuration(String highlightDuration) { - this.highlightDuration = highlightDuration; - } - - @StrutsTagAttribute(description = "Perform Ajax calidation. 'ajaxValidation' interceptor must be applied to action", type="Boolean", - defaultValue = "false") - public void setValidate(String validate) { - this.validate = validate; - } - - @StrutsTagAttribute(description = "Make an asynchronous request if validation succeeds. Only valid if 'validate' is 'true'", type="Boolean", - defaultValue = "false") - public void setAjaxAfterValidation(String ajaxAfterValidation) { - this.ajaxAfterValidation = ajaxAfterValidation; - } - - @StrutsTagSkipInheritance - public void setAction(String action) { - super.setAction(action); - } - - @StrutsTagAttribute(description="Run scripts in a separate scope, unique for each tag", defaultValue="true") - public void setSeparateScripts(String separateScripts) { - this.separateScripts = separateScripts; - } - - @StrutsTagAttribute(description="Transport used by Dojo to make the request", defaultValue="XMLHTTPTransport") - public void setTransport(String transport) { - this.transport = transport; - } - - @StrutsTagAttribute(description="Parse returned HTML for Dojo widgets", defaultValue="true", type="Boolean") - public void setParseContent(String parseContent) { - this.parseContent = parseContent; - } -} +/* + * $Id$ + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.struts2.dojo.components; + +import java.io.Writer; +import java.util.Random; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts2.components.Form; +import org.apache.struts2.components.FormButton; +import org.apache.struts2.views.annotations.StrutsTag; +import org.apache.struts2.views.annotations.StrutsTagAttribute; +import org.apache.struts2.views.annotations.StrutsTagSkipInheritance; + +import com.opensymphony.xwork2.util.ValueStack; +import com.opensymphony.xwork2.util.logging.Logger; +import com.opensymphony.xwork2.util.logging.LoggerFactory; + +/** + * + * Renders a submit button that can submit a form asynchronously. + * The submit can have three different types of rendering: + *
    + *
  • input: renders as html <input type="submit"...>
  • + *
  • image: renders as html <input type="image"...>
  • + *
  • button: renders as html <button type="submit"...>
  • + *
+ * Please note that the button type has advantages by adding the possibility to seperate the submitted value from the + * text shown on the button face, but has issues with Microsoft Internet Explorer at least up to 6.0 + * + * + *

Examples

+ * + * <sx:submit value="%{'Submit'}" /> + * + * + * + * <sx:submit type="image" value="%{'Submit'}" label="Submit the form" src="submit.gif"/> + * + + * + * <sx:submit type="button" value="%{'Submit'}" label="Submit the form"/> + * + * + * + * <div id="div1">Div 1</div> + * <s:url id="ajaxTest" value="/AjaxTest.action"/> + * + * <sx:submit id="link1" href="%{ajaxTest}" target="div1" /> + * + * + * + * <s:form id="form" action="AjaxTest"> + * <input type="textbox" name="data"> + * <sx:submit /> + * </s:form> + * + * + * + * <s:form id="form" action="AjaxTest"> + * <input type="textbox" name="data"> + * </s:form> + * + * <sx:submit formId="form" /> + * + * + * + * <script type="text/javascript"> + * dojo.event.topic.subscribe("/before", function(event, widget){ + * alert('inside a topic event. before request'); + * //event: set event.cancel = true, to cancel request + * //widget: widget that published the topic + * }); + * </script> + * + * <sx:submit beforeNotifyTopics="/before" /> + * + * + * + * <script type="text/javascript"> + * dojo.event.topic.subscribe("/after", function(data, request, widget){ + * alert('inside a topic event. after request'); + * //data : text returned from request(the html) + * //request: XMLHttpRequest object + * //widget: widget that published the topic + * }); + * </script> + * + * <sx:submit afterNotifyTopics="/after" highlightColor="red" href="%{#ajaxTest}" /> + * + * + * + * <script type="text/javascript"> + * dojo.event.topic.subscribe("/error", function(error, request, widget){ + * alert('inside a topic event. on error'); + * //error : error object (error.message has the error message) + * //request: XMLHttpRequest object + * //widget: widget that published the topic + * }); + * </script> + * + * <img id="ind1" src="${pageContext.request.contextPath}/images/indicator.gif" style="display:none"/> + * <sx:submit errorNotifyTopics="/error" indicator="ind1" href="%{#ajaxTest}" /> + * + */ +@StrutsTag(name="submit", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.SubmitTag", description="Render a submit button") +public class Submit extends FormButton implements RemoteBean { + + private static final Logger LOG = LoggerFactory.getLogger(Submit.class); + + final public static String TEMPLATE = "submit"; + + protected String href; + protected String errorText; + protected String executeScripts; + protected String loadingText; + protected String listenTopics; + protected String handler; + protected String formId; + protected String formFilter; + protected String src; + protected String notifyTopics; + protected String showErrorTransportText; + protected String indicator; + protected String showLoadingText; + protected String targets; + protected String beforeNotifyTopics; + protected String afterNotifyTopics; + protected String errorNotifyTopics; + protected String highlightColor; + protected String highlightDuration; + protected String validate; + protected String ajaxAfterValidation; + protected String separateScripts; + protected String transport; + protected String parseContent; + + public Submit(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { + super(stack, request, response); + } + + protected String getDefaultTemplate() { + return TEMPLATE; + } + + public void evaluateParams() { + if ((key == null) && (value == null)) { + value = "Submit"; + } + + if (((key != null)) && (value == null)) { + this.value = "%{getText('"+key +"')}"; + } + + super.evaluateParams(); + } + + public void evaluateExtraParams() { + super.evaluateExtraParams(); + + if (href != null) + addParameter("href", findString(href)); + if (errorText != null) + addParameter("errorText", findString(errorText)); + if (loadingText != null) + addParameter("loadingText", findString(loadingText)); + if (executeScripts != null) + addParameter("executeScripts", findValue(executeScripts, Boolean.class)); + if (listenTopics != null) + addParameter("listenTopics", findString(listenTopics)); + if (notifyTopics != null) + addParameter("notifyTopics", findString(notifyTopics)); + if (handler != null) + addParameter("handler", findString(handler)); + if (formId != null) + addParameter("formId", findString(formId)); + if (formFilter != null) + addParameter("formFilter", findString(formFilter)); + if (src != null) + addParameter("src", findString(src)); + if (indicator != null) + addParameter("indicator", findString(indicator)); + if (targets != null) + addParameter("targets", findString(targets)); + if (showLoadingText != null) + addParameter("showLoadingText", findString(showLoadingText)); + if (showLoadingText != null) + addParameter("showLoadingText", findString(showLoadingText)); + if (beforeNotifyTopics != null) + addParameter("beforeNotifyTopics", findString(beforeNotifyTopics)); + if (afterNotifyTopics != null) + addParameter("afterNotifyTopics", findString(afterNotifyTopics)); + if (errorNotifyTopics != null) + addParameter("errorNotifyTopics", findString(errorNotifyTopics)); + if (highlightColor != null) + addParameter("highlightColor", findString(highlightColor)); + if (highlightDuration != null) + addParameter("highlightDuration", findString(highlightDuration)); + if (separateScripts != null) + addParameter("separateScripts", findValue(separateScripts, Boolean.class)); + if (transport != null) + addParameter("transport", findString(transport)); + if (parseContent != null) + addParameter("parseContent", findValue(parseContent, Boolean.class)); + + Boolean validateValue = false; + if (validate != null) { + validateValue = (Boolean) findValue(validate, Boolean.class); + addParameter("validate", validateValue); + } + + Form form = (Form) findAncestor(Form.class); + if (form != null) + addParameter("parentTheme", form.getTheme()); + + if (ajaxAfterValidation != null) + addParameter("ajaxAfterValidation", findValue(ajaxAfterValidation, Boolean.class)); + + boolean generateId = !(Boolean)stack.getContext().get(Head.PARSE_CONTENT); + addParameter("pushId", generateId); + if ((this.id == null || this.id.length() == 0) && generateId) { + Random random = new Random(); + this.id = "widget_" + Math.abs(random.nextInt()); + addParameter("id", this.id); + } + } + + @Override + @StrutsTagSkipInheritance + public void setTheme(String theme) { + super.setTheme(theme); + } + + @Override + public String getTheme() { + return "ajax"; + } + + /** + * Indicate whether the concrete button supports the type "image". + * + * @return true to indicate type image is supported. + */ + protected boolean supportsImageType() { + return true; + } + + /** + * Overrides to be able to render body in a template rather than always before the template + */ + public boolean end(Writer writer, String body) { + evaluateParams(); + try { + addParameter("body", body); + + mergeTemplate(writer, buildTemplateName(template, getDefaultTemplate())); + } catch (Exception e) { + LOG.error("error when rendering", e); + } + finally { + popComponentStack(); + } + + return false; + } + + @StrutsTagAttribute(description="Topic that will trigger the remote call") + public void setListenTopics(String listenTopics) { + this.listenTopics = listenTopics; + } + + @StrutsTagAttribute(description="The URL to call to obtain the content. Note: If used with ajax context, the value must be set as an url tag value.") + public void setHref(String href) { + this.href = href; + } + + @StrutsTagAttribute(description="The text to display to the user if the is an error fetching the content") + public void setErrorText(String errorText) { + this.errorText = errorText; + } + + @StrutsTagAttribute(description="Javascript code in the fetched content will be executed", type="Boolean", defaultValue="false") + public void setExecuteScripts(String executeScripts) { + this.executeScripts = executeScripts; + } + + @StrutsTagAttribute(description="Text to be shown while content is being fetched", defaultValue="Loading...") + public void setLoadingText(String loadingText) { + this.loadingText = loadingText; + } + + @StrutsTagAttribute(description="Javascript function name that will make the request") + public void setHandler(String handler) { + this.handler = handler; + } + + @StrutsTagAttribute(description="Function name used to filter the fields of the form.") + public void setFormFilter(String formFilter) { + this.formFilter = formFilter; + } + + @StrutsTagAttribute(description="Form id whose fields will be serialized and passed as parameters") + public void setFormId(String formId) { + this.formId = formId; + } + + @StrutsTagAttribute(description="Supply an image src for image type submit button. Will have no effect for types input and button.") + public void setSrc(String src) { + this.src = src; + } + + @StrutsTagAttribute(description="Comma delimited list of ids of the elements whose content will be updated") + public void setTargets(String targets) { + this.targets = targets; + } + + @StrutsTagAttribute(description="Comma delimmited list of topics that will published before and after the request, and on errors") + public void setNotifyTopics(String notifyTopics) { + this.notifyTopics = notifyTopics; + } + + @StrutsTagAttribute(description="Set whether errors will be shown or not", type="Boolean", defaultValue="true") + public void setShowErrorTransportText(String showErrorTransportText) { + this.showErrorTransportText = showErrorTransportText; + } + + @StrutsTagAttribute(description="Set indicator") + public void setIndicator(String indicator) { + this.indicator = indicator; + } + + @StrutsTagAttribute(description="Show loading text on targets", type="Boolean", defaultValue="false") + public void setShowLoadingText(String showLoadingText) { + this.showLoadingText = showLoadingText; + } + + @StrutsTagAttribute(description="The css class to use for element") + public void setCssClass(String cssClass) { + super.setCssClass(cssClass); + } + + @StrutsTagAttribute(description="The css style to use for element") + public void setCssStyle(String cssStyle) { + super.setCssStyle(cssStyle); + } + + @StrutsTagAttribute(description="The id to use for the element") + public void setId(String id) { + super.setId(id); + } + + @StrutsTagAttribute(description="The name to set for element") + public void setName(String name) { + super.setName(name); + } + + @StrutsTagAttribute(description="The type of submit to use. Valid values are input, " + + "button and image.", defaultValue="input") + public void setType(String type) { + super.setType(type); + } + + @StrutsTagAttribute(description="Preset the value of input element.") + public void setValue(String value) { + super.setValue(value); + } + + @StrutsTagAttribute(description="Label expression used for rendering a element specific label") + public void setLabel(String label) { + super.setLabel(label); + } + + @StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request succeeds)") + public void setAfterNotifyTopics(String afterNotifyTopics) { + this.afterNotifyTopics = afterNotifyTopics; + } + + @StrutsTagAttribute(description="Comma delimmited list of topics that will published before the request") + public void setBeforeNotifyTopics(String beforeNotifyTopics) { + this.beforeNotifyTopics = beforeNotifyTopics; + } + + @StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request fails)") + public void setErrorNotifyTopics(String errorNotifyTopics) { + this.errorNotifyTopics = errorNotifyTopics; + } + + @StrutsTagAttribute(description = "Color used to perform a highlight effect on the elements specified in the 'targets' attribute", + defaultValue = "none") + public void setHighlightColor(String highlightColor) { + this.highlightColor = highlightColor; + } + + @StrutsTagAttribute(description = "Duration of highlight effect in milliseconds. Only valid if 'highlightColor' attribute is set", + defaultValue = "1000") + public void setHighlightDuration(String highlightDuration) { + this.highlightDuration = highlightDuration; + } + + @StrutsTagAttribute(description = "Perform Ajax calidation. 'ajaxValidation' interceptor must be applied to action", type="Boolean", + defaultValue = "false") + public void setValidate(String validate) { + this.validate = validate; + } + + @StrutsTagAttribute(description = "Make an asynchronous request if validation succeeds. Only valid if 'validate' is 'true'", type="Boolean", + defaultValue = "false") + public void setAjaxAfterValidation(String ajaxAfterValidation) { + this.ajaxAfterValidation = ajaxAfterValidation; + } + + @StrutsTagSkipInheritance + public void setAction(String action) { + super.setAction(action); + } + + @StrutsTagAttribute(description="Run scripts in a separate scope, unique for each tag", defaultValue="true") + public void setSeparateScripts(String separateScripts) { + this.separateScripts = separateScripts; + } + + @StrutsTagAttribute(description="Transport used by Dojo to make the request", defaultValue="XMLHTTPTransport") + public void setTransport(String transport) { + this.transport = transport; + } + + @StrutsTagAttribute(description="Parse returned HTML for Dojo widgets", defaultValue="true", type="Boolean") + public void setParseContent(String parseContent) { + this.parseContent = parseContent; + } +} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TabbedPanel.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TabbedPanel.java index 100abeeaa..7d63bb4c9 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TabbedPanel.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TabbedPanel.java @@ -1,215 +1,215 @@ -/* - * $Id: TabbedPanel.java 508575 2007-02-16 20:46:49Z musachy $ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.dojo.components; - -import java.util.Random; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.ClosingUIBean; -import org.apache.struts2.views.annotations.StrutsTag; -import org.apache.struts2.views.annotations.StrutsTagAttribute; -import org.apache.struts2.views.annotations.StrutsTagSkipInheritance; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * - * The tabbedpanel widget is primarily an AJAX component, where each tab can either be local content or remote - * content (refreshed each time the user selects that tab).

- * If the useSelectedTabCookie attribute is set to true, the id of the selected tab is saved in a cookie on activation. - * When coming back to this view, the cookie is read and the tab will be activated again, unless an actual value for the - * selectedTab attribute is specified.

- * If you want to use the cookie feature, please be sure that you provide a unique id for your tabbedpanel component, - * since this will also be the identifying name component of the stored cookie.

- * - * - *

Examples - *

- * - * - * <s:tabbedpanel id="test" > - * <s:div id="one" label="one" theme="ajax" labelposition="top" > - * This is the first pane<br/> - * <s:form> - * <s:textfield name="tt" label="Test Text"/> <br/> - * <s:textfield name="tt2" label="Test Text2"/> - * </s:form> - * </s:div> - * <s:div id="three" label="remote" theme="ajax" href="/AjaxTest.action" > - * This is the remote tab - * </s:div> - * </s:tabbedpanel> - * - * - * - * <script type="text/javascript"> - * dojo.event.topic.subscribe("/beforeSelect", function(event, tab, tabContainer){ - * event.cancel = true; - * }); - * </script> - * - * <s:tabbedpanel id="test" beforeSelectTabNotifyTopics="/beforeSelect"> - * <s:div id="three" label="remote" theme="ajax" href="/AjaxTest.action" > - * One Tab - * </s:div> - * <s:div id="three" label="remote" theme="ajax" href="/AjaxTest.action" > - * Another tab - * </s:div> - * </s:tabbedpanel> - * - */ -@StrutsTag(name="tabbedpanel", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.TabbedPanelTag", description="Render a tabbedPanel widget.") -public class TabbedPanel extends ClosingUIBean { - public static final String TEMPLATE = "tabbedpanel"; - public static final String TEMPLATE_CLOSE = "tabbedpanel-close"; - final private static String COMPONENT_NAME = TabbedPanel.class.getName(); - - protected String selectedTab; - protected String closeButton; - protected String doLayout ; - protected String templateCssPath; - protected String beforeSelectTabNotifyTopics; - protected String afterSelectTabNotifyTopics; - protected String disabledTabCssClass; - protected String useSelectedTabCookie; - - public TabbedPanel(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { - super(stack, request, response); - } - - - protected void evaluateExtraParams() { - super.evaluateExtraParams(); - - if (selectedTab != null) - addParameter("selectedTab", findString(selectedTab)); - if (closeButton != null) - addParameter("closeButton", findString(closeButton)); - addParameter("doLayout", doLayout != null ? findValue(doLayout, Boolean.class) : Boolean.FALSE); - if (labelPosition != null) { - //dojo has some weird name for label positions - if(labelPosition.equalsIgnoreCase("left")) - labelPosition = "left-h"; - if(labelPosition.equalsIgnoreCase("right")) - labelPosition = "right-h"; - addParameter("labelPosition", null); - addParameter("labelPosition", labelPosition); - } - if (templateCssPath != null) - addParameter("templateCssPath", findString(templateCssPath)); - if (beforeSelectTabNotifyTopics!= null) - addParameter("beforeSelectTabNotifyTopics", findString(beforeSelectTabNotifyTopics)); - if (afterSelectTabNotifyTopics!= null) - addParameter("afterSelectTabNotifyTopics", findString(afterSelectTabNotifyTopics)); - if (disabledTabCssClass!= null) - addParameter("disabledTabCssClass", findString(disabledTabCssClass)); - if(useSelectedTabCookie != null) { - addParameter("useSelectedTabCookie", findString(useSelectedTabCookie)); - } - - boolean generateId = !(Boolean)stack.getContext().get(Head.PARSE_CONTENT); - addParameter("pushId", generateId); - if ((this.id == null || this.id.length() == 0) && generateId) { - Random random = new Random(); - this.id = "widget_" + Math.abs(random.nextInt()); - addParameter("id", this.id); - } - } - - @Override - @StrutsTagSkipInheritance - public void setTheme(String theme) { - super.setTheme(theme); - } - - @Override - public String getTheme() { - return "ajax"; - } - - public String getDefaultOpenTemplate() { - return TEMPLATE; - } - - protected String getDefaultTemplate() { - return TEMPLATE_CLOSE; - } - - public String getComponentName() { - return COMPONENT_NAME; - } - - @StrutsTagAttribute(description="The id to assign to the component.", required=true) - public void setId(String id) { - // This is required to override tld generation attributes to required=true - super.setId(id); - } - - - @StrutsTagAttribute(description=" The id of the tab that will be selected by default") - public void setSelectedTab(String selectedTab) { - this.selectedTab = selectedTab; - } - - @StrutsTagAttribute(description="Deprecated. Use 'closable' on each div(tab)") - public void setCloseButton(String closeButton) { - this.closeButton = closeButton; - } - - @StrutsTagAttribute(description="If doLayout is false, the tab container's height equals the height of the currently selected tab", type="Boolean", defaultValue="false") - public void setDoLayout(String doLayout) { - this.doLayout = doLayout; - } - - @StrutsTagAttribute(description="Template css path") - public void setTemplateCssPath(String templateCssPath) { - this.templateCssPath = templateCssPath; - } - - - @StrutsTagAttribute(description="Comma separated list of topics to be published when a tab is clicked on (before it is selected)" + - "The tab container widget will be passed as the first argument to the topic. The second parameter is the tab widget." + - "The event can be cancelled setting to 'true' the 'cancel' property " + - "of the third parameter passed to the topics.") - public void setBeforeSelectTabNotifyTopics(String selectedTabNotifyTopics) { - this.beforeSelectTabNotifyTopics = selectedTabNotifyTopics; - } - - @StrutsTagAttribute(description="Comma separated list of topics to be published when a tab is clicked on (after it is selected)." + - "The tab container widget will be passed as the first argument to the topic. The second parameter is the tab widget.") - public void setAfterSelectTabNotifyTopics(String afterSelectTabNotifyTopics) { - this.afterSelectTabNotifyTopics = afterSelectTabNotifyTopics; - } - - @StrutsTagAttribute(description="Css class to be applied to the tab button of disabled tabs", defaultValue="strutsDisabledTab") - public void setDisabledTabCssClass(String disabledTabCssClass) { - this.disabledTabCssClass = disabledTabCssClass; - } - - @StrutsTagAttribute(required = false, defaultValue = "false", description = "If set to true, the id of the last selected " + - "tab will be stored in cookie. If the view is rendered, it will be tried to read this cookie and activate " + - "the corresponding tab on success, unless overridden by the selectedTab attribute. The cookie name is \"Struts2TabbedPanel_selectedTab_\"+id.") - public void setUseSelectedTabCookie( String useSelectedTabCookie ) { - this.useSelectedTabCookie = useSelectedTabCookie; - } -} +/* + * $Id$ + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.struts2.dojo.components; + +import java.util.Random; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts2.components.ClosingUIBean; +import org.apache.struts2.views.annotations.StrutsTag; +import org.apache.struts2.views.annotations.StrutsTagAttribute; +import org.apache.struts2.views.annotations.StrutsTagSkipInheritance; + +import com.opensymphony.xwork2.util.ValueStack; + +/** + * + * The tabbedpanel widget is primarily an AJAX component, where each tab can either be local content or remote + * content (refreshed each time the user selects that tab).

+ * If the useSelectedTabCookie attribute is set to true, the id of the selected tab is saved in a cookie on activation. + * When coming back to this view, the cookie is read and the tab will be activated again, unless an actual value for the + * selectedTab attribute is specified.

+ * If you want to use the cookie feature, please be sure that you provide a unique id for your tabbedpanel component, + * since this will also be the identifying name component of the stored cookie.

+ * + * + *

Examples + *

+ * + * + * <s:tabbedpanel id="test" > + * <s:div id="one" label="one" theme="ajax" labelposition="top" > + * This is the first pane<br/> + * <s:form> + * <s:textfield name="tt" label="Test Text"/> <br/> + * <s:textfield name="tt2" label="Test Text2"/> + * </s:form> + * </s:div> + * <s:div id="three" label="remote" theme="ajax" href="/AjaxTest.action" > + * This is the remote tab + * </s:div> + * </s:tabbedpanel> + * + * + * + * <script type="text/javascript"> + * dojo.event.topic.subscribe("/beforeSelect", function(event, tab, tabContainer){ + * event.cancel = true; + * }); + * </script> + * + * <s:tabbedpanel id="test" beforeSelectTabNotifyTopics="/beforeSelect"> + * <s:div id="three" label="remote" theme="ajax" href="/AjaxTest.action" > + * One Tab + * </s:div> + * <s:div id="three" label="remote" theme="ajax" href="/AjaxTest.action" > + * Another tab + * </s:div> + * </s:tabbedpanel> + * + */ +@StrutsTag(name="tabbedpanel", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.TabbedPanelTag", description="Render a tabbedPanel widget.") +public class TabbedPanel extends ClosingUIBean { + public static final String TEMPLATE = "tabbedpanel"; + public static final String TEMPLATE_CLOSE = "tabbedpanel-close"; + final private static String COMPONENT_NAME = TabbedPanel.class.getName(); + + protected String selectedTab; + protected String closeButton; + protected String doLayout ; + protected String templateCssPath; + protected String beforeSelectTabNotifyTopics; + protected String afterSelectTabNotifyTopics; + protected String disabledTabCssClass; + protected String useSelectedTabCookie; + + public TabbedPanel(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { + super(stack, request, response); + } + + + protected void evaluateExtraParams() { + super.evaluateExtraParams(); + + if (selectedTab != null) + addParameter("selectedTab", findString(selectedTab)); + if (closeButton != null) + addParameter("closeButton", findString(closeButton)); + addParameter("doLayout", doLayout != null ? findValue(doLayout, Boolean.class) : Boolean.FALSE); + if (labelPosition != null) { + //dojo has some weird name for label positions + if(labelPosition.equalsIgnoreCase("left")) + labelPosition = "left-h"; + if(labelPosition.equalsIgnoreCase("right")) + labelPosition = "right-h"; + addParameter("labelPosition", null); + addParameter("labelPosition", labelPosition); + } + if (templateCssPath != null) + addParameter("templateCssPath", findString(templateCssPath)); + if (beforeSelectTabNotifyTopics!= null) + addParameter("beforeSelectTabNotifyTopics", findString(beforeSelectTabNotifyTopics)); + if (afterSelectTabNotifyTopics!= null) + addParameter("afterSelectTabNotifyTopics", findString(afterSelectTabNotifyTopics)); + if (disabledTabCssClass!= null) + addParameter("disabledTabCssClass", findString(disabledTabCssClass)); + if(useSelectedTabCookie != null) { + addParameter("useSelectedTabCookie", findString(useSelectedTabCookie)); + } + + boolean generateId = !(Boolean)stack.getContext().get(Head.PARSE_CONTENT); + addParameter("pushId", generateId); + if ((this.id == null || this.id.length() == 0) && generateId) { + Random random = new Random(); + this.id = "widget_" + Math.abs(random.nextInt()); + addParameter("id", this.id); + } + } + + @Override + @StrutsTagSkipInheritance + public void setTheme(String theme) { + super.setTheme(theme); + } + + @Override + public String getTheme() { + return "ajax"; + } + + public String getDefaultOpenTemplate() { + return TEMPLATE; + } + + protected String getDefaultTemplate() { + return TEMPLATE_CLOSE; + } + + public String getComponentName() { + return COMPONENT_NAME; + } + + @StrutsTagAttribute(description="The id to assign to the component.", required=true) + public void setId(String id) { + // This is required to override tld generation attributes to required=true + super.setId(id); + } + + + @StrutsTagAttribute(description=" The id of the tab that will be selected by default") + public void setSelectedTab(String selectedTab) { + this.selectedTab = selectedTab; + } + + @StrutsTagAttribute(description="Deprecated. Use 'closable' on each div(tab)") + public void setCloseButton(String closeButton) { + this.closeButton = closeButton; + } + + @StrutsTagAttribute(description="If doLayout is false, the tab container's height equals the height of the currently selected tab", type="Boolean", defaultValue="false") + public void setDoLayout(String doLayout) { + this.doLayout = doLayout; + } + + @StrutsTagAttribute(description="Template css path") + public void setTemplateCssPath(String templateCssPath) { + this.templateCssPath = templateCssPath; + } + + + @StrutsTagAttribute(description="Comma separated list of topics to be published when a tab is clicked on (before it is selected)" + + "The tab container widget will be passed as the first argument to the topic. The second parameter is the tab widget." + + "The event can be cancelled setting to 'true' the 'cancel' property " + + "of the third parameter passed to the topics.") + public void setBeforeSelectTabNotifyTopics(String selectedTabNotifyTopics) { + this.beforeSelectTabNotifyTopics = selectedTabNotifyTopics; + } + + @StrutsTagAttribute(description="Comma separated list of topics to be published when a tab is clicked on (after it is selected)." + + "The tab container widget will be passed as the first argument to the topic. The second parameter is the tab widget.") + public void setAfterSelectTabNotifyTopics(String afterSelectTabNotifyTopics) { + this.afterSelectTabNotifyTopics = afterSelectTabNotifyTopics; + } + + @StrutsTagAttribute(description="Css class to be applied to the tab button of disabled tabs", defaultValue="strutsDisabledTab") + public void setDisabledTabCssClass(String disabledTabCssClass) { + this.disabledTabCssClass = disabledTabCssClass; + } + + @StrutsTagAttribute(required = false, defaultValue = "false", description = "If set to true, the id of the last selected " + + "tab will be stored in cookie. If the view is rendered, it will be tried to read this cookie and activate " + + "the corresponding tab on success, unless overridden by the selectedTab attribute. The cookie name is \"Struts2TabbedPanel_selectedTab_\"+id.") + public void setUseSelectedTabCookie( String useSelectedTabCookie ) { + this.useSelectedTabCookie = useSelectedTabCookie; + } +} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TextArea.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TextArea.java index 70ccf7aef..27f392a1b 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TextArea.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TextArea.java @@ -1,62 +1,62 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.dojo.components; - -import java.util.Random; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.views.annotations.StrutsTag; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * - * Render Dojo Editor2 widget - * - * - */ -@StrutsTag(name="textarea", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.TextareaTag", description="Renders Dojo Editor2 widget") -public class TextArea extends org.apache.struts2.components.TextArea { - - public TextArea(ValueStack stack, HttpServletRequest request, - HttpServletResponse response) { - super(stack, request, response); - } - - public void evaluateExtraParams() { - super.evaluateExtraParams(); - - boolean generateId = !(Boolean)stack.getContext().get(Head.PARSE_CONTENT); - addParameter("pushId", generateId); - if ((this.id == null || this.id.length() == 0) && generateId) { - Random random = new Random(); - this.id = "widget_" + Math.abs(random.nextInt()); - addParameter("id", this.id); - } - } - - @Override - public String getTheme() { - return "ajax"; - } -} +/* + * $Id$ + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.struts2.dojo.components; + +import java.util.Random; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts2.views.annotations.StrutsTag; + +import com.opensymphony.xwork2.util.ValueStack; + +/** + * + * Render Dojo Editor2 widget + * + * + */ +@StrutsTag(name="textarea", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.TextareaTag", description="Renders Dojo Editor2 widget") +public class TextArea extends org.apache.struts2.components.TextArea { + + public TextArea(ValueStack stack, HttpServletRequest request, + HttpServletResponse response) { + super(stack, request, response); + } + + public void evaluateExtraParams() { + super.evaluateExtraParams(); + + boolean generateId = !(Boolean)stack.getContext().get(Head.PARSE_CONTENT); + addParameter("pushId", generateId); + if ((this.id == null || this.id.length() == 0) && generateId) { + Random random = new Random(); + this.id = "widget_" + Math.abs(random.nextInt()); + addParameter("id", this.id); + } + } + + @Override + public String getTheme() { + return "ajax"; + } +} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Tree.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Tree.java index 3c9e7f3a8..615dbf309 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Tree.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Tree.java @@ -1,542 +1,542 @@ -/* - * $Id: Tree.java 497654 2007-01-19 00:21:57Z rgielen $ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.dojo.components; - -import java.io.Writer; -import java.util.ArrayList; -import java.util.List; -import java.util.Random; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.ClosingUIBean; -import org.apache.struts2.views.annotations.StrutsTag; -import org.apache.struts2.views.annotations.StrutsTagAttribute; -import org.apache.struts2.views.annotations.StrutsTagSkipInheritance; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * - * - * Renders a tree widget with AJAX support.

- * - * The "id "attribute is normally specified(recommended), such that it could be looked up using - * javascript if necessary. The "id" attribute is required if the "selectedNotifyTopic" or the - * "href" attributes are going to be used.

- * - * - * - * - * <s:tree id="..." label="..."> - * <s:treenode id="..." label="..." /> - * <s:treenode id="..." label="..."> - * <s:treenode id="..." label="..." /> - * <s:treenode id="..." label="..." /> - * </s:treenode> - * <s:treenode id="..." label="..." /> - * </s:tree> - * - * - * - * <s:tree - * id="..." - * rootNode="..." - * nodeIdProperty="..." - * nodeTitleProperty="..." - * childCollectionProperty="..." /> - * - * - * - * <s:url id="nodesUrl" namespace="/nodecorate" action="getNodes" /> - * <div style="float:left; margin-right: 50px;"> - * <sx:tree id="tree" href="%{#nodesUrl}" /> - * </div> - * - * On this example the url specified on the "href" attibute will be called to load - * the elements on the root. The response is expected to be a JSON array of objects like: - * [ - * { - * label: "Node 1", - * hasChildren: false, - * id: "Node1" - * }, - * { - * label: "Node 2", - * hasChildren: true, - * id: "Node2" - * }, - * ] - * - * "label" is the text that will be displayed for the node. "hasChildren" marks the node has - * having children or not (if true, a plus icon will be assigned to the node so it can be - * expanded). The "id" attribute will be used to load the children of the node, when the node - * is expanded. When a node is expanded a request will be made to the url in the "href" attribute - * and the node's "id" will be passed in the parameter "nodeId". - * - * The children collection for a node will be loaded only once, to reload the children of a - * node, use the "reload()" function of the treenode widget. To reload the children nodes of "Node1" - * from the example above use the following javascript: - * - * dojo.widget.byId("Node1").reload(); - * - */ -@StrutsTag(name="tree", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.TreeTag", description="Render a tree widget.") -public class Tree extends ClosingUIBean { - - private static final String TEMPLATE = "tree-close"; - private static final String OPEN_TEMPLATE = "tree"; - - protected String toggle; - protected String selectedNotifyTopics; - protected String expandedNotifyTopics; - protected String collapsedNotifyTopics; - protected String rootNodeAttr; - protected String childCollectionProperty; - protected String nodeTitleProperty; - protected String nodeIdProperty; - protected String showRootGrid; - - protected String showGrid; - protected String blankIconSrc; - protected String gridIconSrcL; - protected String gridIconSrcV; - protected String gridIconSrcP; - protected String gridIconSrcC; - protected String gridIconSrcX; - protected String gridIconSrcY; - protected String expandIconSrcPlus; - protected String expandIconSrcMinus; - protected String iconWidth; - protected String iconHeight; - protected String toggleDuration; - protected String templateCssPath; - protected String href; - protected String errorNotifyTopics; - - private List childrenIds; - - public Tree(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { - super(stack, request, response); - } - - public boolean start(Writer writer) { - boolean result = super.start(writer); - - if (this.label == null && (href == null)) { - if ((rootNodeAttr == null) - || (childCollectionProperty == null) - || (nodeTitleProperty == null) - || (nodeIdProperty == null)) { - fieldError("label","The TreeTag requires either a value for 'label' or 'href' or ALL of 'rootNode', " + - "'childCollectionProperty', 'nodeTitleProperty', and 'nodeIdProperty'", null); - } - } - return result; - } - - protected void evaluateExtraParams() { - super.evaluateExtraParams(); - - if (toggle != null) { - addParameter("toggle", findString(toggle)); - } else { - addParameter("toggle", "fade"); - } - - if (selectedNotifyTopics != null) { - addParameter("selectedNotifyTopics", findString(selectedNotifyTopics)); - } - - if (expandedNotifyTopics != null) { - addParameter("expandedNotifyTopics", findString(expandedNotifyTopics)); - } - - if (collapsedNotifyTopics != null) { - addParameter("collapsedNotifyTopics", findString(collapsedNotifyTopics)); - } - - if (rootNodeAttr != null) { - addParameter("rootNode", findValue(rootNodeAttr)); - } - - if (childCollectionProperty != null) { - addParameter("childCollectionProperty", findString(childCollectionProperty)); - } - - if (nodeTitleProperty != null) { - addParameter("nodeTitleProperty", findString(nodeTitleProperty)); - } - - if (nodeIdProperty != null) { - addParameter("nodeIdProperty", findString(nodeIdProperty)); - } - - if (showRootGrid != null) { - addParameter("showRootGrid", findValue(showRootGrid, Boolean.class)); - } - - - if (showGrid != null) { - addParameter("showGrid", findValue(showGrid, Boolean.class)); - } - - if (blankIconSrc != null) { - addParameter("blankIconSrc", findString(blankIconSrc)); - } - - if (gridIconSrcL != null) { - addParameter("gridIconSrcL", findString(gridIconSrcL)); - } - - if (gridIconSrcV != null) { - addParameter("gridIconSrcV", findString(gridIconSrcV)); - } - - if (gridIconSrcP != null) { - addParameter("gridIconSrcP", findString(gridIconSrcP)); - } - - if (gridIconSrcC != null) { - addParameter("gridIconSrcC", findString(gridIconSrcC)); - } - - if (gridIconSrcX != null) { - addParameter("gridIconSrcX", findString(gridIconSrcX)); - } - - if (gridIconSrcY != null) { - addParameter("gridIconSrcY", findString(gridIconSrcY)); - } - - if (expandIconSrcPlus != null) { - addParameter("expandIconSrcPlus", findString(expandIconSrcPlus)); - } - - if (expandIconSrcMinus != null) { - addParameter("expandIconSrcMinus", findString(expandIconSrcMinus)); - } - - if (iconWidth != null) { - addParameter("iconWidth", findValue(iconWidth, Integer.class)); - } - if (iconHeight != null) { - addParameter("iconHeight", findValue(iconHeight, Integer.class)); - } - if (toggleDuration != null) { - addParameter("toggleDuration", findValue(toggleDuration, Integer.class)); - } - if (templateCssPath != null) { - addParameter("templateCssPath", findString(templateCssPath)); - } - if (href != null) - addParameter("href", findString(href)); - if (errorNotifyTopics != null) - addParameter("errorNotifyTopics", findString(errorNotifyTopics)); - - boolean generateId = !(Boolean)stack.getContext().get(Head.PARSE_CONTENT); - addParameter("pushId", generateId); - if ((this.id == null || this.id.length() == 0) && generateId) { - Random random = new Random(); - this.id = "widget_" + Math.abs(random.nextInt()); - addParameter("id", this.id); - } - - if (this.childrenIds != null) - addParameter("childrenIds", this.childrenIds); - } - - public void addChildrenId(String id) { - if (this.childrenIds == null) - this.childrenIds = new ArrayList(); - this.childrenIds.add(id); - } - - @Override - @StrutsTagSkipInheritance - public void setTheme(String theme) { - super.setTheme(theme); - } - - @Override - public String getTheme() { - return "ajax"; - } - - public String getDefaultOpenTemplate() { - return OPEN_TEMPLATE; - } - - protected String getDefaultTemplate() { - return TEMPLATE; - } - - public String getToggle() { - return toggle; - } - - @StrutsTagAttribute(description="The toggle property (either 'explode' or 'fade')", defaultValue="fade") - public void setToggle(String toggle) { - this.toggle = toggle; - } - - @StrutsTagAttribute(description="Deprecated. Use 'selectedNotifyTopics' instead.") - public void setTreeSelectedTopic(String selectedNotifyTopic) { - this.selectedNotifyTopics = selectedNotifyTopic; - } - - @StrutsTagAttribute(description="Deprecated. Use 'expandedNotifyTopics' instead.") - public void setTreeExpandedTopics(String expandedNotifyTopic) { - this.expandedNotifyTopics = expandedNotifyTopic; - } - - @StrutsTagAttribute(description="Deprecated. Use 'collapsedNotifyTopics' instead.") - public void setTreeCollapsedTopics(String collapsedNotifyTopic) { - this.collapsedNotifyTopics = collapsedNotifyTopic; - } - - public String getRootNode() { - return rootNodeAttr; - } - - @StrutsTagAttribute(description="The rootNode property.") - public void setRootNode(String rootNode) { - this.rootNodeAttr = rootNode; - } - - public String getChildCollectionProperty() { - return childCollectionProperty; - } - - @StrutsTagAttribute(description="The childCollectionProperty property.") - public void setChildCollectionProperty(String childCollectionProperty) { - this.childCollectionProperty = childCollectionProperty; - } - - public String getNodeTitleProperty() { - return nodeTitleProperty; - } - - @StrutsTagAttribute(description="The nodeTitleProperty property.") - public void setNodeTitleProperty(String nodeTitleProperty) { - this.nodeTitleProperty = nodeTitleProperty; - } - - public String getNodeIdProperty() { - return nodeIdProperty; - } - - @StrutsTagAttribute(description="The nodeIdProperty property.") - public void setNodeIdProperty(String nodeIdProperty) { - this.nodeIdProperty = nodeIdProperty; - } - - @StrutsTagAttribute(description="The showRootGrid property (default true).") - public void setShowRootGrid(String showRootGrid) { - this.showRootGrid = showRootGrid; - } - - public String getShowRootGrid() { - return showRootGrid; - } - - public String getBlankIconSrc() { - return blankIconSrc; - } - - @StrutsTagAttribute(description="Blank icon image source.") - public void setBlankIconSrc(String blankIconSrc) { - this.blankIconSrc = blankIconSrc; - } - - public String getExpandIconSrcMinus() { - return expandIconSrcMinus; - } - - @StrutsTagAttribute(description="Expand icon (-) image source.") - public void setExpandIconSrcMinus(String expandIconSrcMinus) { - this.expandIconSrcMinus = expandIconSrcMinus; - } - - public String getExpandIconSrcPlus() { - return expandIconSrcPlus; - } - - @StrutsTagAttribute(description="Expand Icon (+) image source.") - public void setExpandIconSrcPlus(String expandIconSrcPlus) { - this.expandIconSrcPlus = expandIconSrcPlus; - } - - public String getGridIconSrcC() { - return gridIconSrcC; - } - - @StrutsTagAttribute(description="Image source for under child item child icons.") - public void setGridIconSrcC(String gridIconSrcC) { - this.gridIconSrcC = gridIconSrcC; - } - - public String getGridIconSrcL() { - return gridIconSrcL; - } - - - @StrutsTagAttribute(description=" Image source for last child grid.") - public void setGridIconSrcL(String gridIconSrcL) { - this.gridIconSrcL = gridIconSrcL; - } - - public String getGridIconSrcP() { - return gridIconSrcP; - } - - @StrutsTagAttribute(description="Image source for under parent item child icons.") - public void setGridIconSrcP(String gridIconSrcP) { - this.gridIconSrcP = gridIconSrcP; - } - - public String getGridIconSrcV() { - return gridIconSrcV; - } - - @StrutsTagAttribute(description="Image source for vertical line.") - public void setGridIconSrcV(String gridIconSrcV) { - this.gridIconSrcV = gridIconSrcV; - } - - public String getGridIconSrcX() { - return gridIconSrcX; - } - - @StrutsTagAttribute(description="Image source for grid for sole root item.") - public void setGridIconSrcX(String gridIconSrcX) { - this.gridIconSrcX = gridIconSrcX; - } - - public String getGridIconSrcY() { - return gridIconSrcY; - } - - @StrutsTagAttribute(description="Image source for grid for last root item.") - public void setGridIconSrcY(String gridIconSrcY) { - this.gridIconSrcY = gridIconSrcY; - } - - public String getIconHeight() { - return iconHeight; - } - - - @StrutsTagAttribute(description="Icon height", defaultValue="18px") - public void setIconHeight(String iconHeight) { - this.iconHeight = iconHeight; - } - - public String getIconWidth() { - return iconWidth; - } - - @StrutsTagAttribute(description="Icon width", defaultValue="19px") - public void setIconWidth(String iconWidth) { - this.iconWidth = iconWidth; - } - - - - public String getTemplateCssPath() { - return templateCssPath; - } - - @StrutsTagAttribute(description="Template css path", defaultValue="{contextPath}/struts/tree.css.") - public void setTemplateCssPath(String templateCssPath) { - this.templateCssPath = templateCssPath; - } - - public String getToggleDuration() { - return toggleDuration; - } - - @StrutsTagAttribute(description="Toggle duration in milliseconds", defaultValue="150") - public void setToggleDuration(String toggleDuration) { - this.toggleDuration = toggleDuration; - } - - public String getShowGrid() { - return showGrid; - } - - @StrutsTagAttribute(description="Show grid", type="Boolean", defaultValue="true") - public void setShowGrid(String showGrid) { - this.showGrid = showGrid; - } - - @StrutsTagAttribute(description="The css class to use for element") - public void setCssClass(String cssClass) { - super.setCssClass(cssClass); - } - - @StrutsTagAttribute(description="The css style to use for element") - public void setCssStyle(String cssStyle) { - super.setCssStyle(cssStyle); - } - - @StrutsTagAttribute(description="The id to use for the element") - public void setId(String id) { - super.setId(id); - } - - @StrutsTagAttribute(description="The name to set for element") - public void setName(String name) { - super.setName(name); - } - - @StrutsTagAttribute(description="Comma separated lis of topics to be published when a node" + - " is collapsed. An object with a 'node' property will be passed as parameter to the topics.") - public void setCollapsedNotifyTopics(String collapsedNotifyTopics) { - this.collapsedNotifyTopics = collapsedNotifyTopics; - } - - @StrutsTagAttribute(description="Comma separated lis of topics to be published when a node" + - " is expanded. An object with a 'node' property will be passed as parameter to the topics.") - public void setExpandedNotifyTopics(String expandedNotifyTopics) { - this.expandedNotifyTopics= expandedNotifyTopics; - } - - @StrutsTagAttribute(description="Comma separated lis of topics to be published when a node" + - " is selected. An object with a 'node' property will be passed as parameter to the topics.") - public void setSelectedNotifyTopics(String selectedNotifyTopics) { - this.selectedNotifyTopics = selectedNotifyTopics; - } - - @StrutsTagAttribute(description="Url used to load the list of children nodes for an specific node, whose id will be " + - "passed as a parameter named 'nodeId' (empty for root)") - public void setHref(String href) { - this.href = href; - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request fails)." + - "Only valid if 'href' is set") - public void setErrorNotifyTopics(String errorNotifyTopics) { - this.errorNotifyTopics = errorNotifyTopics; - } -} - +/* + * $Id$ + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.struts2.dojo.components; + +import java.io.Writer; +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts2.components.ClosingUIBean; +import org.apache.struts2.views.annotations.StrutsTag; +import org.apache.struts2.views.annotations.StrutsTagAttribute; +import org.apache.struts2.views.annotations.StrutsTagSkipInheritance; + +import com.opensymphony.xwork2.util.ValueStack; + +/** + * + * + * Renders a tree widget with AJAX support.

+ * + * The "id "attribute is normally specified(recommended), such that it could be looked up using + * javascript if necessary. The "id" attribute is required if the "selectedNotifyTopic" or the + * "href" attributes are going to be used.

+ * + * + * + * + * <s:tree id="..." label="..."> + * <s:treenode id="..." label="..." /> + * <s:treenode id="..." label="..."> + * <s:treenode id="..." label="..." /> + * <s:treenode id="..." label="..." /> + * </s:treenode> + * <s:treenode id="..." label="..." /> + * </s:tree> + * + * + * + * <s:tree + * id="..." + * rootNode="..." + * nodeIdProperty="..." + * nodeTitleProperty="..." + * childCollectionProperty="..." /> + * + * + * + * <s:url id="nodesUrl" namespace="/nodecorate" action="getNodes" /> + * <div style="float:left; margin-right: 50px;"> + * <sx:tree id="tree" href="%{#nodesUrl}" /> + * </div> + * + * On this example the url specified on the "href" attibute will be called to load + * the elements on the root. The response is expected to be a JSON array of objects like: + * [ + * { + * label: "Node 1", + * hasChildren: false, + * id: "Node1" + * }, + * { + * label: "Node 2", + * hasChildren: true, + * id: "Node2" + * }, + * ] + * + * "label" is the text that will be displayed for the node. "hasChildren" marks the node has + * having children or not (if true, a plus icon will be assigned to the node so it can be + * expanded). The "id" attribute will be used to load the children of the node, when the node + * is expanded. When a node is expanded a request will be made to the url in the "href" attribute + * and the node's "id" will be passed in the parameter "nodeId". + * + * The children collection for a node will be loaded only once, to reload the children of a + * node, use the "reload()" function of the treenode widget. To reload the children nodes of "Node1" + * from the example above use the following javascript: + * + * dojo.widget.byId("Node1").reload(); + * + */ +@StrutsTag(name="tree", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.TreeTag", description="Render a tree widget.") +public class Tree extends ClosingUIBean { + + private static final String TEMPLATE = "tree-close"; + private static final String OPEN_TEMPLATE = "tree"; + + protected String toggle; + protected String selectedNotifyTopics; + protected String expandedNotifyTopics; + protected String collapsedNotifyTopics; + protected String rootNodeAttr; + protected String childCollectionProperty; + protected String nodeTitleProperty; + protected String nodeIdProperty; + protected String showRootGrid; + + protected String showGrid; + protected String blankIconSrc; + protected String gridIconSrcL; + protected String gridIconSrcV; + protected String gridIconSrcP; + protected String gridIconSrcC; + protected String gridIconSrcX; + protected String gridIconSrcY; + protected String expandIconSrcPlus; + protected String expandIconSrcMinus; + protected String iconWidth; + protected String iconHeight; + protected String toggleDuration; + protected String templateCssPath; + protected String href; + protected String errorNotifyTopics; + + private List childrenIds; + + public Tree(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { + super(stack, request, response); + } + + public boolean start(Writer writer) { + boolean result = super.start(writer); + + if (this.label == null && (href == null)) { + if ((rootNodeAttr == null) + || (childCollectionProperty == null) + || (nodeTitleProperty == null) + || (nodeIdProperty == null)) { + fieldError("label","The TreeTag requires either a value for 'label' or 'href' or ALL of 'rootNode', " + + "'childCollectionProperty', 'nodeTitleProperty', and 'nodeIdProperty'", null); + } + } + return result; + } + + protected void evaluateExtraParams() { + super.evaluateExtraParams(); + + if (toggle != null) { + addParameter("toggle", findString(toggle)); + } else { + addParameter("toggle", "fade"); + } + + if (selectedNotifyTopics != null) { + addParameter("selectedNotifyTopics", findString(selectedNotifyTopics)); + } + + if (expandedNotifyTopics != null) { + addParameter("expandedNotifyTopics", findString(expandedNotifyTopics)); + } + + if (collapsedNotifyTopics != null) { + addParameter("collapsedNotifyTopics", findString(collapsedNotifyTopics)); + } + + if (rootNodeAttr != null) { + addParameter("rootNode", findValue(rootNodeAttr)); + } + + if (childCollectionProperty != null) { + addParameter("childCollectionProperty", findString(childCollectionProperty)); + } + + if (nodeTitleProperty != null) { + addParameter("nodeTitleProperty", findString(nodeTitleProperty)); + } + + if (nodeIdProperty != null) { + addParameter("nodeIdProperty", findString(nodeIdProperty)); + } + + if (showRootGrid != null) { + addParameter("showRootGrid", findValue(showRootGrid, Boolean.class)); + } + + + if (showGrid != null) { + addParameter("showGrid", findValue(showGrid, Boolean.class)); + } + + if (blankIconSrc != null) { + addParameter("blankIconSrc", findString(blankIconSrc)); + } + + if (gridIconSrcL != null) { + addParameter("gridIconSrcL", findString(gridIconSrcL)); + } + + if (gridIconSrcV != null) { + addParameter("gridIconSrcV", findString(gridIconSrcV)); + } + + if (gridIconSrcP != null) { + addParameter("gridIconSrcP", findString(gridIconSrcP)); + } + + if (gridIconSrcC != null) { + addParameter("gridIconSrcC", findString(gridIconSrcC)); + } + + if (gridIconSrcX != null) { + addParameter("gridIconSrcX", findString(gridIconSrcX)); + } + + if (gridIconSrcY != null) { + addParameter("gridIconSrcY", findString(gridIconSrcY)); + } + + if (expandIconSrcPlus != null) { + addParameter("expandIconSrcPlus", findString(expandIconSrcPlus)); + } + + if (expandIconSrcMinus != null) { + addParameter("expandIconSrcMinus", findString(expandIconSrcMinus)); + } + + if (iconWidth != null) { + addParameter("iconWidth", findValue(iconWidth, Integer.class)); + } + if (iconHeight != null) { + addParameter("iconHeight", findValue(iconHeight, Integer.class)); + } + if (toggleDuration != null) { + addParameter("toggleDuration", findValue(toggleDuration, Integer.class)); + } + if (templateCssPath != null) { + addParameter("templateCssPath", findString(templateCssPath)); + } + if (href != null) + addParameter("href", findString(href)); + if (errorNotifyTopics != null) + addParameter("errorNotifyTopics", findString(errorNotifyTopics)); + + boolean generateId = !(Boolean)stack.getContext().get(Head.PARSE_CONTENT); + addParameter("pushId", generateId); + if ((this.id == null || this.id.length() == 0) && generateId) { + Random random = new Random(); + this.id = "widget_" + Math.abs(random.nextInt()); + addParameter("id", this.id); + } + + if (this.childrenIds != null) + addParameter("childrenIds", this.childrenIds); + } + + public void addChildrenId(String id) { + if (this.childrenIds == null) + this.childrenIds = new ArrayList(); + this.childrenIds.add(id); + } + + @Override + @StrutsTagSkipInheritance + public void setTheme(String theme) { + super.setTheme(theme); + } + + @Override + public String getTheme() { + return "ajax"; + } + + public String getDefaultOpenTemplate() { + return OPEN_TEMPLATE; + } + + protected String getDefaultTemplate() { + return TEMPLATE; + } + + public String getToggle() { + return toggle; + } + + @StrutsTagAttribute(description="The toggle property (either 'explode' or 'fade')", defaultValue="fade") + public void setToggle(String toggle) { + this.toggle = toggle; + } + + @StrutsTagAttribute(description="Deprecated. Use 'selectedNotifyTopics' instead.") + public void setTreeSelectedTopic(String selectedNotifyTopic) { + this.selectedNotifyTopics = selectedNotifyTopic; + } + + @StrutsTagAttribute(description="Deprecated. Use 'expandedNotifyTopics' instead.") + public void setTreeExpandedTopics(String expandedNotifyTopic) { + this.expandedNotifyTopics = expandedNotifyTopic; + } + + @StrutsTagAttribute(description="Deprecated. Use 'collapsedNotifyTopics' instead.") + public void setTreeCollapsedTopics(String collapsedNotifyTopic) { + this.collapsedNotifyTopics = collapsedNotifyTopic; + } + + public String getRootNode() { + return rootNodeAttr; + } + + @StrutsTagAttribute(description="The rootNode property.") + public void setRootNode(String rootNode) { + this.rootNodeAttr = rootNode; + } + + public String getChildCollectionProperty() { + return childCollectionProperty; + } + + @StrutsTagAttribute(description="The childCollectionProperty property.") + public void setChildCollectionProperty(String childCollectionProperty) { + this.childCollectionProperty = childCollectionProperty; + } + + public String getNodeTitleProperty() { + return nodeTitleProperty; + } + + @StrutsTagAttribute(description="The nodeTitleProperty property.") + public void setNodeTitleProperty(String nodeTitleProperty) { + this.nodeTitleProperty = nodeTitleProperty; + } + + public String getNodeIdProperty() { + return nodeIdProperty; + } + + @StrutsTagAttribute(description="The nodeIdProperty property.") + public void setNodeIdProperty(String nodeIdProperty) { + this.nodeIdProperty = nodeIdProperty; + } + + @StrutsTagAttribute(description="The showRootGrid property (default true).") + public void setShowRootGrid(String showRootGrid) { + this.showRootGrid = showRootGrid; + } + + public String getShowRootGrid() { + return showRootGrid; + } + + public String getBlankIconSrc() { + return blankIconSrc; + } + + @StrutsTagAttribute(description="Blank icon image source.") + public void setBlankIconSrc(String blankIconSrc) { + this.blankIconSrc = blankIconSrc; + } + + public String getExpandIconSrcMinus() { + return expandIconSrcMinus; + } + + @StrutsTagAttribute(description="Expand icon (-) image source.") + public void setExpandIconSrcMinus(String expandIconSrcMinus) { + this.expandIconSrcMinus = expandIconSrcMinus; + } + + public String getExpandIconSrcPlus() { + return expandIconSrcPlus; + } + + @StrutsTagAttribute(description="Expand Icon (+) image source.") + public void setExpandIconSrcPlus(String expandIconSrcPlus) { + this.expandIconSrcPlus = expandIconSrcPlus; + } + + public String getGridIconSrcC() { + return gridIconSrcC; + } + + @StrutsTagAttribute(description="Image source for under child item child icons.") + public void setGridIconSrcC(String gridIconSrcC) { + this.gridIconSrcC = gridIconSrcC; + } + + public String getGridIconSrcL() { + return gridIconSrcL; + } + + + @StrutsTagAttribute(description=" Image source for last child grid.") + public void setGridIconSrcL(String gridIconSrcL) { + this.gridIconSrcL = gridIconSrcL; + } + + public String getGridIconSrcP() { + return gridIconSrcP; + } + + @StrutsTagAttribute(description="Image source for under parent item child icons.") + public void setGridIconSrcP(String gridIconSrcP) { + this.gridIconSrcP = gridIconSrcP; + } + + public String getGridIconSrcV() { + return gridIconSrcV; + } + + @StrutsTagAttribute(description="Image source for vertical line.") + public void setGridIconSrcV(String gridIconSrcV) { + this.gridIconSrcV = gridIconSrcV; + } + + public String getGridIconSrcX() { + return gridIconSrcX; + } + + @StrutsTagAttribute(description="Image source for grid for sole root item.") + public void setGridIconSrcX(String gridIconSrcX) { + this.gridIconSrcX = gridIconSrcX; + } + + public String getGridIconSrcY() { + return gridIconSrcY; + } + + @StrutsTagAttribute(description="Image source for grid for last root item.") + public void setGridIconSrcY(String gridIconSrcY) { + this.gridIconSrcY = gridIconSrcY; + } + + public String getIconHeight() { + return iconHeight; + } + + + @StrutsTagAttribute(description="Icon height", defaultValue="18px") + public void setIconHeight(String iconHeight) { + this.iconHeight = iconHeight; + } + + public String getIconWidth() { + return iconWidth; + } + + @StrutsTagAttribute(description="Icon width", defaultValue="19px") + public void setIconWidth(String iconWidth) { + this.iconWidth = iconWidth; + } + + + + public String getTemplateCssPath() { + return templateCssPath; + } + + @StrutsTagAttribute(description="Template css path", defaultValue="{contextPath}/struts/tree.css.") + public void setTemplateCssPath(String templateCssPath) { + this.templateCssPath = templateCssPath; + } + + public String getToggleDuration() { + return toggleDuration; + } + + @StrutsTagAttribute(description="Toggle duration in milliseconds", defaultValue="150") + public void setToggleDuration(String toggleDuration) { + this.toggleDuration = toggleDuration; + } + + public String getShowGrid() { + return showGrid; + } + + @StrutsTagAttribute(description="Show grid", type="Boolean", defaultValue="true") + public void setShowGrid(String showGrid) { + this.showGrid = showGrid; + } + + @StrutsTagAttribute(description="The css class to use for element") + public void setCssClass(String cssClass) { + super.setCssClass(cssClass); + } + + @StrutsTagAttribute(description="The css style to use for element") + public void setCssStyle(String cssStyle) { + super.setCssStyle(cssStyle); + } + + @StrutsTagAttribute(description="The id to use for the element") + public void setId(String id) { + super.setId(id); + } + + @StrutsTagAttribute(description="The name to set for element") + public void setName(String name) { + super.setName(name); + } + + @StrutsTagAttribute(description="Comma separated lis of topics to be published when a node" + + " is collapsed. An object with a 'node' property will be passed as parameter to the topics.") + public void setCollapsedNotifyTopics(String collapsedNotifyTopics) { + this.collapsedNotifyTopics = collapsedNotifyTopics; + } + + @StrutsTagAttribute(description="Comma separated lis of topics to be published when a node" + + " is expanded. An object with a 'node' property will be passed as parameter to the topics.") + public void setExpandedNotifyTopics(String expandedNotifyTopics) { + this.expandedNotifyTopics= expandedNotifyTopics; + } + + @StrutsTagAttribute(description="Comma separated lis of topics to be published when a node" + + " is selected. An object with a 'node' property will be passed as parameter to the topics.") + public void setSelectedNotifyTopics(String selectedNotifyTopics) { + this.selectedNotifyTopics = selectedNotifyTopics; + } + + @StrutsTagAttribute(description="Url used to load the list of children nodes for an specific node, whose id will be " + + "passed as a parameter named 'nodeId' (empty for root)") + public void setHref(String href) { + this.href = href; + } + + @StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request fails)." + + "Only valid if 'href' is set") + public void setErrorNotifyTopics(String errorNotifyTopics) { + this.errorNotifyTopics = errorNotifyTopics; + } +} + diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TreeNode.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TreeNode.java index 4be1752e4..3b5a8f598 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TreeNode.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TreeNode.java @@ -1,153 +1,153 @@ -/* - * $Id: TreeNode.java 497654 2007-01-19 00:21:57Z rgielen $ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.dojo.components; - -import java.util.Random; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.ClosingUIBean; -import org.apache.struts2.views.annotations.StrutsTag; -import org.apache.struts2.views.annotations.StrutsTagAttribute; -import org.apache.struts2.views.annotations.StrutsTagSkipInheritance; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * - * - * Renders a tree node within a tree widget with AJAX support.

- * - * Either of the following combinations should be used depending on if the tree - * is to be constructed dynamically or statically.

- * - * Dynamically: - *

    - *
  • id - id of this tree node
  • - *
  • title - label to be displayed for this tree node
  • - *
- * - * Statically: - *
    - *
  • rootNode - the parent node of which this tree is derived from
  • - *
  • nodeIdProperty - property to obtained this current tree node's id
  • - *
  • nodeTitleProperty - property to obtained this current tree node's title
  • - *
  • childCollectionProperty - property that returnds this current tree node's children
  • - *
- * - * - * - *

Examples - * - *

- * 
- *
- * <-- statically -->
- * <s:tree id="..." label="...">
- *    <s:treenode id="..." label="..." />
- *    <s:treenode id="..." label="...">
- *        <s:treenode id="..." label="..." />
- *        <s:treenode id="..." label="..." />
- *    &;lt;/s:treenode>
- *    <s:treenode id="..." label="..." />
- * </s:tree>
- *
- * <-- dynamically -->
- * <s:tree
- *          id="..."
- *          rootNode="..."
- *          nodeIdProperty="..."
- *          nodeTitleProperty="..."
- *          childCollectionProperty="..." />
- *
- * 
- * 
- * - */ -@StrutsTag(name="treenode", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.TreeNodeTag", description="Render a tree node within a tree widget.") -public class TreeNode extends ClosingUIBean { - private static final String TEMPLATE = "treenode-close"; - private static final String OPEN_TEMPLATE = "treenode"; - - public TreeNode(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { - super(stack, request, response); - } - - @Override - @StrutsTagSkipInheritance - public void setTheme(String theme) { - super.setTheme(theme); - } - - @Override - public String getTheme() { - return "ajax"; - } - - public String getDefaultOpenTemplate() { - return OPEN_TEMPLATE; - } - - protected String getDefaultTemplate() { - return TEMPLATE; - } - - protected void evaluateExtraParams() { - super.evaluateExtraParams(); - - boolean generateId = !(Boolean)stack.getContext().get(Head.PARSE_CONTENT); - addParameter("pushId", generateId); - if ((this.id == null || this.id.length() == 0) && generateId) { - Random random = new Random(); - this.id = "widget_" + Math.abs(random.nextInt()); - addParameter("id", this.id); - } - - Tree parentTree = (Tree) findAncestor(Tree.class); - parentTree.addChildrenId(this.id); - } - - @StrutsTagAttribute(description="Label expression used for rendering tree node label.", required=true) - public void setLabel(String label) { - super.setLabel(label); - } - - @StrutsTagAttribute(description="The css class to use for element") - public void setCssClass(String cssClass) { - super.setCssClass(cssClass); - } - - @StrutsTagAttribute(description="The css style to use for element") - public void setCssStyle(String cssStyle) { - super.setCssStyle(cssStyle); - } - - @StrutsTagAttribute(description="The id to use for the element") - public void setId(String id) { - super.setId(id); - } - - @StrutsTagAttribute(description="The name to set for element") - public void setName(String name) { - super.setName(name); - } -} +/* + * $Id$ + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.struts2.dojo.components; + +import java.util.Random; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts2.components.ClosingUIBean; +import org.apache.struts2.views.annotations.StrutsTag; +import org.apache.struts2.views.annotations.StrutsTagAttribute; +import org.apache.struts2.views.annotations.StrutsTagSkipInheritance; + +import com.opensymphony.xwork2.util.ValueStack; + +/** + * + * + * Renders a tree node within a tree widget with AJAX support.

+ * + * Either of the following combinations should be used depending on if the tree + * is to be constructed dynamically or statically.

+ * + * Dynamically: + *

    + *
  • id - id of this tree node
  • + *
  • title - label to be displayed for this tree node
  • + *
+ * + * Statically: + *
    + *
  • rootNode - the parent node of which this tree is derived from
  • + *
  • nodeIdProperty - property to obtained this current tree node's id
  • + *
  • nodeTitleProperty - property to obtained this current tree node's title
  • + *
  • childCollectionProperty - property that returnds this current tree node's children
  • + *
+ * + * + * + *

Examples + * + *

+ * 
+ *
+ * <-- statically -->
+ * <s:tree id="..." label="...">
+ *    <s:treenode id="..." label="..." />
+ *    <s:treenode id="..." label="...">
+ *        <s:treenode id="..." label="..." />
+ *        <s:treenode id="..." label="..." />
+ *    &;lt;/s:treenode>
+ *    <s:treenode id="..." label="..." />
+ * </s:tree>
+ *
+ * <-- dynamically -->
+ * <s:tree
+ *          id="..."
+ *          rootNode="..."
+ *          nodeIdProperty="..."
+ *          nodeTitleProperty="..."
+ *          childCollectionProperty="..." />
+ *
+ * 
+ * 
+ * + */ +@StrutsTag(name="treenode", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.TreeNodeTag", description="Render a tree node within a tree widget.") +public class TreeNode extends ClosingUIBean { + private static final String TEMPLATE = "treenode-close"; + private static final String OPEN_TEMPLATE = "treenode"; + + public TreeNode(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { + super(stack, request, response); + } + + @Override + @StrutsTagSkipInheritance + public void setTheme(String theme) { + super.setTheme(theme); + } + + @Override + public String getTheme() { + return "ajax"; + } + + public String getDefaultOpenTemplate() { + return OPEN_TEMPLATE; + } + + protected String getDefaultTemplate() { + return TEMPLATE; + } + + protected void evaluateExtraParams() { + super.evaluateExtraParams(); + + boolean generateId = !(Boolean)stack.getContext().get(Head.PARSE_CONTENT); + addParameter("pushId", generateId); + if ((this.id == null || this.id.length() == 0) && generateId) { + Random random = new Random(); + this.id = "widget_" + Math.abs(random.nextInt()); + addParameter("id", this.id); + } + + Tree parentTree = (Tree) findAncestor(Tree.class); + parentTree.addChildrenId(this.id); + } + + @StrutsTagAttribute(description="Label expression used for rendering tree node label.", required=true) + public void setLabel(String label) { + super.setLabel(label); + } + + @StrutsTagAttribute(description="The css class to use for element") + public void setCssClass(String cssClass) { + super.setCssClass(cssClass); + } + + @StrutsTagAttribute(description="The css style to use for element") + public void setCssStyle(String cssStyle) { + super.setCssStyle(cssStyle); + } + + @StrutsTagAttribute(description="The id to use for the element") + public void setId(String id) { + super.setId(id); + } + + @StrutsTagAttribute(description="The name to set for element") + public void setName(String name) { + super.setName(name); + } +} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/DojoTagLibrary.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/DojoTagLibrary.java index b34181b35..fa83080a4 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/DojoTagLibrary.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/DojoTagLibrary.java @@ -1,5 +1,5 @@ /* - * $Id: pom.xml 559206 2007-07-24 21:01:18Z apetrelli $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/AnchorModel.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/AnchorModel.java index 563dfe63b..5152f08ec 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/AnchorModel.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/AnchorModel.java @@ -1,43 +1,43 @@ -/* - * $Id$ - * - * Copyright 2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.struts2.dojo.views.freemarker.tags; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.Anchor; -import org.apache.struts2.views.freemarker.tags.TagModel; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see Anchor - */ -public class AnchorModel extends TagModel { - - public AnchorModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - super(stack, req, res); - } - - @Override - protected Component getBean() { - return new Anchor(stack, req, res); - } - -} +/* + * $Id$ + * + * Copyright 2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.struts2.dojo.views.freemarker.tags; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts2.components.Component; +import org.apache.struts2.dojo.components.Anchor; +import org.apache.struts2.views.freemarker.tags.TagModel; + +import com.opensymphony.xwork2.util.ValueStack; + +/** + * @see Anchor + */ +public class AnchorModel extends TagModel { + + public AnchorModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { + super(stack, req, res); + } + + @Override + protected Component getBean() { + return new Anchor(stack, req, res); + } + +} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/AutocompleterModel.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/AutocompleterModel.java index 3c2784a6b..131379bf7 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/AutocompleterModel.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/AutocompleterModel.java @@ -1,5 +1,5 @@ /* - * $Id: AutocompleterModel.java 502294 2007-02-01 17:28:00Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/BindModel.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/BindModel.java index a8a73305a..da8f195bd 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/BindModel.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/BindModel.java @@ -1,43 +1,43 @@ -/* - * $Id: DivModel.java 471756 2006-11-06 15:01:43Z husted $ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.dojo.views.freemarker.tags; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.Bind; -import org.apache.struts2.views.freemarker.tags.TagModel; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see Bind - */ -public class BindModel extends TagModel { - public BindModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - super(stack, req, res); - } - - protected Component getBean() { - return new Bind(stack, req, res); - } -} +/* + * $Id$ + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.struts2.dojo.views.freemarker.tags; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts2.components.Component; +import org.apache.struts2.dojo.components.Bind; +import org.apache.struts2.views.freemarker.tags.TagModel; + +import com.opensymphony.xwork2.util.ValueStack; + +/** + * @see Bind + */ +public class BindModel extends TagModel { + public BindModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { + super(stack, req, res); + } + + protected Component getBean() { + return new Bind(stack, req, res); + } +} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DateTimePickerModel.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DateTimePickerModel.java index 07e368ff8..babb36914 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DateTimePickerModel.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DateTimePickerModel.java @@ -1,5 +1,5 @@ /* - * $Id: DateTimePickerModel.java 493867 2007-01-07 22:26:23Z mrdon $ + * $Id$ * * Copyright 2006 The Apache Software Foundation. * diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DivModel.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DivModel.java index bc3caec16..7bbf5a19d 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DivModel.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DivModel.java @@ -1,44 +1,44 @@ -/* - * $Id$ - * - * Copyright 2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.struts2.dojo.views.freemarker.tags; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.Div; -import org.apache.struts2.views.freemarker.tags.TagModel; - -import com.opensymphony.xwork2.util.ValueStack; - - -/** - * @see Div - */ -public class DivModel extends TagModel { - - public DivModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - super(stack, req, res); - } - - @Override - protected Component getBean() { - return new Div(stack, req, res); - } - -} +/* + * $Id$ + * + * Copyright 2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.struts2.dojo.views.freemarker.tags; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts2.components.Component; +import org.apache.struts2.dojo.components.Div; +import org.apache.struts2.views.freemarker.tags.TagModel; + +import com.opensymphony.xwork2.util.ValueStack; + + +/** + * @see Div + */ +public class DivModel extends TagModel { + + public DivModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { + super(stack, req, res); + } + + @Override + protected Component getBean() { + return new Div(stack, req, res); + } + +} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/SubmitModel.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/SubmitModel.java index a2afa3c48..bc071d286 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/SubmitModel.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/SubmitModel.java @@ -1,43 +1,43 @@ -/* - * $Id$ - * - * Copyright 2006 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.struts2.dojo.views.freemarker.tags; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.Submit; -import org.apache.struts2.views.freemarker.tags.TagModel; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see Submit - */ -public class SubmitModel extends TagModel { - - public SubmitModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - super(stack, req, res); - } - - @Override - protected Component getBean() { - return new Submit(stack, req, res); - } - -} +/* + * $Id$ + * + * Copyright 2006 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.struts2.dojo.views.freemarker.tags; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts2.components.Component; +import org.apache.struts2.dojo.components.Submit; +import org.apache.struts2.views.freemarker.tags.TagModel; + +import com.opensymphony.xwork2.util.ValueStack; + +/** + * @see Submit + */ +public class SubmitModel extends TagModel { + + public SubmitModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { + super(stack, req, res); + } + + @Override + protected Component getBean() { + return new Submit(stack, req, res); + } + +} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TabbedPanelModel.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TabbedPanelModel.java index fc2222b11..c61e38d26 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TabbedPanelModel.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TabbedPanelModel.java @@ -1,5 +1,5 @@ /* - * $Id: TabbedPanelModel.java 471756 2006-11-06 15:01:43Z husted $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TextAreaModel.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TextAreaModel.java index de5ed5cd9..07a79b9da 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TextAreaModel.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TextAreaModel.java @@ -1,43 +1,43 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.dojo.views.freemarker.tags; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.TextArea; -import org.apache.struts2.views.freemarker.tags.TagModel; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see TextArea - */ -public class TextAreaModel extends TagModel { - public TextAreaModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - super(stack, req, res); - } - - protected Component getBean() { - return new TextArea(stack, req, res); - } -} +/* + * $Id$ + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.struts2.dojo.views.freemarker.tags; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts2.components.Component; +import org.apache.struts2.dojo.components.TextArea; +import org.apache.struts2.views.freemarker.tags.TagModel; + +import com.opensymphony.xwork2.util.ValueStack; + +/** + * @see TextArea + */ +public class TextAreaModel extends TagModel { + public TextAreaModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { + super(stack, req, res); + } + + protected Component getBean() { + return new TextArea(stack, req, res); + } +} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TreeModel.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TreeModel.java index 9d067e57a..3b50b91f3 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TreeModel.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TreeModel.java @@ -1,5 +1,5 @@ /* - * $Id: TreeModel.java 471756 2006-11-06 15:01:43Z husted $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TreeNodeModel.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TreeNodeModel.java index fc88a457b..ab21e1cca 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TreeNodeModel.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TreeNodeModel.java @@ -1,5 +1,5 @@ /* - * $Id: TreeNodeModel.java 471756 2006-11-06 15:01:43Z husted $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/AbstractRemoteTag.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/AbstractRemoteTag.java index d32cb455e..acae58fc1 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/AbstractRemoteTag.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/AbstractRemoteTag.java @@ -1,5 +1,5 @@ /* - * $Id: AbstractRemoteCallUITag.java 508285 2007-02-16 02:42:24Z musachy $ + * $Id$ * * Copyright 2006 The Apache Software Foundation. * diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/AnchorTag.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/AnchorTag.java index 0f87b9c98..581a653a7 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/AnchorTag.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/AnchorTag.java @@ -1,5 +1,5 @@ /* - * $Id: AnchorTag.java 490079 2006-12-24 22:46:07Z husted $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/BindTag.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/BindTag.java index c14bf4d07..2180665a5 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/BindTag.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/BindTag.java @@ -1,60 +1,60 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.dojo.views.jsp.ui; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.Bind; - -import com.opensymphony.xwork2.util.ValueStack; - -public class BindTag extends AbstractValidateTag { - protected String targets; - protected String sources; - protected String events; - - public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - return new Bind(stack, req, res); - } - - protected void populateParams() { - super.populateParams(); - - Bind bind = (Bind) component; - bind.setTargets(targets); - bind.setSources(sources); - bind.setEvents(events); - } - - public void setEvents(String events) { - this.events = events; - } - - public void setSources(String sources) { - this.sources = sources; - } - - public void setTargets(String targets) { - this.targets = targets; - } -} +/* + * $Id$ + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.struts2.dojo.views.jsp.ui; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts2.components.Component; +import org.apache.struts2.dojo.components.Bind; + +import com.opensymphony.xwork2.util.ValueStack; + +public class BindTag extends AbstractValidateTag { + protected String targets; + protected String sources; + protected String events; + + public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { + return new Bind(stack, req, res); + } + + protected void populateParams() { + super.populateParams(); + + Bind bind = (Bind) component; + bind.setTargets(targets); + bind.setSources(sources); + bind.setEvents(events); + } + + public void setEvents(String events) { + this.events = events; + } + + public void setSources(String sources) { + this.sources = sources; + } + + public void setTargets(String targets) { + this.targets = targets; + } +} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/DateTimePickerTag.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/DateTimePickerTag.java index 40b7b208a..0616a68fd 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/DateTimePickerTag.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/DateTimePickerTag.java @@ -1,5 +1,5 @@ /* - * $Id: DateTimePickerTag.java 508605 2007-02-16 21:56:50Z musachy $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/DivTag.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/DivTag.java index f487ff72d..890e5c504 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/DivTag.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/DivTag.java @@ -1,5 +1,5 @@ /* - * $Id: DivTag.java 511300 2007-02-24 16:41:38Z musachy $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/SubmitTag.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/SubmitTag.java index ac1f90dd0..44880d377 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/SubmitTag.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/SubmitTag.java @@ -1,5 +1,5 @@ /* - * $Id: SubmitTag.java 508285 2007-02-16 02:42:24Z musachy $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TabbedPanelTag.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TabbedPanelTag.java index f7046c04d..c77bf0371 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TabbedPanelTag.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TabbedPanelTag.java @@ -1,5 +1,5 @@ /* - * $Id: TabbedPanelTag.java 508575 2007-02-16 20:46:49Z musachy $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TextareaTag.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TextareaTag.java index 120b10214..d4ccd9adb 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TextareaTag.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TextareaTag.java @@ -1,51 +1,51 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.dojo.views.jsp.ui; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.TextArea; - -import com.opensymphony.xwork2.util.ValueStack; - - -/** - * @see TextArea - * - */ -public class TextareaTag extends org.apache.struts2.views.jsp.ui.TextareaTag{ - public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - return new TextArea(stack, req, res); - } - - protected void populateParams() { - super.populateParams(); - - TextArea textArea = ((TextArea) component); - textArea.setCols(cols); - textArea.setReadonly(readonly); - textArea.setRows(rows); - textArea.setWrap(wrap); - } - -} +/* + * $Id$ + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.struts2.dojo.views.jsp.ui; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts2.components.Component; +import org.apache.struts2.dojo.components.TextArea; + +import com.opensymphony.xwork2.util.ValueStack; + + +/** + * @see TextArea + * + */ +public class TextareaTag extends org.apache.struts2.views.jsp.ui.TextareaTag{ + public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { + return new TextArea(stack, req, res); + } + + protected void populateParams() { + super.populateParams(); + + TextArea textArea = ((TextArea) component); + textArea.setCols(cols); + textArea.setReadonly(readonly); + textArea.setRows(rows); + textArea.setWrap(wrap); + } + +} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TreeNodeTag.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TreeNodeTag.java index 4522f3233..4146d33c2 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TreeNodeTag.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TreeNodeTag.java @@ -1,5 +1,5 @@ /* - * $Id: TreeNodeTag.java 471756 2006-11-06 15:01:43Z husted $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TreeTag.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TreeTag.java index 4eb673212..9f4169c49 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TreeTag.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TreeTag.java @@ -1,5 +1,5 @@ /* - * $Id: TreeTag.java 471756 2006-11-06 15:01:43Z husted $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/AnchorDirective.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/AnchorDirective.java index d184df432..2c2d6d3ed 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/AnchorDirective.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/AnchorDirective.java @@ -1,5 +1,5 @@ /* - * $Id: AnchorDirective.java 471756 2006-11-06 15:01:43Z husted $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/AutocompleterDirective.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/AutocompleterDirective.java index b48f22dc7..42dae7e56 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/AutocompleterDirective.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/AutocompleterDirective.java @@ -1,5 +1,5 @@ /* - * $Id: AutocompleterDirective.java 502294 2007-02-01 17:28:00Z niallp $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/BindDirective.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/BindDirective.java index c025cc3bf..cb069cc55 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/BindDirective.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/BindDirective.java @@ -1,42 +1,42 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.dojo.views.velocity.components; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.Bind; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see Bind - */ -public class BindDirective extends DojoAbstractDirective { - public String getBeanName() { - return "bind"; - } - - protected Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - return new Bind(stack, req, res); - } +/* + * $Id$ + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.struts2.dojo.views.velocity.components; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts2.components.Component; +import org.apache.struts2.dojo.components.Bind; + +import com.opensymphony.xwork2.util.ValueStack; + +/** + * @see Bind + */ +public class BindDirective extends DojoAbstractDirective { + public String getBeanName() { + return "bind"; + } + + protected Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { + return new Bind(stack, req, res); + } } \ No newline at end of file diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DateTimePickerDirective.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DateTimePickerDirective.java index 921daafee..23bde3b1e 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DateTimePickerDirective.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DateTimePickerDirective.java @@ -1,5 +1,5 @@ /* - * $Id: DateTimePickerDirective.java 493867 2007-01-07 22:26:23Z mrdon $ + * $Id$ * * Copyright 2006 The Apache Software Foundation. * diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DivDirective.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DivDirective.java index 107e77895..1355eeedd 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DivDirective.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DivDirective.java @@ -1,5 +1,5 @@ /* - * $Id: DivDirective.java 494148 2007-01-08 18:41:13Z mrdon $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/SubmitDirective.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/SubmitDirective.java index f999680cf..391ddf8bb 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/SubmitDirective.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/SubmitDirective.java @@ -1,5 +1,5 @@ /* - * $Id: SubmitDirective.java 471756 2006-11-06 15:01:43Z husted $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TabbedPanelDirective.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TabbedPanelDirective.java index ec7b4b0cb..52c30b45e 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TabbedPanelDirective.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TabbedPanelDirective.java @@ -1,5 +1,5 @@ /* - * $Id: TabbedPanelDirective.java 471756 2006-11-06 15:01:43Z husted $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TextAreaDirective.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TextAreaDirective.java index e70d1d6b7..eb6c993b7 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TextAreaDirective.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TextAreaDirective.java @@ -1,27 +1,27 @@ -package org.apache.struts2.dojo.views.velocity.components; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.TextArea; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see TextArea - */ -public class TextAreaDirective extends DojoAbstractDirective { - public String getBeanName() { - return "textarea"; - } - - protected Component getBean(ValueStack stack, HttpServletRequest req, - HttpServletResponse res) { - return new TextArea(stack, req, res); - } - - public int getType() { - return BLOCK; - } -} +package org.apache.struts2.dojo.views.velocity.components; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts2.components.Component; +import org.apache.struts2.dojo.components.TextArea; + +import com.opensymphony.xwork2.util.ValueStack; + +/** + * @see TextArea + */ +public class TextAreaDirective extends DojoAbstractDirective { + public String getBeanName() { + return "textarea"; + } + + protected Component getBean(ValueStack stack, HttpServletRequest req, + HttpServletResponse res) { + return new TextArea(stack, req, res); + } + + public int getType() { + return BLOCK; + } +} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TreeDirective.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TreeDirective.java index 3ef322784..b98a0583f 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TreeDirective.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TreeDirective.java @@ -1,5 +1,5 @@ /* - * $Id: TreeDirective.java 471756 2006-11-06 15:01:43Z husted $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TreeNodeDirective.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TreeNodeDirective.java index fb42ca332..0d50d8ab2 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TreeNodeDirective.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TreeNodeDirective.java @@ -1,5 +1,5 @@ /* - * $Id: TreeNodeDirective.java 471756 2006-11-06 15:01:43Z husted $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/TabbedPanel.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/TabbedPanel.css index 441e8297e..e93a8e861 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/TabbedPanel.css +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/TabbedPanel.css @@ -1,5 +1,5 @@ /* - * $Id: pom.xml 559206 2007-07-24 21:01:18Z apetrelli $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/dojo.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/dojo.js index c8e5df3e1..862371a85 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/dojo.js +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/dojo.js @@ -33,7 +33,7 @@ dojo.global=function(){ return dj_currentContext; }; dojo.locale=djConfig.locale; -dojo.version={major:0,minor:4,patch:3,flag:"",revision:Number("$Rev: 8617 $".match(/[0-9]+/)[0]),toString:function(){ +dojo.version={major:0,minor:4,patch:3,flag:"",revision:Number("$Rev$".match(/[0-9]+/)[0]),toString:function(){ with(dojo.version){ return major+"."+minor+"."+patch+flag+" ("+revision+")"; } diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/dojo.js.uncompressed.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/dojo.js.uncompressed.js index d1d65e863..eb451b283 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/dojo.js.uncompressed.js +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/dojo.js.uncompressed.js @@ -100,7 +100,7 @@ dojo.locale = djConfig.locale; dojo.version = { // summary: version number of this instance of dojo. major: 0, minor: 4, patch: 3, flag: "", - revision: Number("$Rev: 8617 $".match(/[0-9]+/)[0]), + revision: Number("$Rev$".match(/[0-9]+/)[0]), toString: function(){ with(dojo.version){ return major + "." + minor + "." + patch + flag + " (" + revision + ")"; // String diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/bootstrap1.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/bootstrap1.js index 81f9b3712..f55598b83 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/bootstrap1.js +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/bootstrap1.js @@ -25,7 +25,7 @@ dojo.global = function () { return dj_currentContext; }; dojo.locale = djConfig.locale; -dojo.version = {major:0, minor:4, patch:3, flag:"", revision:Number("$Rev: 8617 $".match(/[0-9]+/)[0]), toString:function () { +dojo.version = {major:0, minor:4, patch:3, flag:"", revision:Number("$Rev$".match(/[0-9]+/)[0]), toString:function () { with (dojo.version) { return major + "." + minor + "." + patch + flag + " (" + revision + ")"; } diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/README.txt b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/README.txt index 28a1c71b2..c20a41554 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/README.txt +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/README.txt @@ -1,46 +1,46 @@ -Dojo Charting Engine -========================================================================= -The Dojo Charting Engine is a (fairly) complex object structure, designed -to provide as much flexibility as possible in terms of chart construction. -To this end, the engine details the following structure: - -Chart ----PlotArea[] -------Plot[] ----------Axis (axisX) ----------Axis (axisY) ----------Series[] - - -A Chart object is the main entity; it is the entire graphic. A Chart may -have any number of PlotArea objects, which are the basic canvas against -which data is plotted. A PlotArea may have any number of Plot objects, -which is a container representing up to 2 axes and any number of series -to be plotted against those axes; a Series represents a binding against -two fields from a data source (initial rev, this data source is always of -type dojo.collections.Store but this will probably change once dojo.data -is in production). - -The point of this structure is to allow for as much flexibility as possible -in terms of what kinds of charts can be represented by the engine. The -current plan is to accomodate up to analytical financial charts, which tend -to have 3 plot areas and any number of different types of axes on each one. - -The main exception to this is the pie chart, which will have it's own -custom codebase. Also, 3D charts are not accounted for at this time, -although the only thing that will probably need to be altered to make -that work would be Plot and Series (to accomodate the additional Z axis). - -Finally, a Plot will render its series[] through the use of Plotters, which -are custom methods to render specific types of charts. -------------------------------------------------------------------------- -In terms of widgets, the basic concept is that there is a central, super- -flexible Chart widget (Chart, oddly enough), and then any number of preset -chart type widgets, that are basically built to serve a simple, easy -purpose. For instance, if someone just needs to plot a series of lines, -they would be better off using the LineChart widget; but if someone needed -to plot a combo chart, that has 2 Y Axes (one linear, one log) against the -same X Axis, using lines and areas, then they will want to use a Chart widget. -Note also that unlike other widgets, the Charting engine *can* be called -directly from script *without* the need for the actual widget engine to be +Dojo Charting Engine +========================================================================= +The Dojo Charting Engine is a (fairly) complex object structure, designed +to provide as much flexibility as possible in terms of chart construction. +To this end, the engine details the following structure: + +Chart +---PlotArea[] +------Plot[] +---------Axis (axisX) +---------Axis (axisY) +---------Series[] + + +A Chart object is the main entity; it is the entire graphic. A Chart may +have any number of PlotArea objects, which are the basic canvas against +which data is plotted. A PlotArea may have any number of Plot objects, +which is a container representing up to 2 axes and any number of series +to be plotted against those axes; a Series represents a binding against +two fields from a data source (initial rev, this data source is always of +type dojo.collections.Store but this will probably change once dojo.data +is in production). + +The point of this structure is to allow for as much flexibility as possible +in terms of what kinds of charts can be represented by the engine. The +current plan is to accomodate up to analytical financial charts, which tend +to have 3 plot areas and any number of different types of axes on each one. + +The main exception to this is the pie chart, which will have it's own +custom codebase. Also, 3D charts are not accounted for at this time, +although the only thing that will probably need to be altered to make +that work would be Plot and Series (to accomodate the additional Z axis). + +Finally, a Plot will render its series[] through the use of Plotters, which +are custom methods to render specific types of charts. +------------------------------------------------------------------------- +In terms of widgets, the basic concept is that there is a central, super- +flexible Chart widget (Chart, oddly enough), and then any number of preset +chart type widgets, that are basically built to serve a simple, easy +purpose. For instance, if someone just needs to plot a series of lines, +they would be better off using the LineChart widget; but if someone needed +to plot a combo chart, that has 2 Y Axes (one linear, one log) against the +same X Axis, using lines and areas, then they will want to use a Chart widget. +Note also that unlike other widgets, the Charting engine *can* be called +directly from script *without* the need for the actual widget engine to be loaded; the Chart widgets are thin wrappers around the charting engine. \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/flash/flash6/DojoExternalInterface.as b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/flash/flash6/DojoExternalInterface.as index c99e4292a..d7e1d4cbd 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/flash/flash6/DojoExternalInterface.as +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/flash/flash6/DojoExternalInterface.as @@ -8,208 +8,208 @@ http://dojotoolkit.org/community/licensing.shtml */ -/** - An implementation of Flash 8's ExternalInterface that works with Flash 6 - and which is source-compatible with Flash 8. - - @author Brad Neuberg, bkn3@columbia.edu -*/ - -class DojoExternalInterface{ - public static var available:Boolean; - public static var dojoPath = ""; - - public static var _fscommandReady = false; - public static var _callbacks = new Array(); - - public static function initialize(){ - //getURL("javascript:dojo.debug('FLASH:DojoExternalInterface initialize')"); - // FIXME: Set available variable by testing for capabilities - DojoExternalInterface.available = true; - - // extract the dojo base path - DojoExternalInterface.dojoPath = DojoExternalInterface.getDojoPath(); - //getURL("javascript:dojo.debug('FLASH:dojoPath="+DojoExternalInterface.dojoPath+"')"); - - // Sometimes, on IE, the fscommand infrastructure can take a few hundred - // milliseconds the first time a page loads. Set a timer to keep checking - // to make sure we can issue fscommands; otherwise, our calls to fscommand - // for setCallback() and loaded() will just "disappear" - _root.fscommandReady = false; - var fsChecker = function(){ - // issue a test fscommand - fscommand("fscommandReady"); - - // JavaScript should set _root.fscommandReady if it got the call - if(_root.fscommandReady == "true"){ - DojoExternalInterface._fscommandReady = true; - clearInterval(_root.fsTimer); - } - }; - _root.fsTimer = setInterval(fsChecker, 100); - } - - public static function addCallback(methodName:String, instance:Object, - method:Function) : Boolean{ - // A variable that indicates whether the call below succeeded - _root._succeeded = null; - - // Callbacks are registered with the JavaScript side as follows. - // On the Flash side, we maintain a lookup table that associates - // the methodName with the actual instance and method that are - // associated with this method. - // Using fscommand, we send over the action "addCallback", with the - // argument being the methodName to add, such as "foobar". - // The JavaScript takes these values and registers the existence of - // this callback point. - - // precede the method name with a _ character in case it starts - // with a number - _callbacks["_" + methodName] = {_instance: instance, _method: method}; - _callbacks[_callbacks.length] = methodName; - - // The API for ExternalInterface says we have to make sure the call - // succeeded; check to see if there is a value - // for _succeeded, which is set by the JavaScript side - if(_root._succeeded == null){ - return false; - }else{ - return true; - } - } - - public static function call(methodName:String, - resultsCallback:Function) : Void{ - // FIXME: support full JSON serialization - - // First, we pack up all of the arguments to this call and set them - // as Flash variables, which the JavaScript side will unpack using - // plugin.GetVariable(). We set the number of arguments as "_numArgs", - // and add each argument as a variable, such as "_1", "_2", etc., starting - // from 0. - // We then execute an fscommand with the action "call" and the - // argument being the method name. JavaScript takes the method name, - // retrieves the arguments using GetVariable, executes the method, - // and then places the return result in a Flash variable - // named "_returnResult". - _root._numArgs = arguments.length - 2; - for(var i = 2; i < arguments.length; i++){ - var argIndex = i - 2; - _root["_" + argIndex] = arguments[i]; - } - - _root._returnResult = undefined; - fscommand("call", methodName); - - // immediately return if the caller is not waiting for return results - if(resultsCallback == undefined || resultsCallback == null){ - return; - } - - // check at regular intervals for return results - var resultsChecker = function(){ - if((typeof _root._returnResult != "undefined")&& - (_root._returnResult != "undefined")){ - clearInterval(_root._callbackID); - resultsCallback.call(null, _root._returnResult); - } - }; - _root._callbackID = setInterval(resultsChecker, 100); - } - - /** - Called by Flash to indicate to JavaScript that we are ready to have - our Flash functions called. Calling loaded() - will fire the dojo.flash.loaded() event, so that JavaScript can know that - Flash has finished loading and adding its callbacks, and can begin to - interact with the Flash file. - */ - public static function loaded(){ - //getURL("javascript:dojo.debug('FLASH:loaded')"); - - // one more step: see if fscommands are ready to be executed; if not, - // set an interval that will keep running until fscommands are ready; - // make sure the gateway is loaded as well - var execLoaded = function(){ - if(DojoExternalInterface._fscommandReady == true){ - clearInterval(_root.loadedInterval); - - // initialize the small Flash file that helps gateway JS to Flash - // calls - DojoExternalInterface._initializeFlashRunner(); - } - }; - - if(_fscommandReady == true){ - execLoaded(); - }else{ - _root.loadedInterval = setInterval(execLoaded, 50); - } - } - - /** - Handles and executes a JavaScript to Flash method call. Used by - initializeFlashRunner. - */ - public static function _handleJSCall(){ - // get our parameters - var numArgs = parseInt(_root._numArgs); - var jsArgs = new Array(); - for(var i = 0; i < numArgs; i++){ - var currentValue = _root["_" + i]; - jsArgs.push(currentValue); - } - - // get our function name - var functionName = _root._functionName; - - // now get the actual instance and method object to execute on, - // using our lookup table that was constructed by calls to - // addCallback on initialization - var instance = _callbacks["_" + functionName]._instance; - var method = _callbacks["_" + functionName]._method; - - // execute it - var results = method.apply(instance, jsArgs); - - // return the results - _root._returnResult = results; - } - - /** Called by the flash6_gateway.swf to indicate that it is loaded. */ - public static function _gatewayReady(){ - for(var i = 0; i < _callbacks.length; i++){ - fscommand("addCallback", _callbacks[i]); - } - call("dojo.flash.loaded"); - } - - /** - When JavaScript wants to communicate with Flash it simply sets - the Flash variable "_execute" to true; this method creates the - internal Movie Clip, called the Flash Runner, that makes this - magic happen. - */ - public static function _initializeFlashRunner(){ - // figure out where our Flash movie is - var swfLoc = DojoExternalInterface.dojoPath + "flash6_gateway.swf"; - - // load our gateway helper file - _root.createEmptyMovieClip("_flashRunner", 5000); - _root._flashRunner._lockroot = true; - _root._flashRunner.loadMovie(swfLoc); - } - - private static function getDojoPath(){ - var url = _root._url; - var start = url.indexOf("baseRelativePath=") + "baseRelativePath=".length; - var path = url.substring(start); - var end = path.indexOf("&"); - if(end != -1){ - path = path.substring(0, end); - } - return path; - } -} - -// vim:ts=4:noet:tw=0: +/** + An implementation of Flash 8's ExternalInterface that works with Flash 6 + and which is source-compatible with Flash 8. + + @author Brad Neuberg, bkn3@columbia.edu +*/ + +class DojoExternalInterface{ + public static var available:Boolean; + public static var dojoPath = ""; + + public static var _fscommandReady = false; + public static var _callbacks = new Array(); + + public static function initialize(){ + //getURL("javascript:dojo.debug('FLASH:DojoExternalInterface initialize')"); + // FIXME: Set available variable by testing for capabilities + DojoExternalInterface.available = true; + + // extract the dojo base path + DojoExternalInterface.dojoPath = DojoExternalInterface.getDojoPath(); + //getURL("javascript:dojo.debug('FLASH:dojoPath="+DojoExternalInterface.dojoPath+"')"); + + // Sometimes, on IE, the fscommand infrastructure can take a few hundred + // milliseconds the first time a page loads. Set a timer to keep checking + // to make sure we can issue fscommands; otherwise, our calls to fscommand + // for setCallback() and loaded() will just "disappear" + _root.fscommandReady = false; + var fsChecker = function(){ + // issue a test fscommand + fscommand("fscommandReady"); + + // JavaScript should set _root.fscommandReady if it got the call + if(_root.fscommandReady == "true"){ + DojoExternalInterface._fscommandReady = true; + clearInterval(_root.fsTimer); + } + }; + _root.fsTimer = setInterval(fsChecker, 100); + } + + public static function addCallback(methodName:String, instance:Object, + method:Function) : Boolean{ + // A variable that indicates whether the call below succeeded + _root._succeeded = null; + + // Callbacks are registered with the JavaScript side as follows. + // On the Flash side, we maintain a lookup table that associates + // the methodName with the actual instance and method that are + // associated with this method. + // Using fscommand, we send over the action "addCallback", with the + // argument being the methodName to add, such as "foobar". + // The JavaScript takes these values and registers the existence of + // this callback point. + + // precede the method name with a _ character in case it starts + // with a number + _callbacks["_" + methodName] = {_instance: instance, _method: method}; + _callbacks[_callbacks.length] = methodName; + + // The API for ExternalInterface says we have to make sure the call + // succeeded; check to see if there is a value + // for _succeeded, which is set by the JavaScript side + if(_root._succeeded == null){ + return false; + }else{ + return true; + } + } + + public static function call(methodName:String, + resultsCallback:Function) : Void{ + // FIXME: support full JSON serialization + + // First, we pack up all of the arguments to this call and set them + // as Flash variables, which the JavaScript side will unpack using + // plugin.GetVariable(). We set the number of arguments as "_numArgs", + // and add each argument as a variable, such as "_1", "_2", etc., starting + // from 0. + // We then execute an fscommand with the action "call" and the + // argument being the method name. JavaScript takes the method name, + // retrieves the arguments using GetVariable, executes the method, + // and then places the return result in a Flash variable + // named "_returnResult". + _root._numArgs = arguments.length - 2; + for(var i = 2; i < arguments.length; i++){ + var argIndex = i - 2; + _root["_" + argIndex] = arguments[i]; + } + + _root._returnResult = undefined; + fscommand("call", methodName); + + // immediately return if the caller is not waiting for return results + if(resultsCallback == undefined || resultsCallback == null){ + return; + } + + // check at regular intervals for return results + var resultsChecker = function(){ + if((typeof _root._returnResult != "undefined")&& + (_root._returnResult != "undefined")){ + clearInterval(_root._callbackID); + resultsCallback.call(null, _root._returnResult); + } + }; + _root._callbackID = setInterval(resultsChecker, 100); + } + + /** + Called by Flash to indicate to JavaScript that we are ready to have + our Flash functions called. Calling loaded() + will fire the dojo.flash.loaded() event, so that JavaScript can know that + Flash has finished loading and adding its callbacks, and can begin to + interact with the Flash file. + */ + public static function loaded(){ + //getURL("javascript:dojo.debug('FLASH:loaded')"); + + // one more step: see if fscommands are ready to be executed; if not, + // set an interval that will keep running until fscommands are ready; + // make sure the gateway is loaded as well + var execLoaded = function(){ + if(DojoExternalInterface._fscommandReady == true){ + clearInterval(_root.loadedInterval); + + // initialize the small Flash file that helps gateway JS to Flash + // calls + DojoExternalInterface._initializeFlashRunner(); + } + }; + + if(_fscommandReady == true){ + execLoaded(); + }else{ + _root.loadedInterval = setInterval(execLoaded, 50); + } + } + + /** + Handles and executes a JavaScript to Flash method call. Used by + initializeFlashRunner. + */ + public static function _handleJSCall(){ + // get our parameters + var numArgs = parseInt(_root._numArgs); + var jsArgs = new Array(); + for(var i = 0; i < numArgs; i++){ + var currentValue = _root["_" + i]; + jsArgs.push(currentValue); + } + + // get our function name + var functionName = _root._functionName; + + // now get the actual instance and method object to execute on, + // using our lookup table that was constructed by calls to + // addCallback on initialization + var instance = _callbacks["_" + functionName]._instance; + var method = _callbacks["_" + functionName]._method; + + // execute it + var results = method.apply(instance, jsArgs); + + // return the results + _root._returnResult = results; + } + + /** Called by the flash6_gateway.swf to indicate that it is loaded. */ + public static function _gatewayReady(){ + for(var i = 0; i < _callbacks.length; i++){ + fscommand("addCallback", _callbacks[i]); + } + call("dojo.flash.loaded"); + } + + /** + When JavaScript wants to communicate with Flash it simply sets + the Flash variable "_execute" to true; this method creates the + internal Movie Clip, called the Flash Runner, that makes this + magic happen. + */ + public static function _initializeFlashRunner(){ + // figure out where our Flash movie is + var swfLoc = DojoExternalInterface.dojoPath + "flash6_gateway.swf"; + + // load our gateway helper file + _root.createEmptyMovieClip("_flashRunner", 5000); + _root._flashRunner._lockroot = true; + _root._flashRunner.loadMovie(swfLoc); + } + + private static function getDojoPath(){ + var url = _root._url; + var start = url.indexOf("baseRelativePath=") + "baseRelativePath=".length; + var path = url.substring(start); + var end = path.indexOf("&"); + if(end != -1){ + path = path.substring(0, end); + } + return path; + } +} + +// vim:ts=4:noet:tw=0: diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/flash/flash8/DojoExternalInterface.as b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/flash/flash8/DojoExternalInterface.as index 9e3865dba..af787ef8d 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/flash/flash8/DojoExternalInterface.as +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/flash/flash8/DojoExternalInterface.as @@ -8,227 +8,227 @@ http://dojotoolkit.org/community/licensing.shtml */ -/** - A wrapper around Flash 8's ExternalInterface; DojoExternalInterface is needed so that we - can do a Flash 6 implementation of ExternalInterface, and be able - to support having a single codebase that uses DojoExternalInterface - across Flash versions rather than having two seperate source bases, - where one uses ExternalInterface and the other uses DojoExternalInterface. - - DojoExternalInterface class does a variety of optimizations to bypass ExternalInterface's - unbelievably bad performance so that we can have good performance - on Safari; see the blog post - http://codinginparadise.org/weblog/2006/02/how-to-speed-up-flash-8s.html - for details. - - @author Brad Neuberg, bkn3@columbia.edu -*/ -import flash.external.ExternalInterface; - -class DojoExternalInterface{ - public static var available:Boolean; - public static var dojoPath = ""; - - private static var flashMethods:Array = new Array(); - private static var numArgs:Number; - private static var argData:Array; - private static var resultData = null; - - public static function initialize(){ - // extract the dojo base path - DojoExternalInterface.dojoPath = DojoExternalInterface.getDojoPath(); - - // see if we need to do an express install - var install:ExpressInstall = new ExpressInstall(); - if(install.needsUpdate){ - install.init(); - } - - // register our callback functions - ExternalInterface.addCallback("startExec", DojoExternalInterface, startExec); - ExternalInterface.addCallback("setNumberArguments", DojoExternalInterface, - setNumberArguments); - ExternalInterface.addCallback("chunkArgumentData", DojoExternalInterface, - chunkArgumentData); - ExternalInterface.addCallback("exec", DojoExternalInterface, exec); - ExternalInterface.addCallback("getReturnLength", DojoExternalInterface, - getReturnLength); - ExternalInterface.addCallback("chunkReturnData", DojoExternalInterface, - chunkReturnData); - ExternalInterface.addCallback("endExec", DojoExternalInterface, endExec); - - // set whether communication is available - DojoExternalInterface.available = ExternalInterface.available; - DojoExternalInterface.call("loaded"); - } - - public static function addCallback(methodName:String, instance:Object, - method:Function) : Boolean{ - // register DojoExternalInterface methodName with it's instance - DojoExternalInterface.flashMethods[methodName] = instance; - - // tell JavaScript about DojoExternalInterface new method so we can create a proxy - ExternalInterface.call("dojo.flash.comm._addExternalInterfaceCallback", - methodName); - - return true; - } - - public static function call(methodName:String, - resultsCallback:Function) : Void{ - // we might have any number of optional arguments, so we have to - // pass them in dynamically; strip out the results callback - var parameters = new Array(); - for(var i = 0; i < arguments.length; i++){ - if(i != 1){ // skip the callback - parameters.push(arguments[i]); - } - } - - var results = ExternalInterface.call.apply(ExternalInterface, parameters); - - // immediately give the results back, since ExternalInterface is - // synchronous - if(resultsCallback != null && typeof resultsCallback != "undefined"){ - resultsCallback.call(null, results); - } - } - - /** - Called by Flash to indicate to JavaScript that we are ready to have - our Flash functions called. Calling loaded() - will fire the dojo.flash.loaded() event, so that JavaScript can know that - Flash has finished loading and adding its callbacks, and can begin to - interact with the Flash file. - */ - public static function loaded(){ - DojoExternalInterface.call("dojo.flash.loaded"); - } - - public static function startExec():Void{ - DojoExternalInterface.numArgs = null; - DojoExternalInterface.argData = null; - DojoExternalInterface.resultData = null; - } - - public static function setNumberArguments(numArgs):Void{ - DojoExternalInterface.numArgs = numArgs; - DojoExternalInterface.argData = new Array(DojoExternalInterface.numArgs); - } - - public static function chunkArgumentData(value, argIndex:Number):Void{ - //getURL("javascript:dojo.debug('FLASH: chunkArgumentData, value="+value+", argIndex="+argIndex+"')"); - var currentValue = DojoExternalInterface.argData[argIndex]; - if(currentValue == null || typeof currentValue == "undefined"){ - DojoExternalInterface.argData[argIndex] = value; - }else{ - DojoExternalInterface.argData[argIndex] += value; - } - } - - public static function exec(methodName):Void{ - // decode all of the arguments that were passed in - for(var i = 0; i < DojoExternalInterface.argData.length; i++){ - DojoExternalInterface.argData[i] = - DojoExternalInterface.decodeData(DojoExternalInterface.argData[i]); - } - - var instance = DojoExternalInterface.flashMethods[methodName]; - DojoExternalInterface.resultData = instance[methodName].apply( - instance, DojoExternalInterface.argData); - // encode the result data - DojoExternalInterface.resultData = - DojoExternalInterface.encodeData(DojoExternalInterface.resultData); - - //getURL("javascript:dojo.debug('FLASH: encoded result data="+DojoExternalInterface.resultData+"')"); - } - - public static function getReturnLength():Number{ - if(DojoExternalInterface.resultData == null || - typeof DojoExternalInterface.resultData == "undefined"){ - return 0; - } - var segments = Math.ceil(DojoExternalInterface.resultData.length / 1024); - return segments; - } - - public static function chunkReturnData(segment:Number):String{ - var numSegments = DojoExternalInterface.getReturnLength(); - var startCut = segment * 1024; - var endCut = segment * 1024 + 1024; - if(segment == (numSegments - 1)){ - endCut = segment * 1024 + DojoExternalInterface.resultData.length; - } - - var piece = DojoExternalInterface.resultData.substring(startCut, endCut); - - //getURL("javascript:dojo.debug('FLASH: chunking return piece="+piece+"')"); - - return piece; - } - - public static function endExec():Void{ - } - - private static function decodeData(data):String{ - // we have to use custom encodings for certain characters when passing - // them over; for example, passing a backslash over as //// from JavaScript - // to Flash doesn't work - data = DojoExternalInterface.replaceStr(data, "&custom_backslash;", "\\"); - - data = DojoExternalInterface.replaceStr(data, "\\\'", "\'"); - data = DojoExternalInterface.replaceStr(data, "\\\"", "\""); - - return data; - } - - private static function encodeData(data){ - //getURL("javascript:dojo.debug('inside flash, data before="+data+"')"); - - // double encode all entity values, or they will be mis-decoded - // by Flash when returned - data = DojoExternalInterface.replaceStr(data, "&", "&"); - - // certain XMLish characters break Flash's wire serialization for - // ExternalInterface; encode these into a custom encoding, rather than - // the standard entity encoding, because otherwise we won't be able to - // differentiate between our own encoding and any entity characters - // that are being used in the string itself - data = DojoExternalInterface.replaceStr(data, '<', '&custom_lt;'); - data = DojoExternalInterface.replaceStr(data, '>', '&custom_gt;'); - - // encode control characters and JavaScript delimiters - data = DojoExternalInterface.replaceStr(data, "\n", "\\n"); - data = DojoExternalInterface.replaceStr(data, "\r", "\\r"); - data = DojoExternalInterface.replaceStr(data, "\f", "\\f"); - data = DojoExternalInterface.replaceStr(data, "'", "\\'"); - data = DojoExternalInterface.replaceStr(data, '"', '\"'); - - //getURL("javascript:dojo.debug('inside flash, data after="+data+"')"); - return data; - } - - /** - Flash ActionScript has no String.replace method or support for - Regular Expressions! We roll our own very simple one. - */ - private static function replaceStr(inputStr:String, replaceThis:String, - withThis:String):String { - var splitStr = inputStr.split(replaceThis) - inputStr = splitStr.join(withThis) - return inputStr; - } - - private static function getDojoPath(){ - var url = _root._url; - var start = url.indexOf("baseRelativePath=") + "baseRelativePath=".length; - var path = url.substring(start); - var end = path.indexOf("&"); - if(end != -1){ - path = path.substring(0, end); - } - return path; - } -} - -// vim:ts=4:noet:tw=0: +/** + A wrapper around Flash 8's ExternalInterface; DojoExternalInterface is needed so that we + can do a Flash 6 implementation of ExternalInterface, and be able + to support having a single codebase that uses DojoExternalInterface + across Flash versions rather than having two seperate source bases, + where one uses ExternalInterface and the other uses DojoExternalInterface. + + DojoExternalInterface class does a variety of optimizations to bypass ExternalInterface's + unbelievably bad performance so that we can have good performance + on Safari; see the blog post + http://codinginparadise.org/weblog/2006/02/how-to-speed-up-flash-8s.html + for details. + + @author Brad Neuberg, bkn3@columbia.edu +*/ +import flash.external.ExternalInterface; + +class DojoExternalInterface{ + public static var available:Boolean; + public static var dojoPath = ""; + + private static var flashMethods:Array = new Array(); + private static var numArgs:Number; + private static var argData:Array; + private static var resultData = null; + + public static function initialize(){ + // extract the dojo base path + DojoExternalInterface.dojoPath = DojoExternalInterface.getDojoPath(); + + // see if we need to do an express install + var install:ExpressInstall = new ExpressInstall(); + if(install.needsUpdate){ + install.init(); + } + + // register our callback functions + ExternalInterface.addCallback("startExec", DojoExternalInterface, startExec); + ExternalInterface.addCallback("setNumberArguments", DojoExternalInterface, + setNumberArguments); + ExternalInterface.addCallback("chunkArgumentData", DojoExternalInterface, + chunkArgumentData); + ExternalInterface.addCallback("exec", DojoExternalInterface, exec); + ExternalInterface.addCallback("getReturnLength", DojoExternalInterface, + getReturnLength); + ExternalInterface.addCallback("chunkReturnData", DojoExternalInterface, + chunkReturnData); + ExternalInterface.addCallback("endExec", DojoExternalInterface, endExec); + + // set whether communication is available + DojoExternalInterface.available = ExternalInterface.available; + DojoExternalInterface.call("loaded"); + } + + public static function addCallback(methodName:String, instance:Object, + method:Function) : Boolean{ + // register DojoExternalInterface methodName with it's instance + DojoExternalInterface.flashMethods[methodName] = instance; + + // tell JavaScript about DojoExternalInterface new method so we can create a proxy + ExternalInterface.call("dojo.flash.comm._addExternalInterfaceCallback", + methodName); + + return true; + } + + public static function call(methodName:String, + resultsCallback:Function) : Void{ + // we might have any number of optional arguments, so we have to + // pass them in dynamically; strip out the results callback + var parameters = new Array(); + for(var i = 0; i < arguments.length; i++){ + if(i != 1){ // skip the callback + parameters.push(arguments[i]); + } + } + + var results = ExternalInterface.call.apply(ExternalInterface, parameters); + + // immediately give the results back, since ExternalInterface is + // synchronous + if(resultsCallback != null && typeof resultsCallback != "undefined"){ + resultsCallback.call(null, results); + } + } + + /** + Called by Flash to indicate to JavaScript that we are ready to have + our Flash functions called. Calling loaded() + will fire the dojo.flash.loaded() event, so that JavaScript can know that + Flash has finished loading and adding its callbacks, and can begin to + interact with the Flash file. + */ + public static function loaded(){ + DojoExternalInterface.call("dojo.flash.loaded"); + } + + public static function startExec():Void{ + DojoExternalInterface.numArgs = null; + DojoExternalInterface.argData = null; + DojoExternalInterface.resultData = null; + } + + public static function setNumberArguments(numArgs):Void{ + DojoExternalInterface.numArgs = numArgs; + DojoExternalInterface.argData = new Array(DojoExternalInterface.numArgs); + } + + public static function chunkArgumentData(value, argIndex:Number):Void{ + //getURL("javascript:dojo.debug('FLASH: chunkArgumentData, value="+value+", argIndex="+argIndex+"')"); + var currentValue = DojoExternalInterface.argData[argIndex]; + if(currentValue == null || typeof currentValue == "undefined"){ + DojoExternalInterface.argData[argIndex] = value; + }else{ + DojoExternalInterface.argData[argIndex] += value; + } + } + + public static function exec(methodName):Void{ + // decode all of the arguments that were passed in + for(var i = 0; i < DojoExternalInterface.argData.length; i++){ + DojoExternalInterface.argData[i] = + DojoExternalInterface.decodeData(DojoExternalInterface.argData[i]); + } + + var instance = DojoExternalInterface.flashMethods[methodName]; + DojoExternalInterface.resultData = instance[methodName].apply( + instance, DojoExternalInterface.argData); + // encode the result data + DojoExternalInterface.resultData = + DojoExternalInterface.encodeData(DojoExternalInterface.resultData); + + //getURL("javascript:dojo.debug('FLASH: encoded result data="+DojoExternalInterface.resultData+"')"); + } + + public static function getReturnLength():Number{ + if(DojoExternalInterface.resultData == null || + typeof DojoExternalInterface.resultData == "undefined"){ + return 0; + } + var segments = Math.ceil(DojoExternalInterface.resultData.length / 1024); + return segments; + } + + public static function chunkReturnData(segment:Number):String{ + var numSegments = DojoExternalInterface.getReturnLength(); + var startCut = segment * 1024; + var endCut = segment * 1024 + 1024; + if(segment == (numSegments - 1)){ + endCut = segment * 1024 + DojoExternalInterface.resultData.length; + } + + var piece = DojoExternalInterface.resultData.substring(startCut, endCut); + + //getURL("javascript:dojo.debug('FLASH: chunking return piece="+piece+"')"); + + return piece; + } + + public static function endExec():Void{ + } + + private static function decodeData(data):String{ + // we have to use custom encodings for certain characters when passing + // them over; for example, passing a backslash over as //// from JavaScript + // to Flash doesn't work + data = DojoExternalInterface.replaceStr(data, "&custom_backslash;", "\\"); + + data = DojoExternalInterface.replaceStr(data, "\\\'", "\'"); + data = DojoExternalInterface.replaceStr(data, "\\\"", "\""); + + return data; + } + + private static function encodeData(data){ + //getURL("javascript:dojo.debug('inside flash, data before="+data+"')"); + + // double encode all entity values, or they will be mis-decoded + // by Flash when returned + data = DojoExternalInterface.replaceStr(data, "&", "&"); + + // certain XMLish characters break Flash's wire serialization for + // ExternalInterface; encode these into a custom encoding, rather than + // the standard entity encoding, because otherwise we won't be able to + // differentiate between our own encoding and any entity characters + // that are being used in the string itself + data = DojoExternalInterface.replaceStr(data, '<', '&custom_lt;'); + data = DojoExternalInterface.replaceStr(data, '>', '&custom_gt;'); + + // encode control characters and JavaScript delimiters + data = DojoExternalInterface.replaceStr(data, "\n", "\\n"); + data = DojoExternalInterface.replaceStr(data, "\r", "\\r"); + data = DojoExternalInterface.replaceStr(data, "\f", "\\f"); + data = DojoExternalInterface.replaceStr(data, "'", "\\'"); + data = DojoExternalInterface.replaceStr(data, '"', '\"'); + + //getURL("javascript:dojo.debug('inside flash, data after="+data+"')"); + return data; + } + + /** + Flash ActionScript has no String.replace method or support for + Regular Expressions! We roll our own very simple one. + */ + private static function replaceStr(inputStr:String, replaceThis:String, + withThis:String):String { + var splitStr = inputStr.split(replaceThis) + inputStr = splitStr.join(withThis) + return inputStr; + } + + private static function getDojoPath(){ + var url = _root._url; + var start = url.indexOf("baseRelativePath=") + "baseRelativePath=".length; + var path = url.substring(start); + var end = path.indexOf("&"); + if(end != -1){ + path = path.substring(0, end); + } + return path; + } +} + +// vim:ts=4:noet:tw=0: diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/flash/flash8/ExpressInstall.as b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/flash/flash8/ExpressInstall.as index 5f823b752..e05458214 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/flash/flash8/ExpressInstall.as +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/flash/flash8/ExpressInstall.as @@ -8,74 +8,74 @@ http://dojotoolkit.org/community/licensing.shtml */ -/** - * Based on the expressinstall.as class created by Geoff Stearns as part - * of the FlashObject library. - * - * Use this file to invoke the Macromedia Flash Player Express Install functionality - * This file is intended for use with the FlashObject embed script. You can download FlashObject - * and this file at the following URL: http://blog.deconcept.com/flashobject/ - * - * Usage: - * var ExpressInstall = new ExpressInstall(); - * - * // test to see if install is needed: - * if (ExpressInstall.needsUpdate) { // returns true if update is needed - * ExpressInstall.init(); // starts the update - * } - * - * NOTE: Your Flash movie must be at least 214px by 137px in order to use ExpressInstall. - * - */ - -class ExpressInstall { - public var needsUpdate:Boolean; - private var updater:MovieClip; - private var hold:MovieClip; - - public function ExpressInstall(){ - // does the user need to update? - this.needsUpdate = (_root.MMplayerType == undefined) ? false : true; - } - - public function init():Void{ - this.loadUpdater(); - } - - public function loadUpdater():Void { - System.security.allowDomain("fpdownload.macromedia.com"); - - // hope that nothing is at a depth of 10000000, you can change this depth if needed, but you want - // it to be on top of your content if you have any stuff on the first frame - this.updater = _root.createEmptyMovieClip("expressInstallHolder", 10000000); - - // register the callback so we know if they cancel or there is an error - var _self = this; - this.updater.installStatus = _self.onInstallStatus; - this.hold = this.updater.createEmptyMovieClip("hold", 1); - - // can't use movieClipLoader because it has to work in 6.0.65 - this.updater.onEnterFrame = function():Void { - if(typeof this.hold.startUpdate == 'function'){ - _self.initUpdater(); - this.onEnterFrame = null; - } - } - - var cacheBuster:Number = Math.random(); - - this.hold.loadMovie("http://fpdownload.macromedia.com/pub/flashplayer/" - +"update/current/swf/autoUpdater.swf?"+ cacheBuster); - } - - private function initUpdater():Void{ - this.hold.redirectURL = _root.MMredirectURL; - this.hold.MMplayerType = _root.MMplayerType; - this.hold.MMdoctitle = _root.MMdoctitle; - this.hold.startUpdate(); - } - - public function onInstallStatus(msg):Void{ - getURL("javascript:dojo.flash.install._onInstallStatus('"+msg+"')"); - } -} +/** + * Based on the expressinstall.as class created by Geoff Stearns as part + * of the FlashObject library. + * + * Use this file to invoke the Macromedia Flash Player Express Install functionality + * This file is intended for use with the FlashObject embed script. You can download FlashObject + * and this file at the following URL: http://blog.deconcept.com/flashobject/ + * + * Usage: + * var ExpressInstall = new ExpressInstall(); + * + * // test to see if install is needed: + * if (ExpressInstall.needsUpdate) { // returns true if update is needed + * ExpressInstall.init(); // starts the update + * } + * + * NOTE: Your Flash movie must be at least 214px by 137px in order to use ExpressInstall. + * + */ + +class ExpressInstall { + public var needsUpdate:Boolean; + private var updater:MovieClip; + private var hold:MovieClip; + + public function ExpressInstall(){ + // does the user need to update? + this.needsUpdate = (_root.MMplayerType == undefined) ? false : true; + } + + public function init():Void{ + this.loadUpdater(); + } + + public function loadUpdater():Void { + System.security.allowDomain("fpdownload.macromedia.com"); + + // hope that nothing is at a depth of 10000000, you can change this depth if needed, but you want + // it to be on top of your content if you have any stuff on the first frame + this.updater = _root.createEmptyMovieClip("expressInstallHolder", 10000000); + + // register the callback so we know if they cancel or there is an error + var _self = this; + this.updater.installStatus = _self.onInstallStatus; + this.hold = this.updater.createEmptyMovieClip("hold", 1); + + // can't use movieClipLoader because it has to work in 6.0.65 + this.updater.onEnterFrame = function():Void { + if(typeof this.hold.startUpdate == 'function'){ + _self.initUpdater(); + this.onEnterFrame = null; + } + } + + var cacheBuster:Number = Math.random(); + + this.hold.loadMovie("http://fpdownload.macromedia.com/pub/flashplayer/" + +"update/current/swf/autoUpdater.swf?"+ cacheBuster); + } + + private function initUpdater():Void{ + this.hold.redirectURL = _root.MMredirectURL; + this.hold.MMplayerType = _root.MMplayerType; + this.hold.MMdoctitle = _root.MMdoctitle; + this.hold.startUpdate(); + } + + public function onInstallStatus(msg):Void{ + getURL("javascript:dojo.flash.install._onInstallStatus('"+msg+"')"); + } +} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/AccordionPane.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/AccordionPane.css index f0d39102e..935629cb5 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/AccordionPane.css +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/AccordionPane.css @@ -1,22 +1,22 @@ -.dojoAccordionPane .label { - color: #000; - font-weight: bold; - background: url("images/soriaAccordionOff.gif") repeat-x top left #85aeec; - border:1px solid #d9d9d9; - font-size:0.9em; -} - -.dojoAccordionPane-selected .label { - background: url("images/soriaAccordionSelected.gif") repeat-x top left #85aeec; - border:1px solid #84a3d1; -} - -.dojoAccordionPane .label:hover { - cursor: pointer; -} - -.dojoAccordionPane .accBody { - background: #fff; - overflow: auto; - border:1px solid #84a3d1; +.dojoAccordionPane .label { + color: #000; + font-weight: bold; + background: url("images/soriaAccordionOff.gif") repeat-x top left #85aeec; + border:1px solid #d9d9d9; + font-size:0.9em; +} + +.dojoAccordionPane-selected .label { + background: url("images/soriaAccordionSelected.gif") repeat-x top left #85aeec; + border:1px solid #84a3d1; +} + +.dojoAccordionPane .label:hover { + cursor: pointer; +} + +.dojoAccordionPane .accBody { + background: #fff; + overflow: auto; + border:1px solid #84a3d1; } \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/no.svg b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/no.svg index 335092021..d53549bd1 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/no.svg +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/no.svg @@ -1,11 +1,11 @@ - - - - -]> - - - - + + + + +]> + + + + diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/ComboBox.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/ComboBox.css index 9de5167df..91c8fe95a 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/ComboBox.css +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/ComboBox.css @@ -1,5 +1,5 @@ /* - * $Id: pom.xml 559206 2007-07-24 21:01:18Z apetrelli $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -19,71 +19,71 @@ * under the License. */ -.dojoComboBoxOuter { - border: 0px !important; - margin: 0px !important; - padding: 0px !important; - background: transparent !important; - white-space: nowrap !important; -} - -.dojoComboBox { - border: 1px inset #afafaf; - margin: 0px; - padding: 0px; - vertical-align: middle !important; - float: none !important; - position: static !important; - display: inline; -} - -/* the input box */ -input.dojoComboBox { - border-right-width: 1px !important; - margin-right: 0px !important; - padding-right: 0px !important; -} - -/* the down arrow */ -img.dojoComboBox { - border-left-width: 0px !important; - padding-left: 0px !important; - margin-left: 0px !important; -} - -/* IE vertical-alignment calculations can be off by +-1 but these margins are collapsed away */ -.dj_ie img.dojoComboBox { - margin-top: 1px; - margin-bottom: 1px; -} - -/* the drop down */ -.dojoComboBoxOptions { - font-family: Verdana, Helvetica, Garamond, sans-serif; - /* font-size: 0.7em; */ - background-color: white; - border: 1px solid #afafaf; - position: absolute; - z-index: 1000; - overflow: auto; - cursor: default; -} - -.dojoComboBoxItem { - padding-left: 2px; - padding-top: 2px; - margin: 0px; -} - -.dojoComboBoxItemEven { - background-color: #f4f4f4; -} - -.dojoComboBoxItemOdd { - background-color: white; -} - -.dojoComboBoxItemHighlight { - background-color: #63709A; - color: white; -} +.dojoComboBoxOuter { + border: 0px !important; + margin: 0px !important; + padding: 0px !important; + background: transparent !important; + white-space: nowrap !important; +} + +.dojoComboBox { + border: 1px inset #afafaf; + margin: 0px; + padding: 0px; + vertical-align: middle !important; + float: none !important; + position: static !important; + display: inline; +} + +/* the input box */ +input.dojoComboBox { + border-right-width: 1px !important; + margin-right: 0px !important; + padding-right: 0px !important; +} + +/* the down arrow */ +img.dojoComboBox { + border-left-width: 0px !important; + padding-left: 0px !important; + margin-left: 0px !important; +} + +/* IE vertical-alignment calculations can be off by +-1 but these margins are collapsed away */ +.dj_ie img.dojoComboBox { + margin-top: 1px; + margin-bottom: 1px; +} + +/* the drop down */ +.dojoComboBoxOptions { + font-family: Verdana, Helvetica, Garamond, sans-serif; + /* font-size: 0.7em; */ + background-color: white; + border: 1px solid #afafaf; + position: absolute; + z-index: 1000; + overflow: auto; + cursor: default; +} + +.dojoComboBoxItem { + padding-left: 2px; + padding-top: 2px; + margin: 0px; +} + +.dojoComboBoxItemEven { + background-color: #f4f4f4; +} + +.dojoComboBoxItemOdd { + background-color: white; +} + +.dojoComboBoxItemHighlight { + background-color: #63709A; + color: white; +} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/Bind.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/Bind.js index 124dbbd59..8e3269c10 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/Bind.js +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/Bind.js @@ -1,5 +1,5 @@ /* - * $Id: pom.xml 559206 2007-07-24 21:01:18Z apetrelli $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/BindAnchor.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/BindAnchor.js index da905b34d..a88814e4a 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/BindAnchor.js +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/BindAnchor.js @@ -1,5 +1,5 @@ /* - * $Id: pom.xml 559206 2007-07-24 21:01:18Z apetrelli $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/BindDiv.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/BindDiv.js index 957bd195f..6b1be8039 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/BindDiv.js +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/BindDiv.js @@ -1,5 +1,5 @@ /* - * $Id: pom.xml 559206 2007-07-24 21:01:18Z apetrelli $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/BindEvent.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/BindEvent.js index 83fadb2ad..1b0751df5 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/BindEvent.js +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/BindEvent.js @@ -1,59 +1,59 @@ -/* - * $Id: pom.xml 559206 2007-07-24 21:01:18Z apetrelli $ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -dojo.provide("struts.widget.BindEvent"); - -dojo.require("struts.widget.Bind"); - -dojo.widget.defineWidget( - "struts.widget.BindEvent", - struts.widget.Bind, { - widgetType : "BindEvent", - - sources: "", - - postCreate : function() { - struts.widget.BindEvent.superclass.postCreate.apply(this); - var self = this; - - if(!dojo.string.isBlank(this.events) && !dojo.string.isBlank(this.sources)) { - var eventsArray = this.events.split(","); - var sourcesArray = this.sources.split(","); - - if(eventsArray && this.domNode) { - //events - dojo.lang.forEach(eventsArray, function(event) { - //sources - dojo.lang.forEach(sourcesArray, function(source) { - var sourceObject = dojo.byId(source); - if(sourceObject) { - dojo.event.connect(sourceObject, event, function(evt) { - evt.preventDefault(); - evt.stopPropagation(); - self.reloadContents(); - }); - } - }); - }); - } - } - } +/* + * $Id$ + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +dojo.provide("struts.widget.BindEvent"); + +dojo.require("struts.widget.Bind"); + +dojo.widget.defineWidget( + "struts.widget.BindEvent", + struts.widget.Bind, { + widgetType : "BindEvent", + + sources: "", + + postCreate : function() { + struts.widget.BindEvent.superclass.postCreate.apply(this); + var self = this; + + if(!dojo.string.isBlank(this.events) && !dojo.string.isBlank(this.sources)) { + var eventsArray = this.events.split(","); + var sourcesArray = this.sources.split(","); + + if(eventsArray && this.domNode) { + //events + dojo.lang.forEach(eventsArray, function(event) { + //sources + dojo.lang.forEach(sourcesArray, function(source) { + var sourceObject = dojo.byId(source); + if(sourceObject) { + dojo.event.connect(sourceObject, event, function(evt) { + evt.preventDefault(); + evt.stopPropagation(); + self.reloadContents(); + }); + } + }); + }); + } + } + } }); \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/ComboBox.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/ComboBox.js index 32b20dde9..7145bd34a 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/ComboBox.js +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/ComboBox.js @@ -1,5 +1,5 @@ /* - * $Id: pom.xml 559206 2007-07-24 21:01:18Z apetrelli $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsDatePicker.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsDatePicker.js index 5801923e5..f6e86c8b2 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsDatePicker.js +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsDatePicker.js @@ -1,5 +1,5 @@ /* - * $Id: pom.xml 559206 2007-07-24 21:01:18Z apetrelli $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTabContainer.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTabContainer.js index efb9c07e7..f7b1e44ad 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTabContainer.js +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTabContainer.js @@ -1,116 +1,116 @@ -/* - * $Id: pom.xml 559206 2007-07-24 21:01:18Z apetrelli $ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -dojo.provide("struts.widget.StrutsTabContainer"); - -dojo.require("dojo.widget.TabContainer"); - -dojo.widget.defineWidget( - "struts.widget.StrutsTabContainer", - dojo.widget.TabContainer, { - widgetType : "StrutsTabContainer", - - afterSelectTabNotifyTopics : "", - afterSelectTabNotifyTopicsArray : null, - beforeSelectTabNotifyTopics : "", - beforeSelectTabNotifyTopicsArray : null, - - disabledTabCssClass : "strutsDisabledTab", - - postCreate : function() { - struts.widget.StrutsTabContainer.superclass.postCreate.apply(this); - - //before topics - if(!dojo.string.isBlank(this.beforeSelectTabNotifyTopics)) { - this.beforeSelectTabNotifyTopicsArray = this.beforeSelectTabNotifyTopics.split(","); - } - - //after topics - if(!dojo.string.isBlank(this.afterSelectTabNotifyTopics)) { - this.afterSelectTabNotifyTopicsArray = this.afterSelectTabNotifyTopics.split(","); - } - - // add disabled class to disabled tabs - if(this.disabledTabCssClass) { - dojo.lang.forEach(this.children, function(div){ - if(div.disabled) { - this.disableTab(div); - } - }); - } - }, - - selectChild: function (tab, callingWidget) { - if(!tab.disabled) { - var cancel = {"cancel" : false}; - - if(this.beforeSelectTabNotifyTopicsArray) { - var self = this; - dojo.lang.forEach(this.beforeSelectTabNotifyTopicsArray, function(topic) { - try { - dojo.event.topic.publish(topic, cancel, tab, self); - } catch(ex){ - dojo.debug(ex); - } - }); - } - - if(!cancel.cancel) { - struts.widget.StrutsTabContainer.superclass.selectChild.apply(this, [tab, callingWidget]); - - if(this.afterSelectTabNotifyTopicsArray) { - var self = this; - dojo.lang.forEach(this.afterSelectTabNotifyTopicsArray, function(topic) { - try { - dojo.event.topic.publish(topic, tab, self); - } catch(ex){ - dojo.debug(ex); - } - }); - } - } - } - }, - - disableTab : function(t) { - var tabWidget = this.getTabWidget(t); - tabWidget.disabled = true; - dojo.html.addClass(tabWidget.controlButton.domNode, this.disabledTabCssClass); - }, - - enableTab : function(t) { - var tabWidget = this.getTabWidget(t); - tabWidget.disabled = false; - dojo.html.removeClass(tabWidget.controlButton.domNode, this.disabledTabCssClass); - }, - - getTabWidget : function(t) { - if(dojo.lang.isNumber(t)) { - //tab index - return this.children[t]; - } else if(dojo.lang.isString(t)) { - //tab id - return dojo.widget.byId(t); - } else { - //tab widget? - return t; - } - } -}); +/* + * $Id$ + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +dojo.provide("struts.widget.StrutsTabContainer"); + +dojo.require("dojo.widget.TabContainer"); + +dojo.widget.defineWidget( + "struts.widget.StrutsTabContainer", + dojo.widget.TabContainer, { + widgetType : "StrutsTabContainer", + + afterSelectTabNotifyTopics : "", + afterSelectTabNotifyTopicsArray : null, + beforeSelectTabNotifyTopics : "", + beforeSelectTabNotifyTopicsArray : null, + + disabledTabCssClass : "strutsDisabledTab", + + postCreate : function() { + struts.widget.StrutsTabContainer.superclass.postCreate.apply(this); + + //before topics + if(!dojo.string.isBlank(this.beforeSelectTabNotifyTopics)) { + this.beforeSelectTabNotifyTopicsArray = this.beforeSelectTabNotifyTopics.split(","); + } + + //after topics + if(!dojo.string.isBlank(this.afterSelectTabNotifyTopics)) { + this.afterSelectTabNotifyTopicsArray = this.afterSelectTabNotifyTopics.split(","); + } + + // add disabled class to disabled tabs + if(this.disabledTabCssClass) { + dojo.lang.forEach(this.children, function(div){ + if(div.disabled) { + this.disableTab(div); + } + }); + } + }, + + selectChild: function (tab, callingWidget) { + if(!tab.disabled) { + var cancel = {"cancel" : false}; + + if(this.beforeSelectTabNotifyTopicsArray) { + var self = this; + dojo.lang.forEach(this.beforeSelectTabNotifyTopicsArray, function(topic) { + try { + dojo.event.topic.publish(topic, cancel, tab, self); + } catch(ex){ + dojo.debug(ex); + } + }); + } + + if(!cancel.cancel) { + struts.widget.StrutsTabContainer.superclass.selectChild.apply(this, [tab, callingWidget]); + + if(this.afterSelectTabNotifyTopicsArray) { + var self = this; + dojo.lang.forEach(this.afterSelectTabNotifyTopicsArray, function(topic) { + try { + dojo.event.topic.publish(topic, tab, self); + } catch(ex){ + dojo.debug(ex); + } + }); + } + } + } + }, + + disableTab : function(t) { + var tabWidget = this.getTabWidget(t); + tabWidget.disabled = true; + dojo.html.addClass(tabWidget.controlButton.domNode, this.disabledTabCssClass); + }, + + enableTab : function(t) { + var tabWidget = this.getTabWidget(t); + tabWidget.disabled = false; + dojo.html.removeClass(tabWidget.controlButton.domNode, this.disabledTabCssClass); + }, + + getTabWidget : function(t) { + if(dojo.lang.isNumber(t)) { + //tab index + return this.children[t]; + } else if(dojo.lang.isString(t)) { + //tab id + return dojo.widget.byId(t); + } else { + //tab widget? + return t; + } + } +}); diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTimePicker.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTimePicker.js index d5226a26e..d01fcd942 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTimePicker.js +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTimePicker.js @@ -1,5 +1,5 @@ /* - * $Id: pom.xml 559206 2007-07-24 21:01:18Z apetrelli $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTree.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTree.js index 0d8200b22..c91171696 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTree.js +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTree.js @@ -1,5 +1,5 @@ /* - * $Id: pom.xml 559206 2007-07-24 21:01:18Z apetrelli $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTreeNode.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTreeNode.js index fe2ecf08f..1cf55cb99 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTreeNode.js +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTreeNode.js @@ -1,5 +1,5 @@ /* - * $Id: pom.xml 559206 2007-07-24 21:01:18Z apetrelli $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTreeSelector.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTreeSelector.js index a3751b8dd..68a8ce7ca 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTreeSelector.js +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTreeSelector.js @@ -1,5 +1,5 @@ /* - * $Id: pom.xml 559206 2007-07-24 21:01:18Z apetrelli $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/__package__.js index f834319f8..00642bbb4 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/__package__.js +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/__package__.js @@ -1,5 +1,5 @@ /* - * $Id: pom.xml 559206 2007-07-24 21:01:18Z apetrelli $ + * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js index 52e187c7e..e50678fd4 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js @@ -1,18783 +1,18783 @@ -/* - Copyright (c) 2004-2006, The Dojo Foundation - All Rights Reserved. - - Licensed under the Academic Free License version 2.1 or above OR the - modified BSD license. For more information on Dojo licensing, see: - - http://dojotoolkit.org/community/licensing.shtml -*/ - -/* - This is a compiled version of Dojo, built for deployment and not for - development. To get an editable version, please visit: - - http://dojotoolkit.org - - for documentation and information on getting the source. -*/ - -if(typeof dojo=="undefined"){ -var dj_global=this; -var dj_currentContext=this; -function dj_undef(_1,_2){ -return (typeof (_2||dj_currentContext)[_1]=="undefined"); -} -if(dj_undef("djConfig",this)){ -var djConfig={}; -} -if(dj_undef("dojo",this)){ -var dojo={}; -} -dojo.global=function(){ -return dj_currentContext; -}; -dojo.locale=djConfig.locale; -dojo.version={major:0,minor:4,patch:3,flag:"",revision:Number("$Rev: 8617 $".match(/[0-9]+/)[0]),toString:function(){ -with(dojo.version){ -return major+"."+minor+"."+patch+flag+" ("+revision+")"; -} -}}; -dojo.evalProp=function(_3,_4,_5){ -if((!_4)||(!_3)){ -return undefined; -} -if(!dj_undef(_3,_4)){ -return _4[_3]; -} -return (_5?(_4[_3]={}):undefined); -}; -dojo.parseObjPath=function(_6,_7,_8){ -var _9=(_7||dojo.global()); -var _a=_6.split("."); -var _b=_a.pop(); -for(var i=0,l=_a.length;i1){ -dh.modulesLoadedListeners.push(function(){ -obj[_3d](); -}); -} -} -if(dh.post_load_&&dh.inFlightCount==0&&!dh.loadNotifying){ -dh.callLoaded(); -} -}; -dojo.addOnUnload=function(obj,_40){ -var dh=dojo.hostenv; -if(arguments.length==1){ -dh.unloadListeners.push(obj); -}else{ -if(arguments.length>1){ -dh.unloadListeners.push(function(){ -obj[_40](); -}); -} -} -}; -dojo.hostenv.modulesLoaded=function(){ -if(this.post_load_){ -return; -} -if(this.loadUriStack.length==0&&this.getTextStack.length==0){ -if(this.inFlightCount>0){ -dojo.debug("files still in flight!"); -return; -} -dojo.hostenv.callLoaded(); -} -}; -dojo.hostenv.callLoaded=function(){ -if(typeof setTimeout=="object"||(djConfig["useXDomain"]&&dojo.render.html.opera)){ -setTimeout("dojo.hostenv.loaded();",0); -}else{ -dojo.hostenv.loaded(); -} -}; -dojo.hostenv.getModuleSymbols=function(_42){ -var _43=_42.split("."); -for(var i=_43.length;i>0;i--){ -var _45=_43.slice(0,i).join("."); -if((i==1)&&!this.moduleHasPrefix(_45)){ -_43[0]="../"+_43[0]; -}else{ -var _46=this.getModulePrefix(_45); -if(_46!=_45){ -_43.splice(0,i,_46); -break; -} -} -} -return _43; -}; -dojo.hostenv._global_omit_module_check=false; -dojo.hostenv.loadModule=function(_47,_48,_49){ -if(!_47){ -return; -} -_49=this._global_omit_module_check||_49; -var _4a=this.findModule(_47,false); -if(_4a){ -return _4a; -} -if(dj_undef(_47,this.loading_modules_)){ -this.addedToLoadingCount.push(_47); -} -this.loading_modules_[_47]=1; -var _4b=_47.replace(/\./g,"/")+".js"; -var _4c=_47.split("."); -var _4d=this.getModuleSymbols(_47); -var _4e=((_4d[0].charAt(0)!="/")&&!_4d[0].match(/^\w+:/)); -var _4f=_4d[_4d.length-1]; -var ok; -if(_4f=="*"){ -_47=_4c.slice(0,-1).join("."); -while(_4d.length){ -_4d.pop(); -_4d.push(this.pkgFileName); -_4b=_4d.join("/")+".js"; -if(_4e&&_4b.charAt(0)=="/"){ -_4b=_4b.slice(1); -} -ok=this.loadPath(_4b,!_49?_47:null); -if(ok){ -break; -} -_4d.pop(); -} -}else{ -_4b=_4d.join("/")+".js"; -_47=_4c.join("."); -var _51=!_49?_47:null; -ok=this.loadPath(_4b,_51); -if(!ok&&!_48){ -_4d.pop(); -while(_4d.length){ -_4b=_4d.join("/")+".js"; -ok=this.loadPath(_4b,_51); -if(ok){ -break; -} -_4d.pop(); -_4b=_4d.join("/")+"/"+this.pkgFileName+".js"; -if(_4e&&_4b.charAt(0)=="/"){ -_4b=_4b.slice(1); -} -ok=this.loadPath(_4b,_51); -if(ok){ -break; -} -} -} -if(!ok&&!_49){ -dojo.raise("Could not load '"+_47+"'; last tried '"+_4b+"'"); -} -} -if(!_49&&!this["isXDomain"]){ -_4a=this.findModule(_47,false); -if(!_4a){ -dojo.raise("symbol '"+_47+"' is not defined after loading '"+_4b+"'"); -} -} -return _4a; -}; -dojo.hostenv.startPackage=function(_52){ -var _53=String(_52); -var _54=_53; -var _55=_52.split(/\./); -if(_55[_55.length-1]=="*"){ -_55.pop(); -_54=_55.join("."); -} -var _56=dojo.evalObjPath(_54,true); -this.loaded_modules_[_53]=_56; -this.loaded_modules_[_54]=_56; -return _56; -}; -dojo.hostenv.findModule=function(_57,_58){ -var lmn=String(_57); -if(this.loaded_modules_[lmn]){ -return this.loaded_modules_[lmn]; -} -if(_58){ -dojo.raise("no loaded module named '"+_57+"'"); -} -return null; -}; -dojo.kwCompoundRequire=function(_5a){ -var _5b=_5a["common"]||[]; -var _5c=_5a[dojo.hostenv.name_]?_5b.concat(_5a[dojo.hostenv.name_]||[]):_5b.concat(_5a["default"]||[]); -for(var x=0;x<_5c.length;x++){ -var _5e=_5c[x]; -if(_5e.constructor==Array){ -dojo.hostenv.loadModule.apply(dojo.hostenv,_5e); -}else{ -dojo.hostenv.loadModule(_5e); -} -} -}; -dojo.require=function(_5f){ -dojo.hostenv.loadModule.apply(dojo.hostenv,arguments); -}; -dojo.requireIf=function(_60,_61){ -var _62=arguments[0]; -if((_62===true)||(_62=="common")||(_62&&dojo.render[_62].capable)){ -var _63=[]; -for(var i=1;i0;i--){ -_74.push(_73.slice(0,i).join("-")); -} -_74.push(false); -if(_71){ -_74.reverse(); -} -for(var j=_74.length-1;j>=0;j--){ -var loc=_74[j]||"ROOT"; -var _78=_72(loc); -if(_78){ -break; -} -} -}; -dojo.hostenv.localesGenerated=["ROOT","es-es","es","it-it","pt-br","de","fr-fr","zh-cn","pt","en-us","zh","fr","zh-tw","it","en-gb","xx","de-de","ko-kr","ja-jp","ko","en","ja"]; -dojo.hostenv.registerNlsPrefix=function(){ -dojo.registerModulePath("nls","nls"); -}; -dojo.hostenv.preloadLocalizations=function(){ -if(dojo.hostenv.localesGenerated){ -dojo.hostenv.registerNlsPrefix(); -function preload(_79){ -_79=dojo.hostenv.normalizeLocale(_79); -dojo.hostenv.searchLocalePath(_79,true,function(loc){ -for(var i=0;i_84.length){ -_84=_85[i]; -} -} -} -if(!_84){ -_84="ROOT"; -} -} -var _87=_81?_84:_82; -var _88=dojo.hostenv.findModule(_83); -var _89=null; -if(_88){ -if(djConfig.localizationComplete&&_88._built){ -return; -} -var _8a=_87.replace("-","_"); -var _8b=_83+"."+_8a; -_89=dojo.hostenv.findModule(_8b); -} -if(!_89){ -_88=dojo.hostenv.startPackage(_83); -var _8c=dojo.hostenv.getModuleSymbols(_7e); -var _8d=_8c.concat("nls").join("/"); -var _8e; -dojo.hostenv.searchLocalePath(_87,_81,function(loc){ -var _90=loc.replace("-","_"); -var _91=_83+"."+_90; -var _92=false; -if(!dojo.hostenv.findModule(_91)){ -dojo.hostenv.startPackage(_91); -var _93=[_8d]; -if(loc!="ROOT"){ -_93.push(loc); -} -_93.push(_7f); -var _94=_93.join("/")+".js"; -_92=dojo.hostenv.loadPath(_94,null,function(_95){ -var _96=function(){ -}; -_96.prototype=_8e; -_88[_90]=new _96(); -for(var j in _95){ -_88[_90][j]=_95[j]; -} -}); -}else{ -_92=true; -} -if(_92&&_88[_90]){ -_8e=_88[_90]; -}else{ -_88[_90]=_8e; -} -if(_81){ -return true; -} -}); -} -if(_81&&_82!=_84){ -_88[_82.replace("-","_")]=_88[_84.replace("-","_")]; -} -}; -(function(){ -var _98=djConfig.extraLocale; -if(_98){ -if(!_98 instanceof Array){ -_98=[_98]; -} -var req=dojo.requireLocalization; -dojo.requireLocalization=function(m,b,_9c,_9d){ -req(m,b,_9c,_9d); -if(_9c){ -return; -} -for(var i=0;i<_98.length;i++){ -req(m,b,_98[i],_9d); -} -}; -} -})(); -} -if(typeof window!="undefined"){ -(function(){ -if(djConfig.allowQueryConfig){ -var _9f=document.location.toString(); -var _a0=_9f.split("?",2); -if(_a0.length>1){ -var _a1=_a0[1]; -var _a2=_a1.split("&"); -for(var x in _a2){ -var sp=_a2[x].split("="); -if((sp[0].length>9)&&(sp[0].substr(0,9)=="djConfig.")){ -var opt=sp[0].substr(9); -try{ -djConfig[opt]=eval(sp[1]); -} -catch(e){ -djConfig[opt]=sp[1]; -} -} -} -} -} -if(((djConfig["baseScriptUri"]=="")||(djConfig["baseRelativePath"]==""))&&(document&&document.getElementsByTagName)){ -var _a6=document.getElementsByTagName("script"); -var _a7=/(__package__|dojo|bootstrap1)\.js([\?\.]|$)/i; -for(var i=0;i<_a6.length;i++){ -var src=_a6[i].getAttribute("src"); -if(!src){ -continue; -} -var m=src.match(_a7); -if(m){ -var _ab=src.substring(0,m.index); -if(src.indexOf("bootstrap1")>-1){ -_ab+="../"; -} -if(!this["djConfig"]){ -djConfig={}; -} -if(djConfig["baseScriptUri"]==""){ -djConfig["baseScriptUri"]=_ab; -} -if(djConfig["baseRelativePath"]==""){ -djConfig["baseRelativePath"]=_ab; -} -break; -} -} -} -var dr=dojo.render; -var drh=dojo.render.html; -var drs=dojo.render.svg; -var dua=(drh.UA=navigator.userAgent); -var dav=(drh.AV=navigator.appVersion); -var t=true; -var f=false; -drh.capable=t; -drh.support.builtin=t; -dr.ver=parseFloat(drh.AV); -dr.os.mac=dav.indexOf("Macintosh")>=0; -dr.os.win=dav.indexOf("Windows")>=0; -dr.os.linux=dav.indexOf("X11")>=0; -drh.opera=dua.indexOf("Opera")>=0; -drh.khtml=(dav.indexOf("Konqueror")>=0)||(dav.indexOf("Safari")>=0); -drh.safari=dav.indexOf("Safari")>=0; -var _b3=dua.indexOf("Gecko"); -drh.mozilla=drh.moz=(_b3>=0)&&(!drh.khtml); -if(drh.mozilla){ -drh.geckoVersion=dua.substring(_b3+6,_b3+14); -} -drh.ie=(document.all)&&(!drh.opera); -drh.ie50=drh.ie&&dav.indexOf("MSIE 5.0")>=0; -drh.ie55=drh.ie&&dav.indexOf("MSIE 5.5")>=0; -drh.ie60=drh.ie&&dav.indexOf("MSIE 6.0")>=0; -drh.ie70=drh.ie&&dav.indexOf("MSIE 7.0")>=0; -var cm=document["compatMode"]; -drh.quirks=(cm=="BackCompat")||(cm=="QuirksMode")||drh.ie55||drh.ie50; -dojo.locale=dojo.locale||(drh.ie?navigator.userLanguage:navigator.language).toLowerCase(); -dr.vml.capable=drh.ie; -drs.capable=f; -drs.support.plugin=f; -drs.support.builtin=f; -var _b5=window["document"]; -var tdi=_b5["implementation"]; -if((tdi)&&(tdi["hasFeature"])&&(tdi.hasFeature("org.w3c.dom.svg","1.0"))){ -drs.capable=t; -drs.support.builtin=t; -drs.support.plugin=f; -} -if(drh.safari){ -var tmp=dua.split("AppleWebKit/")[1]; -var ver=parseFloat(tmp.split(" ")[0]); -if(ver>=420){ -drs.capable=t; -drs.support.builtin=t; -drs.support.plugin=f; -} -}else{ -} -})(); -dojo.hostenv.startPackage("dojo.hostenv"); -dojo.render.name=dojo.hostenv.name_="browser"; -dojo.hostenv.searchIds=[]; -dojo.hostenv._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"]; -dojo.hostenv.getXmlhttpObject=function(){ -var _b9=null; -var _ba=null; -try{ -_b9=new XMLHttpRequest(); -} -catch(e){ -} -if(!_b9){ -for(var i=0;i<3;++i){ -var _bc=dojo.hostenv._XMLHTTP_PROGIDS[i]; -try{ -_b9=new ActiveXObject(_bc); -} -catch(e){ -_ba=e; -} -if(_b9){ -dojo.hostenv._XMLHTTP_PROGIDS=[_bc]; -break; -} -} -} -if(!_b9){ -return dojo.raise("XMLHTTP not available",_ba); -} -return _b9; -}; -dojo.hostenv._blockAsync=false; -dojo.hostenv.getText=function(uri,_be,_bf){ -if(!_be){ -this._blockAsync=true; -} -var _c0=this.getXmlhttpObject(); -function isDocumentOk(_c1){ -var _c2=_c1["status"]; -return Boolean((!_c2)||((200<=_c2)&&(300>_c2))||(_c2==304)); -} -if(_be){ -var _c3=this,_c4=null,gbl=dojo.global(); -var xhr=dojo.evalObjPath("dojo.io.XMLHTTPTransport"); -_c0.onreadystatechange=function(){ -if(_c4){ -gbl.clearTimeout(_c4); -_c4=null; -} -if(_c3._blockAsync||(xhr&&xhr._blockAsync)){ -_c4=gbl.setTimeout(function(){ -_c0.onreadystatechange.apply(this); -},10); -}else{ -if(4==_c0.readyState){ -if(isDocumentOk(_c0)){ -_be(_c0.responseText); -} -} -} -}; -} -_c0.open("GET",uri,_be?true:false); -try{ -_c0.send(null); -if(_be){ -return null; -} -if(!isDocumentOk(_c0)){ -var err=Error("Unable to load "+uri+" status:"+_c0.status); -err.status=_c0.status; -err.responseText=_c0.responseText; -throw err; -} -} -catch(e){ -this._blockAsync=false; -if((_bf)&&(!_be)){ -return null; -}else{ -throw e; -} -} -this._blockAsync=false; -return _c0.responseText; -}; -dojo.hostenv.defaultDebugContainerId="dojoDebug"; -dojo.hostenv._println_buffer=[]; -dojo.hostenv._println_safe=false; -dojo.hostenv.println=function(_c8){ -if(!dojo.hostenv._println_safe){ -dojo.hostenv._println_buffer.push(_c8); -}else{ -try{ -var _c9=document.getElementById(djConfig.debugContainerId?djConfig.debugContainerId:dojo.hostenv.defaultDebugContainerId); -if(!_c9){ -_c9=dojo.body(); -} -var div=document.createElement("div"); -div.appendChild(document.createTextNode(_c8)); -_c9.appendChild(div); -} -catch(e){ -try{ -document.write("
"+_c8+"
"); -} -catch(e2){ -window.status=_c8; -} -} -} -}; -dojo.addOnLoad(function(){ -dojo.hostenv._println_safe=true; -while(dojo.hostenv._println_buffer.length>0){ -dojo.hostenv.println(dojo.hostenv._println_buffer.shift()); -} -}); -function dj_addNodeEvtHdlr(_cb,_cc,fp){ -var _ce=_cb["on"+_cc]||function(){ -}; -_cb["on"+_cc]=function(){ -fp.apply(_cb,arguments); -_ce.apply(_cb,arguments); -}; -return true; -} -dojo.hostenv._djInitFired=false; -function dj_load_init(e){ -dojo.hostenv._djInitFired=true; -var _d0=(e&&e.type)?e.type.toLowerCase():"load"; -if(arguments.callee.initialized||(_d0!="domcontentloaded"&&_d0!="load")){ -return; -} -arguments.callee.initialized=true; -if(typeof (_timer)!="undefined"){ -clearInterval(_timer); -delete _timer; -} -var _d1=function(){ -if(dojo.render.html.ie){ -dojo.hostenv.makeWidgets(); -} -}; -if(dojo.hostenv.inFlightCount==0){ -_d1(); -dojo.hostenv.modulesLoaded(); -}else{ -dojo.hostenv.modulesLoadedListeners.unshift(_d1); -} -} -if(document.addEventListener){ -if(dojo.render.html.opera||(dojo.render.html.moz&&(djConfig["enableMozDomContentLoaded"]===true))){ -document.addEventListener("DOMContentLoaded",dj_load_init,null); -} -window.addEventListener("load",dj_load_init,null); -} -if(dojo.render.html.ie&&dojo.render.os.win){ -document.attachEvent("onreadystatechange",function(e){ -if(document.readyState=="complete"){ -dj_load_init(); -} -}); -} -if(/(WebKit|khtml)/i.test(navigator.userAgent)){ -var _timer=setInterval(function(){ -if(/loaded|complete/.test(document.readyState)){ -dj_load_init(); -} -},10); -} -if(dojo.render.html.ie){ -dj_addNodeEvtHdlr(window,"beforeunload",function(){ -dojo.hostenv._unloading=true; -window.setTimeout(function(){ -dojo.hostenv._unloading=false; -},0); -}); -} -dj_addNodeEvtHdlr(window,"unload",function(){ -dojo.hostenv.unloaded(); -if((!dojo.render.html.ie)||(dojo.render.html.ie&&dojo.hostenv._unloading)){ -dojo.hostenv.unloaded(); -} -}); -dojo.hostenv.makeWidgets=function(){ -var _d3=[]; -if(djConfig.searchIds&&djConfig.searchIds.length>0){ -_d3=_d3.concat(djConfig.searchIds); -} -if(dojo.hostenv.searchIds&&dojo.hostenv.searchIds.length>0){ -_d3=_d3.concat(dojo.hostenv.searchIds); -} -if((djConfig.parseWidgets)||(_d3.length>0)){ -if(dojo.evalObjPath("dojo.widget.Parse")){ -var _d4=new dojo.xml.Parse(); -if(_d3.length>0){ -for(var x=0;x<_d3.length;x++){ -var _d6=document.getElementById(_d3[x]); -if(!_d6){ -continue; -} -var _d7=_d4.parseElement(_d6,null,true); -dojo.widget.getParser().createComponents(_d7); -} -}else{ -if(djConfig.parseWidgets){ -var _d7=_d4.parseElement(dojo.body(),null,true); -dojo.widget.getParser().createComponents(_d7); -} -} -} -} -}; -dojo.addOnLoad(function(){ -if(!dojo.render.html.ie){ -dojo.hostenv.makeWidgets(); -} -}); -try{ -if(dojo.render.html.ie){ -document.namespaces.add("v","urn:schemas-microsoft-com:vml"); -document.createStyleSheet().addRule("v\\:*","behavior:url(#default#VML)"); -} -} -catch(e){ -} -dojo.hostenv.writeIncludes=function(){ -}; -if(!dj_undef("document",this)){ -dj_currentDocument=this.document; -} -dojo.doc=function(){ -return dj_currentDocument; -}; -dojo.body=function(){ -return dojo.doc().body||dojo.doc().getElementsByTagName("body")[0]; -}; -dojo.byId=function(id,doc){ -if((id)&&((typeof id=="string")||(id instanceof String))){ -if(!doc){ -doc=dj_currentDocument; -} -var ele=doc.getElementById(id); -if(ele&&(ele.id!=id)&&doc.all){ -ele=null; -eles=doc.all[id]; -if(eles){ -if(eles.length){ -for(var i=0;i0)?(/^\s+/):(wh<0)?(/\s+$/):(/^\s+|\s+$/g); -return str.replace(re,""); -}; -dojo.string.trimStart=function(str){ -return dojo.string.trim(str,1); -}; -dojo.string.trimEnd=function(str){ -return dojo.string.trim(str,-1); -}; -dojo.string.repeat=function(str,_f4,_f5){ -var out=""; -for(var i=0;i<_f4;i++){ -out+=str; -if(_f5&&i<_f4-1){ -out+=_f5; -} -} -return out; -}; -dojo.string.pad=function(str,len,c,dir){ -var out=String(str); -if(!c){ -c="0"; -} -if(!dir){ -dir=1; -} -while(out.length0){ -out=c+out; -}else{ -out+=c; -} -} -return out; -}; -dojo.string.padLeft=function(str,len,c){ -return dojo.string.pad(str,len,c,1); -}; -dojo.string.padRight=function(str,len,c){ -return dojo.string.pad(str,len,c,-1); -}; -dojo.provide("dojo.string"); -dojo.provide("dojo.lang.common"); -dojo.lang.inherits=function(_103,_104){ -if(!dojo.lang.isFunction(_104)){ -dojo.raise("dojo.inherits: superclass argument ["+_104+"] must be a function (subclass: ["+_103+"']"); -} -_103.prototype=new _104(); -_103.prototype.constructor=_103; -_103.superclass=_104.prototype; -_103["super"]=_104.prototype; -}; -dojo.lang._mixin=function(obj,_106){ -var tobj={}; -for(var x in _106){ -if((typeof tobj[x]=="undefined")||(tobj[x]!=_106[x])){ -obj[x]=_106[x]; -} -} -if(dojo.render.html.ie&&(typeof (_106["toString"])=="function")&&(_106["toString"]!=obj["toString"])&&(_106["toString"]!=tobj["toString"])){ -obj.toString=_106.toString; -} -return obj; -}; -dojo.lang.mixin=function(obj,_10a){ -for(var i=1,l=arguments.length;i-1; -}; -dojo.lang.isObject=function(it){ -if(typeof it=="undefined"){ -return false; -} -return (typeof it=="object"||it===null||dojo.lang.isArray(it)||dojo.lang.isFunction(it)); -}; -dojo.lang.isArray=function(it){ -return (it&&it instanceof Array||typeof it=="array"); -}; -dojo.lang.isArrayLike=function(it){ -if((!it)||(dojo.lang.isUndefined(it))){ -return false; -} -if(dojo.lang.isString(it)){ -return false; -} -if(dojo.lang.isFunction(it)){ -return false; -} -if(dojo.lang.isArray(it)){ -return true; -} -if((it.tagName)&&(it.tagName.toLowerCase()=="form")){ -return false; -} -if(dojo.lang.isNumber(it.length)&&isFinite(it.length)){ -return true; -} -return false; -}; -dojo.lang.isFunction=function(it){ -return (it instanceof Function||typeof it=="function"); -}; -(function(){ -if((dojo.render.html.capable)&&(dojo.render.html["safari"])){ -dojo.lang.isFunction=function(it){ -if((typeof (it)=="function")&&(it=="[object NodeList]")){ -return false; -} -return (it instanceof Function||typeof it=="function"); -}; -} -})(); -dojo.lang.isString=function(it){ -return (typeof it=="string"||it instanceof String); -}; -dojo.lang.isAlien=function(it){ -if(!it){ -return false; -} -return !dojo.lang.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it)); -}; -dojo.lang.isBoolean=function(it){ -return (it instanceof Boolean||typeof it=="boolean"); -}; -dojo.lang.isNumber=function(it){ -return (it instanceof Number||typeof it=="number"); -}; -dojo.lang.isUndefined=function(it){ -return ((typeof (it)=="undefined")&&(it==undefined)); -}; -dojo.provide("dojo.lang.extras"); -dojo.lang.setTimeout=function(func,_12a){ -var _12b=window,_12c=2; -if(!dojo.lang.isFunction(func)){ -_12b=func; -func=_12a; -_12a=arguments[2]; -_12c++; -} -if(dojo.lang.isString(func)){ -func=_12b[func]; -} -var args=[]; -for(var i=_12c;i0){ -dojo.io.bind(dojo.io._bindQueue.shift()); -}else{ -dojo.io._queueBindInFlight=false; -} -} -}; -dojo.io._bindQueue=[]; -dojo.io._queueBindInFlight=false; -dojo.io.argsFromMap=function(map,_16b,last){ -var enc=/utf/i.test(_16b||"")?encodeURIComponent:dojo.string.encodeAscii; -var _16e=[]; -var _16f=new Object(); -for(var name in map){ -var _171=function(elt){ -var val=enc(name)+"="+enc(elt); -_16e[(last==name)?"push":"unshift"](val); -}; -if(!_16f[name]){ -var _174=map[name]; -if(dojo.lang.isArray(_174)){ -dojo.lang.forEach(_174,_171); -}else{ -_171(_174); -} -} -} -return _16e.join("&"); -}; -dojo.io.setIFrameSrc=function(_175,src,_177){ -try{ -var r=dojo.render.html; -if(!_177){ -if(r.safari){ -_175.location=src; -}else{ -frames[_175.name].location=src; -} -}else{ -var idoc; -if(r.ie){ -idoc=_175.contentWindow.document; -}else{ -if(r.safari){ -idoc=_175.document; -}else{ -idoc=_175.contentWindow; -} -} -if(!idoc){ -_175.location=src; -return; -}else{ -idoc.location.replace(src); -} -} -} -catch(e){ -dojo.debug(e); -dojo.debug("setIFrameSrc: "+e); -} -}; -dojo.provide("dojo.lang.array"); -dojo.lang.mixin(dojo.lang,{has:function(obj,name){ -try{ -return typeof obj[name]!="undefined"; -} -catch(e){ -return false; -} -},isEmpty:function(obj){ -if(dojo.lang.isObject(obj)){ -var tmp={}; -var _17e=0; -for(var x in obj){ -if(obj[x]&&(!tmp[x])){ -_17e++; -break; -} -} -return _17e==0; -}else{ -if(dojo.lang.isArrayLike(obj)||dojo.lang.isString(obj)){ -return obj.length==0; -} -} -},map:function(arr,obj,_182){ -var _183=dojo.lang.isString(arr); -if(_183){ -arr=arr.split(""); -} -if(dojo.lang.isFunction(obj)&&(!_182)){ -_182=obj; -obj=dj_global; -}else{ -if(dojo.lang.isFunction(obj)&&_182){ -var _184=obj; -obj=_182; -_182=_184; -} -} -if(Array.map){ -var _185=Array.map(arr,_182,obj); -}else{ -var _185=[]; -for(var i=0;i=3){ -dojo.raise("thisObject doesn't exist!"); -} -_1a3=dj_global; -} -_1a5=[]; -for(var i=0;i/gm,">").replace(/"/gm,"""); -if(!_1e8){ -str=str.replace(/'/gm,"'"); -} -return str; -}; -dojo.string.escapeSql=function(str){ -return str.replace(/'/gm,"''"); -}; -dojo.string.escapeRegExp=function(str){ -return str.replace(/\\/gm,"\\\\").replace(/([\f\b\n\t\r[\^$|?*+(){}])/gm,"\\$1"); -}; -dojo.string.escapeJavaScript=function(str){ -return str.replace(/(["'\f\b\n\t\r])/gm,"\\$1"); -}; -dojo.string.escapeString=function(str){ -return ("\""+str.replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r"); -}; -dojo.string.summary=function(str,len){ -if(!len||str.length<=len){ -return str; -} -return str.substring(0,len).replace(/\.+$/,"")+"..."; -}; -dojo.string.endsWith=function(str,end,_1f1){ -if(_1f1){ -str=str.toLowerCase(); -end=end.toLowerCase(); -} -if((str.length-end.length)<0){ -return false; -} -return str.lastIndexOf(end)==str.length-end.length; -}; -dojo.string.endsWithAny=function(str){ -for(var i=1;i-1){ -return true; -} -} -return false; -}; -dojo.string.normalizeNewlines=function(text,_1fc){ -if(_1fc=="\n"){ -text=text.replace(/\r\n/g,"\n"); -text=text.replace(/\r/g,"\n"); -}else{ -if(_1fc=="\r"){ -text=text.replace(/\r\n/g,"\r"); -text=text.replace(/\n/g,"\r"); -}else{ -text=text.replace(/([^\r])\n/g,"$1\r\n").replace(/\r([^\n])/g,"\r\n$1"); -} -} -return text; -}; -dojo.string.splitEscaped=function(str,_1fe){ -var _1ff=[]; -for(var i=0,_201=0;i0){ -return _224[0]; -} -node=node.parentNode; -} -if(_223){ -return null; -} -return _224; -}; -dojo.dom.getAncestorsByTag=function(node,tag,_228){ -tag=tag.toLowerCase(); -return dojo.dom.getAncestors(node,function(el){ -return ((el.tagName)&&(el.tagName.toLowerCase()==tag)); -},_228); -}; -dojo.dom.getFirstAncestorByTag=function(node,tag){ -return dojo.dom.getAncestorsByTag(node,tag,true); -}; -dojo.dom.isDescendantOf=function(node,_22d,_22e){ -if(_22e&&node){ -node=node.parentNode; -} -while(node){ -if(node==_22d){ -return true; -} -node=node.parentNode; -} -return false; -}; -dojo.dom.innerXML=function(node){ -if(node.innerXML){ -return node.innerXML; -}else{ -if(node.xml){ -return node.xml; -}else{ -if(typeof XMLSerializer!="undefined"){ -return (new XMLSerializer()).serializeToString(node); -} -} -} -}; -dojo.dom.createDocument=function(){ -var doc=null; -var _231=dojo.doc(); -if(!dj_undef("ActiveXObject")){ -var _232=["MSXML2","Microsoft","MSXML","MSXML3"]; -for(var i=0;i<_232.length;i++){ -try{ -doc=new ActiveXObject(_232[i]+".XMLDOM"); -} -catch(e){ -} -if(doc){ -break; -} -} -}else{ -if((_231.implementation)&&(_231.implementation.createDocument)){ -doc=_231.implementation.createDocument("","",null); -} -} -return doc; -}; -dojo.dom.createDocumentFromText=function(str,_235){ -if(!_235){ -_235="text/xml"; -} -if(!dj_undef("DOMParser")){ -var _236=new DOMParser(); -return _236.parseFromString(str,_235); -}else{ -if(!dj_undef("ActiveXObject")){ -var _237=dojo.dom.createDocument(); -if(_237){ -_237.async=false; -_237.loadXML(str); -return _237; -}else{ -dojo.debug("toXml didn't work?"); -} -}else{ -var _238=dojo.doc(); -if(_238.createElement){ -var tmp=_238.createElement("xml"); -tmp.innerHTML=str; -if(_238.implementation&&_238.implementation.createDocument){ -var _23a=_238.implementation.createDocument("foo","",null); -for(var i=0;i1){ -var _24f=dojo.doc(); -dojo.dom.replaceChildren(node,_24f.createTextNode(text)); -return text; -}else{ -if(node.textContent!=undefined){ -return node.textContent; -} -var _250=""; -if(node==null){ -return _250; -} -for(var i=0;i"); -} -} -catch(e){ -} -if(dojo.render.html.opera){ -dojo.debug("Opera is not supported with dojo.undo.browser, so back/forward detection will not work."); -} -dojo.undo.browser={initialHref:(!dj_undef("window"))?window.location.href:"",initialHash:(!dj_undef("window"))?window.location.hash:"",moveForward:false,historyStack:[],forwardStack:[],historyIframe:null,bookmarkAnchor:null,locationTimer:null,setInitialState:function(args){ -this.initialState=this._createState(this.initialHref,args,this.initialHash); -},addToHistory:function(args){ -this.forwardStack=[]; -var hash=null; -var url=null; -if(!this.historyIframe){ -if(djConfig["useXDomain"]&&!djConfig["dojoIframeHistoryUrl"]){ -dojo.debug("dojo.undo.browser: When using cross-domain Dojo builds,"+" please save iframe_history.html to your domain and set djConfig.dojoIframeHistoryUrl"+" to the path on your domain to iframe_history.html"); -} -this.historyIframe=window.frames["djhistory"]; -} -if(!this.bookmarkAnchor){ -this.bookmarkAnchor=document.createElement("a"); -dojo.body().appendChild(this.bookmarkAnchor); -this.bookmarkAnchor.style.display="none"; -} -if(args["changeUrl"]){ -hash="#"+((args["changeUrl"]!==true)?args["changeUrl"]:(new Date()).getTime()); -if(this.historyStack.length==0&&this.initialState.urlHash==hash){ -this.initialState=this._createState(url,args,hash); -return; -}else{ -if(this.historyStack.length>0&&this.historyStack[this.historyStack.length-1].urlHash==hash){ -this.historyStack[this.historyStack.length-1]=this._createState(url,args,hash); -return; -} -} -this.changingUrl=true; -setTimeout("window.location.href = '"+hash+"'; dojo.undo.browser.changingUrl = false;",1); -this.bookmarkAnchor.href=hash; -if(dojo.render.html.ie){ -url=this._loadIframeHistory(); -var _25f=args["back"]||args["backButton"]||args["handle"]; -var tcb=function(_261){ -if(window.location.hash!=""){ -setTimeout("window.location.href = '"+hash+"';",1); -} -_25f.apply(this,[_261]); -}; -if(args["back"]){ -args.back=tcb; -}else{ -if(args["backButton"]){ -args.backButton=tcb; -}else{ -if(args["handle"]){ -args.handle=tcb; -} -} -} -var _262=args["forward"]||args["forwardButton"]||args["handle"]; -var tfw=function(_264){ -if(window.location.hash!=""){ -window.location.href=hash; -} -if(_262){ -_262.apply(this,[_264]); -} -}; -if(args["forward"]){ -args.forward=tfw; -}else{ -if(args["forwardButton"]){ -args.forwardButton=tfw; -}else{ -if(args["handle"]){ -args.handle=tfw; -} -} -} -}else{ -if(dojo.render.html.moz){ -if(!this.locationTimer){ -this.locationTimer=setInterval("dojo.undo.browser.checkLocation();",200); -} -} -} -}else{ -url=this._loadIframeHistory(); -} -this.historyStack.push(this._createState(url,args,hash)); -},checkLocation:function(){ -if(!this.changingUrl){ -var hsl=this.historyStack.length; -if((window.location.hash==this.initialHash||window.location.href==this.initialHref)&&(hsl==1)){ -this.handleBackButton(); -return; -} -if(this.forwardStack.length>0){ -if(this.forwardStack[this.forwardStack.length-1].urlHash==window.location.hash){ -this.handleForwardButton(); -return; -} -} -if((hsl>=2)&&(this.historyStack[hsl-2])){ -if(this.historyStack[hsl-2].urlHash==window.location.hash){ -this.handleBackButton(); -return; -} -} -} -},iframeLoaded:function(evt,_267){ -if(!dojo.render.html.opera){ -var _268=this._getUrlQuery(_267.href); -if(_268==null){ -if(this.historyStack.length==1){ -this.handleBackButton(); -} -return; -} -if(this.moveForward){ -this.moveForward=false; -return; -} -if(this.historyStack.length>=2&&_268==this._getUrlQuery(this.historyStack[this.historyStack.length-2].url)){ -this.handleBackButton(); -}else{ -if(this.forwardStack.length>0&&_268==this._getUrlQuery(this.forwardStack[this.forwardStack.length-1].url)){ -this.handleForwardButton(); -} -} -} -},handleBackButton:function(){ -var _269=this.historyStack.pop(); -if(!_269){ -return; -} -var last=this.historyStack[this.historyStack.length-1]; -if(!last&&this.historyStack.length==0){ -last=this.initialState; -} -if(last){ -if(last.kwArgs["back"]){ -last.kwArgs["back"](); -}else{ -if(last.kwArgs["backButton"]){ -last.kwArgs["backButton"](); -}else{ -if(last.kwArgs["handle"]){ -last.kwArgs.handle("back"); -} -} -} -} -this.forwardStack.push(_269); -},handleForwardButton:function(){ -var last=this.forwardStack.pop(); -if(!last){ -return; -} -if(last.kwArgs["forward"]){ -last.kwArgs.forward(); -}else{ -if(last.kwArgs["forwardButton"]){ -last.kwArgs.forwardButton(); -}else{ -if(last.kwArgs["handle"]){ -last.kwArgs.handle("forward"); -} -} -} -this.historyStack.push(last); -},_createState:function(url,args,hash){ -return {"url":url,"kwArgs":args,"urlHash":hash}; -},_getUrlQuery:function(url){ -var _270=url.split("?"); -if(_270.length<2){ -return null; -}else{ -return _270[1]; -} -},_loadIframeHistory:function(){ -var url=(djConfig["dojoIframeHistoryUrl"]||dojo.hostenv.getBaseScriptUri()+"iframe_history.html")+"?"+(new Date()).getTime(); -this.moveForward=true; -dojo.io.setIFrameSrc(this.historyIframe,url,false); -return url; -}}; -dojo.provide("dojo.io.BrowserIO"); -if(!dj_undef("window")){ -dojo.io.checkChildrenForFile=function(node){ -var _273=false; -var _274=node.getElementsByTagName("input"); -dojo.lang.forEach(_274,function(_275){ -if(_273){ -return; -} -if(_275.getAttribute("type")=="file"){ -_273=true; -} -}); -return _273; -}; -dojo.io.formHasFile=function(_276){ -return dojo.io.checkChildrenForFile(_276); -}; -dojo.io.updateNode=function(node,_278){ -node=dojo.byId(node); -var args=_278; -if(dojo.lang.isString(_278)){ -args={url:_278}; -} -args.mimetype="text/html"; -args.load=function(t,d,e){ -while(node.firstChild){ -dojo.dom.destroyNode(node.firstChild); -} -node.innerHTML=d; -}; -dojo.io.bind(args); -}; -dojo.io.formFilter=function(node){ -var type=(node.type||"").toLowerCase(); -return !node.disabled&&node.name&&!dojo.lang.inArray(["file","submit","image","reset","button"],type); -}; -dojo.io.encodeForm=function(_27f,_280,_281){ -if((!_27f)||(!_27f.tagName)||(!_27f.tagName.toLowerCase()=="form")){ -dojo.raise("Attempted to encode a non-form element."); -} -if(!_281){ -_281=dojo.io.formFilter; -} -var enc=/utf/i.test(_280||"")?encodeURIComponent:dojo.string.encodeAscii; -var _283=[]; -for(var i=0;i<_27f.elements.length;i++){ -var elm=_27f.elements[i]; -if(!elm||elm.tagName.toLowerCase()=="fieldset"||!_281(elm)){ -continue; -} -var name=enc(elm.name); -var type=elm.type.toLowerCase(); -if(type=="select-multiple"){ -for(var j=0;j=200)&&(http.status<300))||(http.status==304)||(http.status==1223)||(location.protocol=="file:"&&(http.status==0||http.status==undefined))||(location.protocol=="chrome:"&&(http.status==0||http.status==undefined))){ -var ret; -if(_2aa.method.toLowerCase()=="head"){ -var _2b0=http.getAllResponseHeaders(); -ret={}; -ret.toString=function(){ -return _2b0; -}; -var _2b1=_2b0.split(/[\r\n]+/g); -for(var i=0;i<_2b1.length;i++){ -var pair=_2b1[i].match(/^([^:]+)\s*:\s*(.+)$/i); -if(pair){ -ret[pair[1]]=pair[2]; -} -} -}else{ -if(_2aa.mimetype=="text/javascript"){ -try{ -ret=dj_eval(http.responseText); -} -catch(e){ -dojo.debug(e); -dojo.debug(http.responseText); -ret=null; -} -}else{ -if(_2aa.mimetype.substr(0,9)=="text/json"||_2aa.mimetype.substr(0,16)=="application/json"){ -try{ -ret=dj_eval("("+_2aa.jsonFilter(http.responseText)+")"); -} -catch(e){ -dojo.debug(e); -dojo.debug(http.responseText); -ret=false; -} -}else{ -if((_2aa.mimetype=="application/xml")||(_2aa.mimetype=="text/xml")){ -ret=http.responseXML; -if(!ret||typeof ret=="string"||!http.getResponseHeader("Content-Type")){ -ret=dojo.dom.createDocumentFromText(http.responseText); -} -}else{ -ret=http.responseText; -} -} -} -} -if(_2ae){ -addToCache(url,_2ad,_2aa.method,http); -} -_2aa[(typeof _2aa.load=="function")?"load":"handle"]("load",ret,http,_2aa); -}else{ -var _2b4=new dojo.io.Error("XMLHttpTransport Error: "+http.status+" "+http.statusText); -_2aa[(typeof _2aa.error=="function")?"error":"handle"]("error",_2b4,http,_2aa); -} -} -function setHeaders(http,_2b6){ -if(_2b6["headers"]){ -for(var _2b7 in _2b6["headers"]){ -if(_2b7.toLowerCase()=="content-type"&&!_2b6["contentType"]){ -_2b6["contentType"]=_2b6["headers"][_2b7]; -}else{ -http.setRequestHeader(_2b7,_2b6["headers"][_2b7]); -} -} -} -} -this.inFlight=[]; -this.inFlightTimer=null; -this.startWatchingInFlight=function(){ -if(!this.inFlightTimer){ -this.inFlightTimer=setTimeout("dojo.io.XMLHTTPTransport.watchInFlight();",10); -} -}; -this.watchInFlight=function(){ -var now=null; -if(!dojo.hostenv._blockAsync&&!_29e._blockAsync){ -for(var x=this.inFlight.length-1;x>=0;x--){ -try{ -var tif=this.inFlight[x]; -if(!tif||tif.http._aborted||!tif.http.readyState){ -this.inFlight.splice(x,1); -continue; -} -if(4==tif.http.readyState){ -this.inFlight.splice(x,1); -doLoad(tif.req,tif.http,tif.url,tif.query,tif.useCache); -}else{ -if(tif.startTime){ -if(!now){ -now=(new Date()).getTime(); -} -if(tif.startTime+(tif.req.timeoutSeconds*1000)-1){ -dojo.debug("Warning: dojo.io.bind: stripping hash values from url:",url); -url=url.split("#")[0]; -} -if(_2bf["file"]){ -_2bf.method="post"; -} -if(!_2bf["method"]){ -_2bf.method="get"; -} -if(_2bf.method.toLowerCase()=="get"){ -_2bf.multipart=false; -}else{ -if(_2bf["file"]){ -_2bf.multipart=true; -}else{ -if(!_2bf["multipart"]){ -_2bf.multipart=false; -} -} -} -if(_2bf["backButton"]||_2bf["back"]||_2bf["changeUrl"]){ -dojo.undo.browser.addToHistory(_2bf); -} -var _2c4=_2bf["content"]||{}; -if(_2bf.sendTransport){ -_2c4["dojo.transport"]="xmlhttp"; -} -do{ -if(_2bf.postContent){ -_2c1=_2bf.postContent; -break; -} -if(_2c4){ -_2c1+=dojo.io.argsFromMap(_2c4,_2bf.encoding); -} -if(_2bf.method.toLowerCase()=="get"||!_2bf.multipart){ -break; -} -var t=[]; -if(_2c1.length){ -var q=_2c1.split("&"); -for(var i=0;i-1?"&":"?")+_2c1; -} -if(_2cb){ -_2d1+=(dojo.string.endsWithAny(_2d1,"?","&")?"":(_2d1.indexOf("?")>-1?"&":"?"))+"dojo.preventCache="+new Date().valueOf(); -} -if(!_2bf.user){ -http.open(_2bf.method.toUpperCase(),_2d1,_2ca); -}else{ -http.open(_2bf.method.toUpperCase(),_2d1,_2ca,_2bf.user,_2bf.password); -} -setHeaders(http,_2bf); -try{ -http.send(null); -} -catch(e){ -if(typeof http.abort=="function"){ -http.abort(); -} -doLoad(_2bf,{status:404},url,_2c1,_2cc); -} -} -if(!_2ca){ -doLoad(_2bf,http,url,_2c1,_2cc); -_29e._blockAsync=false; -} -_2bf.abort=function(){ -try{ -http._aborted=true; -} -catch(e){ -} -return http.abort(); -}; -return; -}; -dojo.io.transports.addTransport("XMLHTTPTransport"); -}; -} -dojo.provide("dojo.io.cookie"); -dojo.io.cookie.setCookie=function(name,_2d3,days,path,_2d6,_2d7){ -var _2d8=-1; -if((typeof days=="number")&&(days>=0)){ -var d=new Date(); -d.setTime(d.getTime()+(days*24*60*60*1000)); -_2d8=d.toGMTString(); -} -_2d3=escape(_2d3); -document.cookie=name+"="+_2d3+";"+(_2d8!=-1?" expires="+_2d8+";":"")+(path?"path="+path:"")+(_2d6?"; domain="+_2d6:"")+(_2d7?"; secure":""); -}; -dojo.io.cookie.set=dojo.io.cookie.setCookie; -dojo.io.cookie.getCookie=function(name){ -var idx=document.cookie.lastIndexOf(name+"="); -if(idx==-1){ -return null; -} -var _2dc=document.cookie.substring(idx+name.length+1); -var end=_2dc.indexOf(";"); -if(end==-1){ -end=_2dc.length; -} -_2dc=_2dc.substring(0,end); -_2dc=unescape(_2dc); -return _2dc; -}; -dojo.io.cookie.get=dojo.io.cookie.getCookie; -dojo.io.cookie.deleteCookie=function(name){ -dojo.io.cookie.setCookie(name,"-",0); -}; -dojo.io.cookie.setObjectCookie=function(name,obj,days,path,_2e3,_2e4,_2e5){ -if(arguments.length==5){ -_2e5=_2e3; -_2e3=null; -_2e4=null; -} -var _2e6=[],_2e7,_2e8=""; -if(!_2e5){ -_2e7=dojo.io.cookie.getObjectCookie(name); -} -if(days>=0){ -if(!_2e7){ -_2e7={}; -} -for(var prop in obj){ -if(obj[prop]==null){ -delete _2e7[prop]; -}else{ -if((typeof obj[prop]=="string")||(typeof obj[prop]=="number")){ -_2e7[prop]=obj[prop]; -} -} -} -prop=null; -for(var prop in _2e7){ -_2e6.push(escape(prop)+"="+escape(_2e7[prop])); -} -_2e8=_2e6.join("&"); -} -dojo.io.cookie.setCookie(name,_2e8,days,path,_2e3,_2e4); -}; -dojo.io.cookie.getObjectCookie=function(name){ -var _2eb=null,_2ec=dojo.io.cookie.getCookie(name); -if(_2ec){ -_2eb={}; -var _2ed=_2ec.split("&"); -for(var i=0;i<_2ed.length;i++){ -var pair=_2ed[i].split("="); -var _2f0=pair[1]; -if(isNaN(_2f0)){ -_2f0=unescape(pair[1]); -} -_2eb[unescape(pair[0])]=_2f0; -} -} -return _2eb; -}; -dojo.io.cookie.isSupported=function(){ -if(typeof navigator.cookieEnabled!="boolean"){ -dojo.io.cookie.setCookie("__TestingYourBrowserForCookieSupport__","CookiesAllowed",90,null); -var _2f1=dojo.io.cookie.getCookie("__TestingYourBrowserForCookieSupport__"); -navigator.cookieEnabled=(_2f1=="CookiesAllowed"); -if(navigator.cookieEnabled){ -this.deleteCookie("__TestingYourBrowserForCookieSupport__"); -} -} -return navigator.cookieEnabled; -}; -if(!dojo.io.cookies){ -dojo.io.cookies=dojo.io.cookie; -} -dojo.kwCompoundRequire({common:["dojo.io.common"],rhino:["dojo.io.RhinoIO"],browser:["dojo.io.BrowserIO","dojo.io.cookie"],dashboard:["dojo.io.BrowserIO","dojo.io.cookie"]}); -dojo.provide("dojo.io.*"); -dojo.provide("dojo.event.common"); -dojo.event=new function(){ -this._canTimeout=dojo.lang.isFunction(dj_global["setTimeout"])||dojo.lang.isAlien(dj_global["setTimeout"]); -function interpolateArgs(args,_2f3){ -var dl=dojo.lang; -var ao={srcObj:dj_global,srcFunc:null,adviceObj:dj_global,adviceFunc:null,aroundObj:null,aroundFunc:null,adviceType:(args.length>2)?args[0]:"after",precedence:"last",once:false,delay:null,rate:0,adviceMsg:false,maxCalls:-1}; -switch(args.length){ -case 0: -return; -case 1: -return; -case 2: -ao.srcFunc=args[0]; -ao.adviceFunc=args[1]; -break; -case 3: -if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isString(args[2]))){ -ao.adviceType="after"; -ao.srcObj=args[0]; -ao.srcFunc=args[1]; -ao.adviceFunc=args[2]; -}else{ -if((dl.isString(args[1]))&&(dl.isString(args[2]))){ -ao.srcFunc=args[1]; -ao.adviceFunc=args[2]; -}else{ -if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isFunction(args[2]))){ -ao.adviceType="after"; -ao.srcObj=args[0]; -ao.srcFunc=args[1]; -var _2f6=dl.nameAnonFunc(args[2],ao.adviceObj,_2f3); -ao.adviceFunc=_2f6; -}else{ -if((dl.isFunction(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))){ -ao.adviceType="after"; -ao.srcObj=dj_global; -var _2f6=dl.nameAnonFunc(args[0],ao.srcObj,_2f3); -ao.srcFunc=_2f6; -ao.adviceObj=args[1]; -ao.adviceFunc=args[2]; -} -} -} -} -break; -case 4: -if((dl.isObject(args[0]))&&(dl.isObject(args[2]))){ -ao.adviceType="after"; -ao.srcObj=args[0]; -ao.srcFunc=args[1]; -ao.adviceObj=args[2]; -ao.adviceFunc=args[3]; -}else{ -if((dl.isString(args[0]))&&(dl.isString(args[1]))&&(dl.isObject(args[2]))){ -ao.adviceType=args[0]; -ao.srcObj=dj_global; -ao.srcFunc=args[1]; -ao.adviceObj=args[2]; -ao.adviceFunc=args[3]; -}else{ -if((dl.isString(args[0]))&&(dl.isFunction(args[1]))&&(dl.isObject(args[2]))){ -ao.adviceType=args[0]; -ao.srcObj=dj_global; -var _2f6=dl.nameAnonFunc(args[1],dj_global,_2f3); -ao.srcFunc=_2f6; -ao.adviceObj=args[2]; -ao.adviceFunc=args[3]; -}else{ -if((dl.isString(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))&&(dl.isFunction(args[3]))){ -ao.srcObj=args[1]; -ao.srcFunc=args[2]; -var _2f6=dl.nameAnonFunc(args[3],dj_global,_2f3); -ao.adviceObj=dj_global; -ao.adviceFunc=_2f6; -}else{ -if(dl.isObject(args[1])){ -ao.srcObj=args[1]; -ao.srcFunc=args[2]; -ao.adviceObj=dj_global; -ao.adviceFunc=args[3]; -}else{ -if(dl.isObject(args[2])){ -ao.srcObj=dj_global; -ao.srcFunc=args[1]; -ao.adviceObj=args[2]; -ao.adviceFunc=args[3]; -}else{ -ao.srcObj=ao.adviceObj=ao.aroundObj=dj_global; -ao.srcFunc=args[1]; -ao.adviceFunc=args[2]; -ao.aroundFunc=args[3]; -} -} -} -} -} -} -break; -case 6: -ao.srcObj=args[1]; -ao.srcFunc=args[2]; -ao.adviceObj=args[3]; -ao.adviceFunc=args[4]; -ao.aroundFunc=args[5]; -ao.aroundObj=dj_global; -break; -default: -ao.srcObj=args[1]; -ao.srcFunc=args[2]; -ao.adviceObj=args[3]; -ao.adviceFunc=args[4]; -ao.aroundObj=args[5]; -ao.aroundFunc=args[6]; -ao.once=args[7]; -ao.delay=args[8]; -ao.rate=args[9]; -ao.adviceMsg=args[10]; -ao.maxCalls=(!isNaN(parseInt(args[11])))?args[11]:-1; -break; -} -if(dl.isFunction(ao.aroundFunc)){ -var _2f6=dl.nameAnonFunc(ao.aroundFunc,ao.aroundObj,_2f3); -ao.aroundFunc=_2f6; -} -if(dl.isFunction(ao.srcFunc)){ -ao.srcFunc=dl.getNameInObj(ao.srcObj,ao.srcFunc); -} -if(dl.isFunction(ao.adviceFunc)){ -ao.adviceFunc=dl.getNameInObj(ao.adviceObj,ao.adviceFunc); -} -if((ao.aroundObj)&&(dl.isFunction(ao.aroundFunc))){ -ao.aroundFunc=dl.getNameInObj(ao.aroundObj,ao.aroundFunc); -} -if(!ao.srcObj){ -dojo.raise("bad srcObj for srcFunc: "+ao.srcFunc); -} -if(!ao.adviceObj){ -dojo.raise("bad adviceObj for adviceFunc: "+ao.adviceFunc); -} -if(!ao.adviceFunc){ -dojo.debug("bad adviceFunc for srcFunc: "+ao.srcFunc); -dojo.debugShallow(ao); -} -return ao; -} -this.connect=function(){ -if(arguments.length==1){ -var ao=arguments[0]; -}else{ -var ao=interpolateArgs(arguments,true); -} -if(dojo.lang.isString(ao.srcFunc)&&(ao.srcFunc.toLowerCase()=="onkey")){ -if(dojo.render.html.ie){ -ao.srcFunc="onkeydown"; -this.connect(ao); -} -ao.srcFunc="onkeypress"; -} -if(dojo.lang.isArray(ao.srcObj)&&ao.srcObj!=""){ -var _2f8={}; -for(var x in ao){ -_2f8[x]=ao[x]; -} -var mjps=[]; -dojo.lang.forEach(ao.srcObj,function(src){ -if((dojo.render.html.capable)&&(dojo.lang.isString(src))){ -src=dojo.byId(src); -} -_2f8.srcObj=src; -mjps.push(dojo.event.connect.call(dojo.event,_2f8)); -}); -return mjps; -} -var mjp=dojo.event.MethodJoinPoint.getForMethod(ao.srcObj,ao.srcFunc); -if(ao.adviceFunc){ -var mjp2=dojo.event.MethodJoinPoint.getForMethod(ao.adviceObj,ao.adviceFunc); -} -mjp.kwAddAdvice(ao); -return mjp; -}; -this.log=function(a1,a2){ -var _300; -if((arguments.length==1)&&(typeof a1=="object")){ -_300=a1; -}else{ -_300={srcObj:a1,srcFunc:a2}; -} -_300.adviceFunc=function(){ -var _301=[]; -for(var x=0;x=this.jp_.around.length){ -return this.jp_.object[this.jp_.methodname].apply(this.jp_.object,this.args); -}else{ -var ti=this.jp_.around[this.around_index]; -var mobj=ti[0]||dj_global; -var meth=ti[1]; -return mobj[meth].call(mobj,this); -} -}; -dojo.event.MethodJoinPoint=function(obj,_319){ -this.object=obj||dj_global; -this.methodname=_319; -this.methodfunc=this.object[_319]; -this.squelch=false; -}; -dojo.event.MethodJoinPoint.getForMethod=function(obj,_31b){ -if(!obj){ -obj=dj_global; -} -var ofn=obj[_31b]; -if(!ofn){ -ofn=obj[_31b]=function(){ -}; -if(!obj[_31b]){ -dojo.raise("Cannot set do-nothing method on that object "+_31b); -} -}else{ -if((typeof ofn!="function")&&(!dojo.lang.isFunction(ofn))&&(!dojo.lang.isAlien(ofn))){ -return null; -} -} -var _31d=_31b+"$joinpoint"; -var _31e=_31b+"$joinpoint$method"; -var _31f=obj[_31d]; -if(!_31f){ -var _320=false; -if(dojo.event["browser"]){ -if((obj["attachEvent"])||(obj["nodeType"])||(obj["addEventListener"])){ -_320=true; -dojo.event.browser.addClobberNodeAttrs(obj,[_31d,_31e,_31b]); -} -} -var _321=ofn.length; -obj[_31e]=ofn; -_31f=obj[_31d]=new dojo.event.MethodJoinPoint(obj,_31e); -if(!_320){ -obj[_31b]=function(){ -return _31f.run.apply(_31f,arguments); -}; -}else{ -obj[_31b]=function(){ -var args=[]; -if(!arguments.length){ -var evt=null; -try{ -if(obj.ownerDocument){ -evt=obj.ownerDocument.parentWindow.event; -}else{ -if(obj.documentElement){ -evt=obj.documentElement.ownerDocument.parentWindow.event; -}else{ -if(obj.event){ -evt=obj.event; -}else{ -evt=window.event; -} -} -} -} -catch(e){ -evt=window.event; -} -if(evt){ -args.push(dojo.event.browser.fixEvent(evt,this)); -} -}else{ -for(var x=0;x-1){ -if(_330==0){ -return; -} -marr[7]--; -} -var _331; -var to={args:[],jp_:this,object:obj,proceed:function(){ -return _32b[_32c].apply(_32b,to.args); -}}; -to.args=_327; -var _333=parseInt(marr[4]); -var _334=((!isNaN(_333))&&(marr[4]!==null)&&(typeof marr[4]!="undefined")); -if(marr[5]){ -var rate=parseInt(marr[5]); -var cur=new Date(); -var _337=false; -if((marr["last"])&&((cur-marr.last)<=rate)){ -if(dojo.event._canTimeout){ -if(marr["delayTimer"]){ -clearTimeout(marr.delayTimer); -} -var tod=parseInt(rate*2); -var mcpy=dojo.lang.shallowCopy(marr); -marr.delayTimer=setTimeout(function(){ -mcpy[5]=0; -_329(mcpy); -},tod); -} -return; -}else{ -marr.last=cur; -} -} -if(_32e){ -_32d[_32e].call(_32d,to); -}else{ -if((_334)&&((dojo.render.html)||(dojo.render.svg))){ -dj_global["setTimeout"](function(){ -if(msg){ -_32b[_32c].call(_32b,to); -}else{ -_32b[_32c].apply(_32b,args); -} -},_333); -}else{ -if(msg){ -_32b[_32c].call(_32b,to); -}else{ -_32b[_32c].apply(_32b,args); -} -} -} -}; -var _33a=function(){ -if(this.squelch){ -try{ -return _329.apply(this,arguments); -} -catch(e){ -dojo.debug(e); -} -}else{ -return _329.apply(this,arguments); -} -}; -if((this["before"])&&(this.before.length>0)){ -dojo.lang.forEach(this.before.concat(new Array()),_33a); -} -var _33b; -try{ -if((this["around"])&&(this.around.length>0)){ -var mi=new dojo.event.MethodInvocation(this,obj,args); -_33b=mi.proceed(); -}else{ -if(this.methodfunc){ -_33b=this.object[this.methodname].apply(this.object,args); -} -} -} -catch(e){ -if(!this.squelch){ -dojo.debug(e,"when calling",this.methodname,"on",this.object,"with arguments",args); -dojo.raise(e); -} -} -if((this["after"])&&(this.after.length>0)){ -dojo.lang.forEach(this.after.concat(new Array()),_33a); -} -return (this.methodfunc)?_33b:null; -},getArr:function(kind){ -var type="after"; -if((typeof kind=="string")&&(kind.indexOf("before")!=-1)){ -type="before"; -}else{ -if(kind=="around"){ -type="around"; -} -} -if(!this[type]){ -this[type]=[]; -} -return this[type]; -},kwAddAdvice:function(args){ -this.addAdvice(args["adviceObj"],args["adviceFunc"],args["aroundObj"],args["aroundFunc"],args["adviceType"],args["precedence"],args["once"],args["delay"],args["rate"],args["adviceMsg"],args["maxCalls"]); -},addAdvice:function(_340,_341,_342,_343,_344,_345,once,_347,rate,_349,_34a){ -var arr=this.getArr(_344); -if(!arr){ -dojo.raise("bad this: "+this); -} -var ao=[_340,_341,_342,_343,_347,rate,_349,_34a]; -if(once){ -if(this.hasAdvice(_340,_341,_344,arr)>=0){ -return; -} -} -if(_345=="first"){ -arr.unshift(ao); -}else{ -arr.push(ao); -} -},hasAdvice:function(_34d,_34e,_34f,arr){ -if(!arr){ -arr=this.getArr(_34f); -} -var ind=-1; -for(var x=0;x=0;i=i-1){ -var el=na[i]; -try{ -if(el&&el["__clobberAttrs__"]){ -for(var j=0;j=65&&_3a1<=90&&evt.shiftKey==false){ -_3a1+=32; -} -if(_3a1>=1&&_3a1<=26&&evt.ctrlKey){ -_3a1+=96; -} -evt.key=String.fromCharCode(_3a1); -} -} -}else{ -if(evt["type"]=="keypress"){ -if(dojo.render.html.opera){ -if(evt.which==0){ -evt.key=evt.keyCode; -}else{ -if(evt.which>0){ -switch(evt.which){ -case evt.KEY_SHIFT: -case evt.KEY_CTRL: -case evt.KEY_ALT: -case evt.KEY_CAPS_LOCK: -case evt.KEY_NUM_LOCK: -case evt.KEY_SCROLL_LOCK: -break; -case evt.KEY_PAUSE: -case evt.KEY_TAB: -case evt.KEY_BACKSPACE: -case evt.KEY_ENTER: -case evt.KEY_ESCAPE: -evt.key=evt.which; -break; -default: -var _3a1=evt.which; -if((evt.ctrlKey||evt.altKey||evt.metaKey)&&(evt.which>=65&&evt.which<=90&&evt.shiftKey==false)){ -_3a1+=32; -} -evt.key=String.fromCharCode(_3a1); -} -} -} -}else{ -if(dojo.render.html.ie){ -if(!evt.ctrlKey&&!evt.altKey&&evt.keyCode>=evt.KEY_SPACE){ -evt.key=String.fromCharCode(evt.keyCode); -} -}else{ -if(dojo.render.html.safari){ -switch(evt.keyCode){ -case 25: -evt.key=evt.KEY_TAB; -evt.shift=true; -break; -case 63232: -evt.key=evt.KEY_UP_ARROW; -break; -case 63233: -evt.key=evt.KEY_DOWN_ARROW; -break; -case 63234: -evt.key=evt.KEY_LEFT_ARROW; -break; -case 63235: -evt.key=evt.KEY_RIGHT_ARROW; -break; -case 63236: -evt.key=evt.KEY_F1; -break; -case 63237: -evt.key=evt.KEY_F2; -break; -case 63238: -evt.key=evt.KEY_F3; -break; -case 63239: -evt.key=evt.KEY_F4; -break; -case 63240: -evt.key=evt.KEY_F5; -break; -case 63241: -evt.key=evt.KEY_F6; -break; -case 63242: -evt.key=evt.KEY_F7; -break; -case 63243: -evt.key=evt.KEY_F8; -break; -case 63244: -evt.key=evt.KEY_F9; -break; -case 63245: -evt.key=evt.KEY_F10; -break; -case 63246: -evt.key=evt.KEY_F11; -break; -case 63247: -evt.key=evt.KEY_F12; -break; -case 63250: -evt.key=evt.KEY_PAUSE; -break; -case 63272: -evt.key=evt.KEY_DELETE; -break; -case 63273: -evt.key=evt.KEY_HOME; -break; -case 63275: -evt.key=evt.KEY_END; -break; -case 63276: -evt.key=evt.KEY_PAGE_UP; -break; -case 63277: -evt.key=evt.KEY_PAGE_DOWN; -break; -case 63302: -evt.key=evt.KEY_INSERT; -break; -case 63248: -case 63249: -case 63289: -break; -default: -evt.key=evt.charCode>=evt.KEY_SPACE?String.fromCharCode(evt.charCode):evt.keyCode; -} -}else{ -evt.key=evt.charCode>0?String.fromCharCode(evt.charCode):evt.keyCode; -} -} -} -} -} -} -if(dojo.render.html.ie){ -if(!evt.target){ -evt.target=evt.srcElement; -} -if(!evt.currentTarget){ -evt.currentTarget=(_39f?_39f:evt.srcElement); -} -if(!evt.layerX){ -evt.layerX=evt.offsetX; -} -if(!evt.layerY){ -evt.layerY=evt.offsetY; -} -var doc=(evt.srcElement&&evt.srcElement.ownerDocument)?evt.srcElement.ownerDocument:document; -var _3a3=((dojo.render.html.ie55)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement; -if(!evt.pageX){ -evt.pageX=evt.clientX+(_3a3.scrollLeft||0); -} -if(!evt.pageY){ -evt.pageY=evt.clientY+(_3a3.scrollTop||0); -} -if(evt.type=="mouseover"){ -evt.relatedTarget=evt.fromElement; -} -if(evt.type=="mouseout"){ -evt.relatedTarget=evt.toElement; -} -this.currentEvent=evt; -evt.callListener=this.callListener; -evt.stopPropagation=this._stopPropagation; -evt.preventDefault=this._preventDefault; -} -return evt; -}; -this.stopEvent=function(evt){ -if(window.event){ -evt.cancelBubble=true; -evt.returnValue=false; -}else{ -evt.preventDefault(); -evt.stopPropagation(); -} -}; -}; -dojo.kwCompoundRequire({common:["dojo.event.common","dojo.event.topic"],browser:["dojo.event.browser"],dashboard:["dojo.event.browser"]}); -dojo.provide("dojo.event.*"); -dojo.provide("dojo.gfx.color"); -dojo.gfx.color.Color=function(r,g,b,a){ -if(dojo.lang.isArray(r)){ -this.r=r[0]; -this.g=r[1]; -this.b=r[2]; -this.a=r[3]||1; -}else{ -if(dojo.lang.isString(r)){ -var rgb=dojo.gfx.color.extractRGB(r); -this.r=rgb[0]; -this.g=rgb[1]; -this.b=rgb[2]; -this.a=g||1; -}else{ -if(r instanceof dojo.gfx.color.Color){ -this.r=r.r; -this.b=r.b; -this.g=r.g; -this.a=r.a; -}else{ -this.r=r; -this.g=g; -this.b=b; -this.a=a; -} -} -} -}; -dojo.gfx.color.Color.fromArray=function(arr){ -return new dojo.gfx.color.Color(arr[0],arr[1],arr[2],arr[3]); -}; -dojo.extend(dojo.gfx.color.Color,{toRgb:function(_3ab){ -if(_3ab){ -return this.toRgba(); -}else{ -return [this.r,this.g,this.b]; -} -},toRgba:function(){ -return [this.r,this.g,this.b,this.a]; -},toHex:function(){ -return dojo.gfx.color.rgb2hex(this.toRgb()); -},toCss:function(){ -return "rgb("+this.toRgb().join()+")"; -},toString:function(){ -return this.toHex(); -},blend:function(_3ac,_3ad){ -var rgb=null; -if(dojo.lang.isArray(_3ac)){ -rgb=_3ac; -}else{ -if(_3ac instanceof dojo.gfx.color.Color){ -rgb=_3ac.toRgb(); -}else{ -rgb=new dojo.gfx.color.Color(_3ac).toRgb(); -} -} -return dojo.gfx.color.blend(this.toRgb(),rgb,_3ad); -}}); -dojo.gfx.color.named={white:[255,255,255],black:[0,0,0],red:[255,0,0],green:[0,255,0],lime:[0,255,0],blue:[0,0,255],navy:[0,0,128],gray:[128,128,128],silver:[192,192,192]}; -dojo.gfx.color.blend=function(a,b,_3b1){ -if(typeof a=="string"){ -return dojo.gfx.color.blendHex(a,b,_3b1); -} -if(!_3b1){ -_3b1=0; -} -_3b1=Math.min(Math.max(-1,_3b1),1); -_3b1=((_3b1+1)/2); -var c=[]; -for(var x=0;x<3;x++){ -c[x]=parseInt(b[x]+((a[x]-b[x])*_3b1)); -} -return c; -}; -dojo.gfx.color.blendHex=function(a,b,_3b6){ -return dojo.gfx.color.rgb2hex(dojo.gfx.color.blend(dojo.gfx.color.hex2rgb(a),dojo.gfx.color.hex2rgb(b),_3b6)); -}; -dojo.gfx.color.extractRGB=function(_3b7){ -var hex="0123456789abcdef"; -_3b7=_3b7.toLowerCase(); -if(_3b7.indexOf("rgb")==0){ -var _3b9=_3b7.match(/rgba*\((\d+), *(\d+), *(\d+)/i); -var ret=_3b9.splice(1,3); -return ret; -}else{ -var _3bb=dojo.gfx.color.hex2rgb(_3b7); -if(_3bb){ -return _3bb; -}else{ -return dojo.gfx.color.named[_3b7]||[255,255,255]; -} -} -}; -dojo.gfx.color.hex2rgb=function(hex){ -var _3bd="0123456789ABCDEF"; -var rgb=new Array(3); -if(hex.indexOf("#")==0){ -hex=hex.substring(1); -} -hex=hex.toUpperCase(); -if(hex.replace(new RegExp("["+_3bd+"]","g"),"")!=""){ -return null; -} -if(hex.length==3){ -rgb[0]=hex.charAt(0)+hex.charAt(0); -rgb[1]=hex.charAt(1)+hex.charAt(1); -rgb[2]=hex.charAt(2)+hex.charAt(2); -}else{ -rgb[0]=hex.substring(0,2); -rgb[1]=hex.substring(2,4); -rgb[2]=hex.substring(4); -} -for(var i=0;i0){ -this.duration=_3de; -} -if(_3e1){ -this.repeatCount=_3e1; -} -if(rate){ -this.rate=rate; -} -if(_3dd){ -dojo.lang.forEach(["handler","beforeBegin","onBegin","onEnd","onPlay","onStop","onAnimate"],function(item){ -if(_3dd[item]){ -this.connect(item,_3dd[item]); -} -},this); -} -if(_3e0&&dojo.lang.isFunction(_3e0)){ -this.easing=_3e0; -} -}; -dojo.inherits(dojo.lfx.Animation,dojo.lfx.IAnimation); -dojo.lang.extend(dojo.lfx.Animation,{_startTime:null,_endTime:null,_timer:null,_percent:0,_startRepeatCount:0,play:function(_3e4,_3e5){ -if(_3e5){ -clearTimeout(this._timer); -this._active=false; -this._paused=false; -this._percent=0; -}else{ -if(this._active&&!this._paused){ -return this; -} -} -this.fire("handler",["beforeBegin"]); -this.fire("beforeBegin"); -if(_3e4>0){ -setTimeout(dojo.lang.hitch(this,function(){ -this.play(null,_3e5); -}),_3e4); -return this; -} -this._startTime=new Date().valueOf(); -if(this._paused){ -this._startTime-=(this.duration*this._percent/100); -} -this._endTime=this._startTime+this.duration; -this._active=true; -this._paused=false; -var step=this._percent/100; -var _3e7=this.curve.getValue(step); -if(this._percent==0){ -if(!this._startRepeatCount){ -this._startRepeatCount=this.repeatCount; -} -this.fire("handler",["begin",_3e7]); -this.fire("onBegin",[_3e7]); -} -this.fire("handler",["play",_3e7]); -this.fire("onPlay",[_3e7]); -this._cycle(); -return this; -},pause:function(){ -clearTimeout(this._timer); -if(!this._active){ -return this; -} -this._paused=true; -var _3e8=this.curve.getValue(this._percent/100); -this.fire("handler",["pause",_3e8]); -this.fire("onPause",[_3e8]); -return this; -},gotoPercent:function(pct,_3ea){ -clearTimeout(this._timer); -this._active=true; -this._paused=true; -this._percent=pct; -if(_3ea){ -this.play(); -} -return this; -},stop:function(_3eb){ -clearTimeout(this._timer); -var step=this._percent/100; -if(_3eb){ -step=1; -} -var _3ed=this.curve.getValue(step); -this.fire("handler",["stop",_3ed]); -this.fire("onStop",[_3ed]); -this._active=false; -this._paused=false; -return this; -},status:function(){ -if(this._active){ -return this._paused?"paused":"playing"; -}else{ -return "stopped"; -} -return this; -},_cycle:function(){ -clearTimeout(this._timer); -if(this._active){ -var curr=new Date().valueOf(); -var step=(curr-this._startTime)/(this._endTime-this._startTime); -if(step>=1){ -step=1; -this._percent=100; -}else{ -this._percent=step*100; -} -if((this.easing)&&(dojo.lang.isFunction(this.easing))){ -step=this.easing(step); -} -var _3f0=this.curve.getValue(step); -this.fire("handler",["animate",_3f0]); -this.fire("onAnimate",[_3f0]); -if(step<1){ -this._timer=setTimeout(dojo.lang.hitch(this,"_cycle"),this.rate); -}else{ -this._active=false; -this.fire("handler",["end"]); -this.fire("onEnd"); -if(this.repeatCount>0){ -this.repeatCount--; -this.play(null,true); -}else{ -if(this.repeatCount==-1){ -this.play(null,true); -}else{ -if(this._startRepeatCount){ -this.repeatCount=this._startRepeatCount; -this._startRepeatCount=0; -} -} -} -} -} -return this; -}}); -dojo.lfx.Combine=function(_3f1){ -dojo.lfx.IAnimation.call(this); -this._anims=[]; -this._animsEnded=0; -var _3f2=arguments; -if(_3f2.length==1&&(dojo.lang.isArray(_3f2[0])||dojo.lang.isArrayLike(_3f2[0]))){ -_3f2=_3f2[0]; -} -dojo.lang.forEach(_3f2,function(anim){ -this._anims.push(anim); -anim.connect("onEnd",dojo.lang.hitch(this,"_onAnimsEnded")); -},this); -}; -dojo.inherits(dojo.lfx.Combine,dojo.lfx.IAnimation); -dojo.lang.extend(dojo.lfx.Combine,{_animsEnded:0,play:function(_3f4,_3f5){ -if(!this._anims.length){ -return this; -} -this.fire("beforeBegin"); -if(_3f4>0){ -setTimeout(dojo.lang.hitch(this,function(){ -this.play(null,_3f5); -}),_3f4); -return this; -} -if(_3f5||this._anims[0].percent==0){ -this.fire("onBegin"); -} -this.fire("onPlay"); -this._animsCall("play",null,_3f5); -return this; -},pause:function(){ -this.fire("onPause"); -this._animsCall("pause"); -return this; -},stop:function(_3f6){ -this.fire("onStop"); -this._animsCall("stop",_3f6); -return this; -},_onAnimsEnded:function(){ -this._animsEnded++; -if(this._animsEnded>=this._anims.length){ -this.fire("onEnd"); -} -return this; -},_animsCall:function(_3f7){ -var args=[]; -if(arguments.length>1){ -for(var i=1;i0){ -setTimeout(dojo.lang.hitch(this,function(){ -this.play(null,_403); -}),_402); -return this; -} -if(_404){ -if(this._currAnim==0){ -this.fire("handler",["begin",this._currAnim]); -this.fire("onBegin",[this._currAnim]); -} -this.fire("onPlay",[this._currAnim]); -_404.play(null,_403); -} -return this; -},pause:function(){ -if(this._anims[this._currAnim]){ -this._anims[this._currAnim].pause(); -this.fire("onPause",[this._currAnim]); -} -return this; -},playPause:function(){ -if(this._anims.length==0){ -return this; -} -if(this._currAnim==-1){ -this._currAnim=0; -} -var _405=this._anims[this._currAnim]; -if(_405){ -if(!_405._active||_405._paused){ -this.play(); -}else{ -this.pause(); -} -} -return this; -},stop:function(){ -var _406=this._anims[this._currAnim]; -if(_406){ -_406.stop(); -this.fire("onStop",[this._currAnim]); -} -return _406; -},_playNext:function(){ -if(this._currAnim==-1||this._anims.length==0){ -return this; -} -this._currAnim++; -if(this._anims[this._currAnim]){ -this._anims[this._currAnim].play(null,true); -} -return this; -}}); -dojo.lfx.combine=function(_407){ -var _408=arguments; -if(dojo.lang.isArray(arguments[0])){ -_408=arguments[0]; -} -if(_408.length==1){ -return _408[0]; -} -return new dojo.lfx.Combine(_408); -}; -dojo.lfx.chain=function(_409){ -var _40a=arguments; -if(dojo.lang.isArray(arguments[0])){ -_40a=arguments[0]; -} -if(_40a.length==1){ -return _40a[0]; -} -return new dojo.lfx.Chain(_40a); -}; -dojo.provide("dojo.html.common"); -dojo.lang.mixin(dojo.html,dojo.dom); -dojo.html.body=function(){ -dojo.deprecated("dojo.html.body() moved to dojo.body()","0.5"); -return dojo.body(); -}; -dojo.html.getEventTarget=function(evt){ -if(!evt){ -evt=dojo.global().event||{}; -} -var t=(evt.srcElement?evt.srcElement:(evt.target?evt.target:null)); -while((t)&&(t.nodeType!=1)){ -t=t.parentNode; -} -return t; -}; -dojo.html.getViewport=function(){ -var _40d=dojo.global(); -var _40e=dojo.doc(); -var w=0; -var h=0; -if(dojo.render.html.mozilla){ -w=_40e.documentElement.clientWidth; -h=_40d.innerHeight; -}else{ -if(!dojo.render.html.opera&&_40d.innerWidth){ -w=_40d.innerWidth; -h=_40d.innerHeight; -}else{ -if(!dojo.render.html.opera&&dojo.exists(_40e,"documentElement.clientWidth")){ -var w2=_40e.documentElement.clientWidth; -if(!w||w2&&w2_436)){ -loc=dojo.hostenv.getBaseScriptUri()+loc; -} -return new dojo.uri.Uri(loc,uri); -}; -this.Uri=function(){ -var uri=arguments[0]; -for(var i=1;i0&&!(j==1&&segs[0]=="")&&segs[j]==".."&&segs[j-1]!=".."){ -if(j==segs.length-1){ -segs.splice(j,1); -segs[j-1]=""; -}else{ -segs.splice(j-1,2); -j-=2; -} -} -} -} -_439.path=segs.join("/"); -} -} -} -} -uri=""; -if(_439.scheme!=null){ -uri+=_439.scheme+":"; -} -if(_439.authority!=null){ -uri+="//"+_439.authority; -} -uri+=_439.path; -if(_439.query!=null){ -uri+="?"+_439.query; -} -if(_439.fragment!=null){ -uri+="#"+_439.fragment; -} -} -this.uri=uri.toString(); -var _43e="^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"; -var r=this.uri.match(new RegExp(_43e)); -this.scheme=r[2]||(r[1]?"":null); -this.authority=r[4]||(r[3]?"":null); -this.path=r[5]; -this.query=r[7]||(r[6]?"":null); -this.fragment=r[9]||(r[8]?"":null); -if(this.authority!=null){ -_43e="^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$"; -r=this.authority.match(new RegExp(_43e)); -this.user=r[3]||null; -this.password=r[4]||null; -this.host=r[5]; -this.port=r[7]||null; -} -this.toString=function(){ -return this.uri; -}; -}; -}; -dojo.provide("dojo.html.style"); -dojo.html.getClass=function(node){ -node=dojo.byId(node); -if(!node){ -return ""; -} -var cs=""; -if(node.className){ -cs=node.className; -}else{ -if(dojo.html.hasAttribute(node,"class")){ -cs=dojo.html.getAttribute(node,"class"); -} -} -return cs.replace(/^\s+|\s+$/g,""); -}; -dojo.html.getClasses=function(node){ -var c=dojo.html.getClass(node); -return (c=="")?[]:c.split(/\s+/g); -}; -dojo.html.hasClass=function(node,_445){ -return (new RegExp("(^|\\s+)"+_445+"(\\s+|$)")).test(dojo.html.getClass(node)); -}; -dojo.html.prependClass=function(node,_447){ -_447+=" "+dojo.html.getClass(node); -return dojo.html.setClass(node,_447); -}; -dojo.html.addClass=function(node,_449){ -if(dojo.html.hasClass(node,_449)){ -return false; -} -_449=(dojo.html.getClass(node)+" "+_449).replace(/^\s+|\s+$/g,""); -return dojo.html.setClass(node,_449); -}; -dojo.html.setClass=function(node,_44b){ -node=dojo.byId(node); -var cs=new String(_44b); -try{ -if(typeof node.className=="string"){ -node.className=cs; -}else{ -if(node.setAttribute){ -node.setAttribute("class",_44b); -node.className=cs; -}else{ -return false; -} -} -} -catch(e){ -dojo.debug("dojo.html.setClass() failed",e); -} -return true; -}; -dojo.html.removeClass=function(node,_44e,_44f){ -try{ -if(!_44f){ -var _450=dojo.html.getClass(node).replace(new RegExp("(^|\\s+)"+_44e+"(\\s+|$)"),"$1$2"); -}else{ -var _450=dojo.html.getClass(node).replace(_44e,""); -} -dojo.html.setClass(node,_450); -} -catch(e){ -dojo.debug("dojo.html.removeClass() failed",e); -} -return true; -}; -dojo.html.replaceClass=function(node,_452,_453){ -dojo.html.removeClass(node,_453); -dojo.html.addClass(node,_452); -}; -dojo.html.classMatchType={ContainsAll:0,ContainsAny:1,IsOnly:2}; -dojo.html.getElementsByClass=function(_454,_455,_456,_457,_458){ -_458=false; -var _459=dojo.doc(); -_455=dojo.byId(_455)||_459; -var _45a=_454.split(/\s+/g); -var _45b=[]; -if(_457!=1&&_457!=2){ -_457=0; -} -var _45c=new RegExp("(\\s|^)(("+_45a.join(")|(")+"))(\\s|$)"); -var _45d=_45a.join(" ").length; -var _45e=[]; -if(!_458&&_459.evaluate){ -var _45f=".//"+(_456||"*")+"[contains("; -if(_457!=dojo.html.classMatchType.ContainsAny){ -_45f+="concat(' ',@class,' '), ' "+_45a.join(" ') and contains(concat(' ',@class,' '), ' ")+" ')"; -if(_457==2){ -_45f+=" and string-length(@class)="+_45d+"]"; -}else{ -_45f+="]"; -} -}else{ -_45f+="concat(' ',@class,' '), ' "+_45a.join(" ') or contains(concat(' ',@class,' '), ' ")+" ')]"; -} -var _460=_459.evaluate(_45f,_455,null,XPathResult.ANY_TYPE,null); -var _461=_460.iterateNext(); -while(_461){ -try{ -_45e.push(_461); -_461=_460.iterateNext(); -} -catch(e){ -break; -} -} -return _45e; -}else{ -if(!_456){ -_456="*"; -} -_45e=_455.getElementsByTagName(_456); -var node,i=0; -outer: -while(node=_45e[i++]){ -var _464=dojo.html.getClasses(node); -if(_464.length==0){ -continue outer; -} -var _465=0; -for(var j=0;j<_464.length;j++){ -if(_45c.test(_464[j])){ -if(_457==dojo.html.classMatchType.ContainsAny){ -_45b.push(node); -continue outer; -}else{ -_465++; -} -}else{ -if(_457==dojo.html.classMatchType.IsOnly){ -continue outer; -} -} -} -if(_465==_45a.length){ -if((_457==dojo.html.classMatchType.IsOnly)&&(_465==_464.length)){ -_45b.push(node); -}else{ -if(_457==dojo.html.classMatchType.ContainsAll){ -_45b.push(node); -} -} -} -} -return _45b; -} -}; -dojo.html.getElementsByClassName=dojo.html.getElementsByClass; -dojo.html.toCamelCase=function(_467){ -var arr=_467.split("-"),cc=arr[0]; -for(var i=1;i=1){ -if(h.ie){ -dojo.html.clearOpacity(node); -return; -}else{ -_4d7=0.999999; -} -}else{ -if(_4d7<0){ -_4d7=0; -} -} -} -if(h.ie){ -if(node.nodeName.toLowerCase()=="tr"){ -var tds=node.getElementsByTagName("td"); -for(var x=0;x=0.999999?1:Number(opac); -}; -dojo.provide("dojo.html.color"); -dojo.html.getBackgroundColor=function(node){ -node=dojo.byId(node); -var _4e3; -do{ -_4e3=dojo.html.getStyle(node,"background-color"); -if(_4e3.toLowerCase()=="rgba(0, 0, 0, 0)"){ -_4e3="transparent"; -} -if(node==document.getElementsByTagName("body")[0]){ -node=null; -break; -} -node=node.parentNode; -}while(node&&dojo.lang.inArray(["transparent",""],_4e3)); -if(_4e3=="transparent"){ -_4e3=[255,255,255,0]; -}else{ -_4e3=dojo.gfx.color.extractRGB(_4e3); -} -return _4e3; -}; -dojo.provide("dojo.html.layout"); -dojo.html.sumAncestorProperties=function(node,prop){ -node=dojo.byId(node); -if(!node){ -return 0; -} -var _4e6=0; -while(node){ -if(dojo.html.getComputedStyle(node,"position")=="fixed"){ -return 0; -} -var val=node[prop]; -if(val){ -_4e6+=val-0; -if(node==dojo.body()){ -break; -} -} -node=node.parentNode; -} -return _4e6; -}; -dojo.html.setStyleAttributes=function(node,_4e9){ -node=dojo.byId(node); -var _4ea=_4e9.replace(/(;)?\s*$/,"").split(";"); -for(var i=0;i<_4ea.length;i++){ -var _4ec=_4ea[i].split(":"); -var name=_4ec[0].replace(/\s*$/,"").replace(/^\s*/,"").toLowerCase(); -var _4ee=_4ec[1].replace(/\s*$/,"").replace(/^\s*/,""); -switch(name){ -case "opacity": -dojo.html.setOpacity(node,_4ee); -break; -case "content-height": -dojo.html.setContentBox(node,{height:_4ee}); -break; -case "content-width": -dojo.html.setContentBox(node,{width:_4ee}); -break; -case "outer-height": -dojo.html.setMarginBox(node,{height:_4ee}); -break; -case "outer-width": -dojo.html.setMarginBox(node,{width:_4ee}); -break; -default: -node.style[dojo.html.toCamelCase(name)]=_4ee; -} -} -}; -dojo.html.boxSizing={MARGIN_BOX:"margin-box",BORDER_BOX:"border-box",PADDING_BOX:"padding-box",CONTENT_BOX:"content-box"}; -dojo.html.getAbsolutePosition=dojo.html.abs=function(node,_4f0,_4f1){ -node=dojo.byId(node,node.ownerDocument); -var ret={x:0,y:0}; -var bs=dojo.html.boxSizing; -if(!_4f1){ -_4f1=bs.CONTENT_BOX; -} -var _4f4=2; -var _4f5; -switch(_4f1){ -case bs.MARGIN_BOX: -_4f5=3; -break; -case bs.BORDER_BOX: -_4f5=2; -break; -case bs.PADDING_BOX: -default: -_4f5=1; -break; -case bs.CONTENT_BOX: -_4f5=0; -break; -} -var h=dojo.render.html; -var db=document["body"]||document["documentElement"]; -if(h.ie){ -with(node.getBoundingClientRect()){ -ret.x=left-2; -ret.y=top-2; -} -}else{ -if(document.getBoxObjectFor){ -_4f4=1; -try{ -var bo=document.getBoxObjectFor(node); -ret.x=bo.x-dojo.html.sumAncestorProperties(node,"scrollLeft"); -ret.y=bo.y-dojo.html.sumAncestorProperties(node,"scrollTop"); -} -catch(e){ -} -}else{ -if(node["offsetParent"]){ -var _4f9; -if((h.safari)&&(node.style.getPropertyValue("position")=="absolute")&&(node.parentNode==db)){ -_4f9=db; -}else{ -_4f9=db.parentNode; -} -if(node.parentNode!=db){ -var nd=node; -if(dojo.render.html.opera){ -nd=db; -} -ret.x-=dojo.html.sumAncestorProperties(nd,"scrollLeft"); -ret.y-=dojo.html.sumAncestorProperties(nd,"scrollTop"); -} -var _4fb=node; -do{ -var n=_4fb["offsetLeft"]; -if(!h.opera||n>0){ -ret.x+=isNaN(n)?0:n; -} -var m=_4fb["offsetTop"]; -ret.y+=isNaN(m)?0:m; -_4fb=_4fb.offsetParent; -}while((_4fb!=_4f9)&&(_4fb!=null)); -}else{ -if(node["x"]&&node["y"]){ -ret.x+=isNaN(node.x)?0:node.x; -ret.y+=isNaN(node.y)?0:node.y; -} -} -} -} -if(_4f0){ -var _4fe=dojo.html.getScroll(); -ret.y+=_4fe.top; -ret.x+=_4fe.left; -} -var _4ff=[dojo.html.getPaddingExtent,dojo.html.getBorderExtent,dojo.html.getMarginExtent]; -if(_4f4>_4f5){ -for(var i=_4f5;i<_4f4;++i){ -ret.y+=_4ff[i](node,"top"); -ret.x+=_4ff[i](node,"left"); -} -}else{ -if(_4f4<_4f5){ -for(var i=_4f5;i>_4f4;--i){ -ret.y-=_4ff[i-1](node,"top"); -ret.x-=_4ff[i-1](node,"left"); -} -} -} -ret.top=ret.y; -ret.left=ret.x; -return ret; -}; -dojo.html.isPositionAbsolute=function(node){ -return (dojo.html.getComputedStyle(node,"position")=="absolute"); -}; -dojo.html._sumPixelValues=function(node,_503,_504){ -var _505=0; -for(var x=0;x<_503.length;x++){ -_505+=dojo.html.getPixelValue(node,_503[x],_504); -} -return _505; -}; -dojo.html.getMargin=function(node){ -return {width:dojo.html._sumPixelValues(node,["margin-left","margin-right"],(dojo.html.getComputedStyle(node,"position")=="absolute")),height:dojo.html._sumPixelValues(node,["margin-top","margin-bottom"],(dojo.html.getComputedStyle(node,"position")=="absolute"))}; -}; -dojo.html.getBorder=function(node){ -return {width:dojo.html.getBorderExtent(node,"left")+dojo.html.getBorderExtent(node,"right"),height:dojo.html.getBorderExtent(node,"top")+dojo.html.getBorderExtent(node,"bottom")}; -}; -dojo.html.getBorderExtent=function(node,side){ -return (dojo.html.getStyle(node,"border-"+side+"-style")=="none"?0:dojo.html.getPixelValue(node,"border-"+side+"-width")); -}; -dojo.html.getMarginExtent=function(node,side){ -return dojo.html._sumPixelValues(node,["margin-"+side],dojo.html.isPositionAbsolute(node)); -}; -dojo.html.getPaddingExtent=function(node,side){ -return dojo.html._sumPixelValues(node,["padding-"+side],true); -}; -dojo.html.getPadding=function(node){ -return {width:dojo.html._sumPixelValues(node,["padding-left","padding-right"],true),height:dojo.html._sumPixelValues(node,["padding-top","padding-bottom"],true)}; -}; -dojo.html.getPadBorder=function(node){ -var pad=dojo.html.getPadding(node); -var _512=dojo.html.getBorder(node); -return {width:pad.width+_512.width,height:pad.height+_512.height}; -}; -dojo.html.getBoxSizing=function(node){ -var h=dojo.render.html; -var bs=dojo.html.boxSizing; -if(((h.ie)||(h.opera))&&node.nodeName.toLowerCase()!="img"){ -var cm=document["compatMode"]; -if((cm=="BackCompat")||(cm=="QuirksMode")){ -return bs.BORDER_BOX; -}else{ -return bs.CONTENT_BOX; -} -}else{ -if(arguments.length==0){ -node=document.documentElement; -} -var _517; -if(!h.ie){ -_517=dojo.html.getStyle(node,"-moz-box-sizing"); -if(!_517){ -_517=dojo.html.getStyle(node,"box-sizing"); -} -} -return (_517?_517:bs.CONTENT_BOX); -} -}; -dojo.html.isBorderBox=function(node){ -return (dojo.html.getBoxSizing(node)==dojo.html.boxSizing.BORDER_BOX); -}; -dojo.html.getBorderBox=function(node){ -node=dojo.byId(node); -return {width:node.offsetWidth,height:node.offsetHeight}; -}; -dojo.html.getPaddingBox=function(node){ -var box=dojo.html.getBorderBox(node); -var _51c=dojo.html.getBorder(node); -return {width:box.width-_51c.width,height:box.height-_51c.height}; -}; -dojo.html.getContentBox=function(node){ -node=dojo.byId(node); -var _51e=dojo.html.getPadBorder(node); -return {width:node.offsetWidth-_51e.width,height:node.offsetHeight-_51e.height}; -}; -dojo.html.setContentBox=function(node,args){ -node=dojo.byId(node); -var _521=0; -var _522=0; -var isbb=dojo.html.isBorderBox(node); -var _524=(isbb?dojo.html.getPadBorder(node):{width:0,height:0}); -var ret={}; -if(typeof args.width!="undefined"){ -_521=args.width+_524.width; -ret.width=dojo.html.setPositivePixelValue(node,"width",_521); -} -if(typeof args.height!="undefined"){ -_522=args.height+_524.height; -ret.height=dojo.html.setPositivePixelValue(node,"height",_522); -} -return ret; -}; -dojo.html.getMarginBox=function(node){ -var _527=dojo.html.getBorderBox(node); -var _528=dojo.html.getMargin(node); -return {width:_527.width+_528.width,height:_527.height+_528.height}; -}; -dojo.html.setMarginBox=function(node,args){ -node=dojo.byId(node); -var _52b=0; -var _52c=0; -var isbb=dojo.html.isBorderBox(node); -var _52e=(!isbb?dojo.html.getPadBorder(node):{width:0,height:0}); -var _52f=dojo.html.getMargin(node); -var ret={}; -if(typeof args.width!="undefined"){ -_52b=args.width-_52e.width; -_52b-=_52f.width; -ret.width=dojo.html.setPositivePixelValue(node,"width",_52b); -} -if(typeof args.height!="undefined"){ -_52c=args.height-_52e.height; -_52c-=_52f.height; -ret.height=dojo.html.setPositivePixelValue(node,"height",_52c); -} -return ret; -}; -dojo.html.getElementBox=function(node,type){ -var bs=dojo.html.boxSizing; -switch(type){ -case bs.MARGIN_BOX: -return dojo.html.getMarginBox(node); -case bs.BORDER_BOX: -return dojo.html.getBorderBox(node); -case bs.PADDING_BOX: -return dojo.html.getPaddingBox(node); -case bs.CONTENT_BOX: -default: -return dojo.html.getContentBox(node); -} -}; -dojo.html.toCoordinateObject=dojo.html.toCoordinateArray=function(_534,_535,_536){ -if(_534 instanceof Array||typeof _534=="array"){ -dojo.deprecated("dojo.html.toCoordinateArray","use dojo.html.toCoordinateObject({left: , top: , width: , height: }) instead","0.5"); -while(_534.length<4){ -_534.push(0); -} -while(_534.length>4){ -_534.pop(); -} -var ret={left:_534[0],top:_534[1],width:_534[2],height:_534[3]}; -}else{ -if(!_534.nodeType&&!(_534 instanceof String||typeof _534=="string")&&("width" in _534||"height" in _534||"left" in _534||"x" in _534||"top" in _534||"y" in _534)){ -var ret={left:_534.left||_534.x||0,top:_534.top||_534.y||0,width:_534.width||0,height:_534.height||0}; -}else{ -var node=dojo.byId(_534); -var pos=dojo.html.abs(node,_535,_536); -var _53a=dojo.html.getMarginBox(node); -var ret={left:pos.left,top:pos.top,width:_53a.width,height:_53a.height}; -} -} -ret.x=ret.left; -ret.y=ret.top; -return ret; -}; -dojo.html.setMarginBoxWidth=dojo.html.setOuterWidth=function(node,_53c){ -return dojo.html._callDeprecated("setMarginBoxWidth","setMarginBox",arguments,"width"); -}; -dojo.html.setMarginBoxHeight=dojo.html.setOuterHeight=function(){ -return dojo.html._callDeprecated("setMarginBoxHeight","setMarginBox",arguments,"height"); -}; -dojo.html.getMarginBoxWidth=dojo.html.getOuterWidth=function(){ -return dojo.html._callDeprecated("getMarginBoxWidth","getMarginBox",arguments,null,"width"); -}; -dojo.html.getMarginBoxHeight=dojo.html.getOuterHeight=function(){ -return dojo.html._callDeprecated("getMarginBoxHeight","getMarginBox",arguments,null,"height"); -}; -dojo.html.getTotalOffset=function(node,type,_53f){ -return dojo.html._callDeprecated("getTotalOffset","getAbsolutePosition",arguments,null,type); -}; -dojo.html.getAbsoluteX=function(node,_541){ -return dojo.html._callDeprecated("getAbsoluteX","getAbsolutePosition",arguments,null,"x"); -}; -dojo.html.getAbsoluteY=function(node,_543){ -return dojo.html._callDeprecated("getAbsoluteY","getAbsolutePosition",arguments,null,"y"); -}; -dojo.html.totalOffsetLeft=function(node,_545){ -return dojo.html._callDeprecated("totalOffsetLeft","getAbsolutePosition",arguments,null,"left"); -}; -dojo.html.totalOffsetTop=function(node,_547){ -return dojo.html._callDeprecated("totalOffsetTop","getAbsolutePosition",arguments,null,"top"); -}; -dojo.html.getMarginWidth=function(node){ -return dojo.html._callDeprecated("getMarginWidth","getMargin",arguments,null,"width"); -}; -dojo.html.getMarginHeight=function(node){ -return dojo.html._callDeprecated("getMarginHeight","getMargin",arguments,null,"height"); -}; -dojo.html.getBorderWidth=function(node){ -return dojo.html._callDeprecated("getBorderWidth","getBorder",arguments,null,"width"); -}; -dojo.html.getBorderHeight=function(node){ -return dojo.html._callDeprecated("getBorderHeight","getBorder",arguments,null,"height"); -}; -dojo.html.getPaddingWidth=function(node){ -return dojo.html._callDeprecated("getPaddingWidth","getPadding",arguments,null,"width"); -}; -dojo.html.getPaddingHeight=function(node){ -return dojo.html._callDeprecated("getPaddingHeight","getPadding",arguments,null,"height"); -}; -dojo.html.getPadBorderWidth=function(node){ -return dojo.html._callDeprecated("getPadBorderWidth","getPadBorder",arguments,null,"width"); -}; -dojo.html.getPadBorderHeight=function(node){ -return dojo.html._callDeprecated("getPadBorderHeight","getPadBorder",arguments,null,"height"); -}; -dojo.html.getBorderBoxWidth=dojo.html.getInnerWidth=function(){ -return dojo.html._callDeprecated("getBorderBoxWidth","getBorderBox",arguments,null,"width"); -}; -dojo.html.getBorderBoxHeight=dojo.html.getInnerHeight=function(){ -return dojo.html._callDeprecated("getBorderBoxHeight","getBorderBox",arguments,null,"height"); -}; -dojo.html.getContentBoxWidth=dojo.html.getContentWidth=function(){ -return dojo.html._callDeprecated("getContentBoxWidth","getContentBox",arguments,null,"width"); -}; -dojo.html.getContentBoxHeight=dojo.html.getContentHeight=function(){ -return dojo.html._callDeprecated("getContentBoxHeight","getContentBox",arguments,null,"height"); -}; -dojo.html.setContentBoxWidth=dojo.html.setContentWidth=function(node,_551){ -return dojo.html._callDeprecated("setContentBoxWidth","setContentBox",arguments,"width"); -}; -dojo.html.setContentBoxHeight=dojo.html.setContentHeight=function(node,_553){ -return dojo.html._callDeprecated("setContentBoxHeight","setContentBox",arguments,"height"); -}; -dojo.provide("dojo.lfx.html"); -dojo.lfx.html._byId=function(_554){ -if(!_554){ -return []; -} -if(dojo.lang.isArrayLike(_554)){ -if(!_554.alreadyChecked){ -var n=[]; -dojo.lang.forEach(_554,function(node){ -n.push(dojo.byId(node)); -}); -n.alreadyChecked=true; -return n; -}else{ -return _554; -} -}else{ -var n=[]; -n.push(dojo.byId(_554)); -n.alreadyChecked=true; -return n; -} -}; -dojo.lfx.html.propertyAnimation=function(_557,_558,_559,_55a,_55b){ -_557=dojo.lfx.html._byId(_557); -var _55c={"propertyMap":_558,"nodes":_557,"duration":_559,"easing":_55a||dojo.lfx.easeDefault}; -var _55d=function(args){ -if(args.nodes.length==1){ -var pm=args.propertyMap; -if(!dojo.lang.isArray(args.propertyMap)){ -var parr=[]; -for(var _561 in pm){ -pm[_561].property=_561; -parr.push(pm[_561]); -} -pm=args.propertyMap=parr; -} -dojo.lang.forEach(pm,function(prop){ -if(dj_undef("start",prop)){ -if(prop.property!="opacity"){ -prop.start=parseInt(dojo.html.getComputedStyle(args.nodes[0],prop.property)); -}else{ -prop.start=dojo.html.getOpacity(args.nodes[0]); -} -} -}); -} -}; -var _563=function(_564){ -var _565=[]; -dojo.lang.forEach(_564,function(c){ -_565.push(Math.round(c)); -}); -return _565; -}; -var _567=function(n,_569){ -n=dojo.byId(n); -if(!n||!n.style){ -return; -} -for(var s in _569){ -try{ -if(s=="opacity"){ -dojo.html.setOpacity(n,_569[s]); -}else{ -n.style[s]=_569[s]; -} -} -catch(e){ -dojo.debug(e); -} -} -}; -var _56b=function(_56c){ -this._properties=_56c; -this.diffs=new Array(_56c.length); -dojo.lang.forEach(_56c,function(prop,i){ -if(dojo.lang.isFunction(prop.start)){ -prop.start=prop.start(prop,i); -} -if(dojo.lang.isFunction(prop.end)){ -prop.end=prop.end(prop,i); -} -if(dojo.lang.isArray(prop.start)){ -this.diffs[i]=null; -}else{ -if(prop.start instanceof dojo.gfx.color.Color){ -prop.startRgb=prop.start.toRgb(); -prop.endRgb=prop.end.toRgb(); -}else{ -this.diffs[i]=prop.end-prop.start; -} -} -},this); -this.getValue=function(n){ -var ret={}; -dojo.lang.forEach(this._properties,function(prop,i){ -var _573=null; -if(dojo.lang.isArray(prop.start)){ -}else{ -if(prop.start instanceof dojo.gfx.color.Color){ -_573=(prop.units||"rgb")+"("; -for(var j=0;j3){ -_5e8.pop(); -} -var rgb=new dojo.gfx.color.Color(_5e2); -var _5ed=new dojo.gfx.color.Color(_5e8); -var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:rgb,end:_5ed}},_5e3,_5e4,{"beforeBegin":function(){ -if(_5ea){ -node.style.backgroundImage="none"; -} -node.style.backgroundColor="rgb("+rgb.toRgb().join(",")+")"; -},"onEnd":function(){ -if(_5ea){ -node.style.backgroundImage=_5ea; -} -if(_5eb){ -node.style.backgroundColor="transparent"; -} -if(_5e5){ -_5e5(node,anim); -} -}}); -_5e6.push(anim); -}); -return dojo.lfx.combine(_5e6); -}; -dojo.lfx.html.unhighlight=function(_5ef,_5f0,_5f1,_5f2,_5f3){ -_5ef=dojo.lfx.html._byId(_5ef); -var _5f4=[]; -dojo.lang.forEach(_5ef,function(node){ -var _5f6=new dojo.gfx.color.Color(dojo.html.getBackgroundColor(node)); -var rgb=new dojo.gfx.color.Color(_5f0); -var _5f8=dojo.html.getStyle(node,"background-image"); -var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:_5f6,end:rgb}},_5f1,_5f2,{"beforeBegin":function(){ -if(_5f8){ -node.style.backgroundImage="none"; -} -node.style.backgroundColor="rgb("+_5f6.toRgb().join(",")+")"; -},"onEnd":function(){ -if(_5f3){ -_5f3(node,anim); -} -}}); -_5f4.push(anim); -}); -return dojo.lfx.combine(_5f4); -}; -dojo.lang.mixin(dojo.lfx,dojo.lfx.html); -dojo.kwCompoundRequire({browser:["dojo.lfx.html"],dashboard:["dojo.lfx.html"]}); -dojo.provide("dojo.lfx.*"); -if(!this["dojo"]){ -alert("\"dojo/__package__.js\" is now located at \"dojo/dojo.js\". Please update your includes accordingly"); -} -dojo.provide("dojo.xml.Parse"); -dojo.xml.Parse=function(){ -var isIE=((dojo.render.html.capable)&&(dojo.render.html.ie)); -function getTagName(node){ -try{ -return node.tagName.toLowerCase(); -} -catch(e){ -return ""; -} -} -function getDojoTagName(node){ -var _5fd=getTagName(node); -if(!_5fd){ -return ""; -} -if((dojo.widget)&&(dojo.widget.tags[_5fd])){ -return _5fd; -} -var p=_5fd.indexOf(":"); -if(p>=0){ -return _5fd; -} -if(_5fd.substr(0,5)=="dojo:"){ -return _5fd; -} -if(dojo.render.html.capable&&dojo.render.html.ie&&node.scopeName!="HTML"){ -return node.scopeName.toLowerCase()+":"+_5fd; -} -if(_5fd.substr(0,4)=="dojo"){ -return "dojo:"+_5fd.substring(4); -} -var djt=node.getAttribute("dojoType")||node.getAttribute("dojotype"); -if(djt){ -if(djt.indexOf(":")<0){ -djt="dojo:"+djt; -} -return djt.toLowerCase(); -} -djt=node.getAttributeNS&&node.getAttributeNS(dojo.dom.dojoml,"type"); -if(djt){ -return "dojo:"+djt.toLowerCase(); -} -try{ -djt=node.getAttribute("dojo:type"); -} -catch(e){ -} -if(djt){ -return "dojo:"+djt.toLowerCase(); -} -if((dj_global["djConfig"])&&(!djConfig["ignoreClassNames"])){ -var _600=node.className||node.getAttribute("class"); -if((_600)&&(_600.indexOf)&&(_600.indexOf("dojo-")!=-1)){ -var _601=_600.split(" "); -for(var x=0,c=_601.length;x0){ -var ns=_608.substring(0,pos); -_60c["ns"]=ns; -if((dojo.ns)&&(!dojo.ns.allow(ns))){ -_60a=false; -} -} -if(_60a){ -var _60f=this.parseAttributes(node); -for(var attr in _60f){ -if((!_60c[_608][attr])||(typeof _60c[_608][attr]!="array")){ -_60c[_608][attr]=[]; -} -_60c[_608][attr].push(_60f[attr]); -} -_60c[_608].nodeRef=node; -_60c.tagName=_608; -_60c.index=_607||0; -} -var _610=0; -for(var i=0;i=0;x--){ -try{ -this.widgets[x].destroy(true); -delete this.widgets[x]; -} -catch(e){ -} -} -}; -this.remove=function(_656){ -if(dojo.lang.isNumber(_656)){ -var tw=this.widgets[_656].widgetId; -delete this.topWidgets[tw]; -delete this.widgetIds[tw]; -this.widgets.splice(_656,1); -}else{ -this.removeById(_656); -} -}; -this.removeById=function(id){ -if(!dojo.lang.isString(id)){ -id=id["widgetId"]; -if(!id){ -dojo.debug("invalid widget or id passed to removeById"); -return; -} -} -for(var i=0;i0){ -return _692[n]; -} -return _692; -}; -g("registerWidgetPackage"); -g("getImplementation","getWidgetImplementation"); -g("getImplementationName","getWidgetImplementationName"); -dw.widgets=dwm.widgets; -dw.widgetIds=dwm.widgetIds; -dw.root=dwm.root; -})(); -dojo.kwCompoundRequire({common:[["dojo.uri.Uri",false,false]]}); -dojo.provide("dojo.uri.*"); -dojo.provide("dojo.a11y"); -dojo.a11y={imgPath:dojo.uri.moduleUri("dojo.widget","templates/images"),doAccessibleCheck:true,accessible:null,checkAccessible:function(){ -if(this.accessible===null){ -this.accessible=false; -if(this.doAccessibleCheck==true){ -this.accessible=this.testAccessible(); -} -} -return this.accessible; -},testAccessible:function(){ -this.accessible=false; -if(dojo.render.html.ie||dojo.render.html.mozilla){ -var div=document.createElement("div"); -div.style.backgroundImage="url(\""+this.imgPath+"/tab_close.gif\")"; -dojo.body().appendChild(div); -var _694=null; -if(window.getComputedStyle){ -var _695=getComputedStyle(div,""); -_694=_695.getPropertyValue("background-image"); -}else{ -_694=div.currentStyle.backgroundImage; -} -var _696=false; -if(_694!=null&&(_694=="none"||_694=="url(invalid-url:)")){ -this.accessible=true; -} -dojo.body().removeChild(div); -} -return this.accessible; -},setCheckAccessible:function(_697){ -this.doAccessibleCheck=_697; -},setAccessibleMode:function(){ -if(this.accessible===null){ -if(this.checkAccessible()){ -dojo.render.html.prefixes.unshift("a11y"); -} -} -return this.accessible; -}}; -dojo.provide("dojo.widget.Widget"); -dojo.declare("dojo.widget.Widget",null,function(){ -this.children=[]; -this.extraArgs={}; -},{parent:null,isTopLevel:false,disabled:false,isContainer:false,widgetId:"",widgetType:"Widget",ns:"dojo",getNamespacedType:function(){ -return (this.ns?this.ns+":"+this.widgetType:this.widgetType).toLowerCase(); -},toString:function(){ -return "[Widget "+this.getNamespacedType()+", "+(this.widgetId||"NO ID")+"]"; -},repr:function(){ -return this.toString(); -},enable:function(){ -this.disabled=false; -},disable:function(){ -this.disabled=true; -},onResized:function(){ -this.notifyChildrenOfResize(); -},notifyChildrenOfResize:function(){ -for(var i=0;ii){ -_69f=this.children[i]; -if(_69f instanceof dojo.widget.Widget){ -this.removeChild(_69f); -_69f.destroy(); -continue; -} -i++; -} -},getChildrenOfType:function(type,_6a2){ -var ret=[]; -var _6a4=dojo.lang.isFunction(type); -if(!_6a4){ -type=type.toLowerCase(); -} -for(var x=0;xsi)){ -this[x][_6b3[y].substr(0,si).replace(/^\s+|\s+$/g,"")]=_6b3[y].substr(si+1); -} -} -} -}else{ -this[x]=args[x]; -} -} -} -} -} -} -} -} -}else{ -this.extraArgs[x.toLowerCase()]=args[x]; -} -} -},postMixInProperties:function(args,frag,_6b7){ -},initialize:function(args,frag,_6ba){ -return false; -},postInitialize:function(args,frag,_6bd){ -return false; -},postCreate:function(args,frag,_6c0){ -return false; -},uninitialize:function(){ -return false; -},buildRendering:function(args,frag,_6c3){ -dojo.unimplemented("dojo.widget.Widget.buildRendering, on "+this.toString()+", "); -return false; -},destroyRendering:function(){ -dojo.unimplemented("dojo.widget.Widget.destroyRendering"); -return false; -},addedTo:function(_6c4){ -},addChild:function(_6c5){ -dojo.unimplemented("dojo.widget.Widget.addChild"); -return false; -},removeChild:function(_6c6){ -for(var x=0;x-1)?_6e9.substring(0,pos):_6e9; -_6e8=(_6e8)||{}; -_6e8.widgetType=type; -if((!init)&&(_6e8["classConstructor"])){ -init=_6e8.classConstructor; -delete _6e8.classConstructor; -} -dojo.declare(_6e4,_6e6,init,_6e8); -}; -dojo.provide("dojo.widget.Parse"); -dojo.widget.Parse=function(_6ef){ -this.propertySetsList=[]; -this.fragment=_6ef; -this.createComponents=function(frag,_6f1){ -var _6f2=[]; -var _6f3=false; -try{ -if(frag&&frag.tagName&&(frag!=frag.nodeRef)){ -var _6f4=dojo.widget.tags; -var tna=String(frag.tagName).split(";"); -for(var x=0;x-1)?name.substring(0,pos):"dojo"; -if(pos>-1){ -name=name.substring(pos+1); -} -var _727=name.toLowerCase(); -var _728=ns+":"+_727; -_723=(dojo.byId(name)&&!dojo.widget.tags[_728]); -} -if((arguments.length==1)&&(_723||!_724)){ -var xp=new dojo.xml.Parse(); -var tn=_723?dojo.byId(name):name; -return dojo.widget.getParser().createComponents(xp.parseElement(tn,null,true))[0]; -} -function fromScript(_72b,name,_72d,ns){ -_72d[_728]={dojotype:[{value:_727}],nodeRef:_72b,fastMixIn:true}; -_72d.ns=ns; -return dojo.widget.getParser().createComponentFromScript(_72b,name,_72d,ns); -} -_720=_720||{}; -var _72f=false; -var tn=null; -var h=dojo.render.html.capable; -if(h){ -tn=document.createElement("span"); -} -if(!_721){ -_72f=true; -_721=tn; -if(h){ -dojo.body().appendChild(_721); -} -}else{ -if(_722){ -dojo.dom.insertAtPosition(tn,_721,_722); -}else{ -tn=_721; -} -} -var _731=fromScript(tn,name.toLowerCase(),_720,ns); -if((!_731)||(!_731[0])||(typeof _731[0].widgetType=="undefined")){ -throw new Error("createWidget: Creation of \""+name+"\" widget failed."); -} -try{ -if(_72f&&_731[0].domNode.parentNode){ -_731[0].domNode.parentNode.removeChild(_731[0].domNode); -} -} -catch(e){ -dojo.debug(e); -} -return _731[0]; -}; -dojo.provide("dojo.widget.DomWidget"); -dojo.widget._cssFiles={}; -dojo.widget._cssStrings={}; -dojo.widget._templateCache={}; -dojo.widget.defaultStrings={dojoRoot:dojo.hostenv.getBaseScriptUri(),dojoWidgetModuleUri:dojo.uri.moduleUri("dojo.widget"),baseScriptUri:dojo.hostenv.getBaseScriptUri()}; -dojo.widget.fillFromTemplateCache=function(obj,_733,_734,_735){ -var _736=_733||obj.templatePath; -var _737=dojo.widget._templateCache; -if(!_736&&!obj["widgetType"]){ -do{ -var _738="__dummyTemplate__"+dojo.widget._templateCache.dummyCount++; -}while(_737[_738]); -obj.widgetType=_738; -} -var wt=_736?_736.toString():obj.widgetType; -var ts=_737[wt]; -if(!ts){ -_737[wt]={"string":null,"node":null}; -if(_735){ -ts={}; -}else{ -ts=_737[wt]; -} -} -if((!obj.templateString)&&(!_735)){ -obj.templateString=_734||ts["string"]; -} -if(obj.templateString){ -obj.templateString=this._sanitizeTemplateString(obj.templateString); -} -if((!obj.templateNode)&&(!_735)){ -obj.templateNode=ts["node"]; -} -if((!obj.templateNode)&&(!obj.templateString)&&(_736)){ -var _73b=this._sanitizeTemplateString(dojo.hostenv.getText(_736)); -obj.templateString=_73b; -if(!_735){ -_737[wt]["string"]=_73b; -} -} -if((!ts["string"])&&(!_735)){ -ts.string=obj.templateString; -} -}; -dojo.widget._sanitizeTemplateString=function(_73c){ -if(_73c){ -_73c=_73c.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,""); -var _73d=_73c.match(/]*>\s*([\s\S]+)\s*<\/body>/im); -if(_73d){ -_73c=_73d[1]; -} -}else{ -_73c=""; -} -return _73c; -}; -dojo.widget._templateCache.dummyCount=0; -dojo.widget.attachProperties=["dojoAttachPoint","id"]; -dojo.widget.eventAttachProperty="dojoAttachEvent"; -dojo.widget.onBuildProperty="dojoOnBuild"; -dojo.widget.waiNames=["waiRole","waiState"]; -dojo.widget.wai={waiRole:{name:"waiRole","namespace":"http://www.w3.org/TR/xhtml2",alias:"x2",prefix:"wairole:"},waiState:{name:"waiState","namespace":"http://www.w3.org/2005/07/aaa",alias:"aaa",prefix:""},setAttr:function(node,ns,attr,_741){ -if(dojo.render.html.ie){ -node.setAttribute(this[ns].alias+":"+attr,this[ns].prefix+_741); -}else{ -node.setAttributeNS(this[ns]["namespace"],attr,this[ns].prefix+_741); -} -},getAttr:function(node,ns,attr){ -if(dojo.render.html.ie){ -return node.getAttribute(this[ns].alias+":"+attr); -}else{ -return node.getAttributeNS(this[ns]["namespace"],attr); -} -},removeAttr:function(node,ns,attr){ -var _748=true; -if(dojo.render.html.ie){ -_748=node.removeAttribute(this[ns].alias+":"+attr); -}else{ -node.removeAttributeNS(this[ns]["namespace"],attr); -} -return _748; -}}; -dojo.widget.attachTemplateNodes=function(_749,_74a,_74b){ -var _74c=dojo.dom.ELEMENT_NODE; -function trim(str){ -return str.replace(/^\s+|\s+$/g,""); -} -if(!_749){ -_749=_74a.domNode; -} -if(_749.nodeType!=_74c){ -return; -} -var _74e=_749.all||_749.getElementsByTagName("*"); -var _74f=_74a; -for(var x=-1;x<_74e.length;x++){ -var _751=(x==-1)?_749:_74e[x]; -var _752=[]; -if(!_74a.widgetsInTemplate||!_751.getAttribute("dojoType")){ -for(var y=0;y=0){ -var _75a=tevt.split(":"); -tevt=trim(_75a[0]); -_758=trim(_75a[1]); -} -if(!_758){ -_758=tevt; -} -var tf=function(){ -var ntf=new String(_758); -return function(evt){ -if(_74f[ntf]){ -_74f[ntf](dojo.event.browser.fixEvent(evt,this)); -} -}; -}(); -dojo.event.browser.addListener(_751,tevt,tf,false,true); -} -} -for(var y=0;y<_74b.length;y++){ -var _75e=_751.getAttribute(_74b[y]); -if((_75e)&&(_75e.length)){ -var _758=null; -var _75f=_74b[y].substr(4); -_758=trim(_75e); -var _760=[_758]; -if(_758.indexOf(";")>=0){ -_760=dojo.lang.map(_758.split(";"),trim); -} -for(var z=0;z<_760.length;z++){ -if(!_760[z].length){ -continue; -} -var tf=function(){ -var ntf=new String(_760[z]); -return function(evt){ -if(_74f[ntf]){ -_74f[ntf](dojo.event.browser.fixEvent(evt,this)); -} -}; -}(); -dojo.event.browser.addListener(_751,_75f,tf,false,true); -} -} -} -} -var _763=_751.getAttribute(this.templateProperty); -if(_763){ -_74a[_763]=_751; -} -dojo.lang.forEach(dojo.widget.waiNames,function(name){ -var wai=dojo.widget.wai[name]; -var val=_751.getAttribute(wai.name); -if(val){ -if(val.indexOf("-")==-1){ -dojo.widget.wai.setAttr(_751,wai.name,"role",val); -}else{ -var _767=val.split("-"); -dojo.widget.wai.setAttr(_751,wai.name,_767[0],_767[1]); -} -} -},this); -var _768=_751.getAttribute(this.onBuildProperty); -if(_768){ -eval("var node = baseNode; var widget = targetObj; "+_768); -} -} -}; -dojo.widget.getDojoEventsFromStr=function(str){ -var re=/(dojoOn([a-z]+)(\s?))=/gi; -var evts=str?str.match(re)||[]:[]; -var ret=[]; -var lem={}; -for(var x=0;x0)&&(typeof arguments[0]=="object")){ -this.create(arguments[0]); -} -},{templateNode:null,templateString:null,templateCssString:null,preventClobber:false,domNode:null,containerNode:null,widgetsInTemplate:false,addChild:function(_770,_771,pos,ref,_774){ -if(!this.isContainer){ -dojo.debug("dojo.widget.DomWidget.addChild() attempted on non-container widget"); -return null; -}else{ -if(_774==undefined){ -_774=this.children.length; -} -this.addWidgetAsDirectChild(_770,_771,pos,ref,_774); -this.registerChild(_770,_774); -} -return _770; -},addWidgetAsDirectChild:function(_775,_776,pos,ref,_779){ -if((!this.containerNode)&&(!_776)){ -this.containerNode=this.domNode; -} -var cn=(_776)?_776:this.containerNode; -if(!pos){ -pos="after"; -} -if(!ref){ -if(!cn){ -cn=dojo.body(); -} -ref=cn.lastChild; -} -if(!_779){ -_779=0; -} -_775.domNode.setAttribute("dojoinsertionindex",_779); -if(!ref){ -cn.appendChild(_775.domNode); -}else{ -if(pos=="insertAtIndex"){ -dojo.dom.insertAtIndex(_775.domNode,ref.parentNode,_779); -}else{ -if((pos=="after")&&(ref===cn.lastChild)){ -cn.appendChild(_775.domNode); -}else{ -dojo.dom.insertAtPosition(_775.domNode,cn,pos); -} -} -} -},registerChild:function(_77b,_77c){ -_77b.dojoInsertionIndex=_77c; -var idx=-1; -for(var i=0;i=0){ -var _794=tevt.split(":"); -tevt=dojo.string.trim(_794[0]); -_792=dojo.string.trim(_794[1]); -} -if(!_792){ -_792=tevt; -} -if(dojo.lang.isFunction(_78f[tevt])){ -dojo.event.kwConnect({srcObj:_78f,srcFunc:tevt,targetObj:this,targetFunc:_792}); -}else{ -alert(tevt+" is not a function in widget "+_78f); -} -} -} -if(_78f.extraArgs["dojoattachpoint"]){ -this[_78f.extraArgs["dojoattachpoint"]]=_78f; -} -} -} -if(this.isContainer&&!frag["dojoDontFollow"]){ -dojo.widget.getParser().createSubComponents(frag,this); -} -},buildRendering:function(args,frag){ -var ts=dojo.widget._templateCache[this.widgetType]; -if(args["templatecsspath"]){ -args["templateCssPath"]=args["templatecsspath"]; -} -var _798=args["templateCssPath"]||this.templateCssPath; -if(_798&&!dojo.widget._cssFiles[_798.toString()]){ -if((!this.templateCssString)&&(_798)){ -this.templateCssString=dojo.hostenv.getText(_798); -this.templateCssPath=null; -} -dojo.widget._cssFiles[_798.toString()]=true; -} -if((this["templateCssString"])&&(!dojo.widget._cssStrings[this.templateCssString])){ -dojo.html.insertCssText(this.templateCssString,null,_798); -dojo.widget._cssStrings[this.templateCssString]=true; -} -if((!this.preventClobber)&&((this.templatePath)||(this.templateNode)||((this["templateString"])&&(this.templateString.length))||((typeof ts!="undefined")&&((ts["string"])||(ts["node"]))))){ -this.buildFromTemplate(args,frag); -}else{ -this.domNode=this.getFragNodeRef(frag); -} -this.fillInTemplate(args,frag); -},buildFromTemplate:function(args,frag){ -var _79b=false; -if(args["templatepath"]){ -args["templatePath"]=args["templatepath"]; -} -dojo.widget.fillFromTemplateCache(this,args["templatePath"],null,_79b); -var ts=dojo.widget._templateCache[this.templatePath?this.templatePath.toString():this.widgetType]; -if((ts)&&(!_79b)){ -if(!this.templateString.length){ -this.templateString=ts["string"]; -} -if(!this.templateNode){ -this.templateNode=ts["node"]; -} -} -var _79d=false; -var node=null; -var tstr=this.templateString; -if((!this.templateNode)&&(this.templateString)){ -_79d=this.templateString.match(/\$\{([^\}]+)\}/g); -if(_79d){ -var hash=this.strings||{}; -for(var key in dojo.widget.defaultStrings){ -if(dojo.lang.isUndefined(hash[key])){ -hash[key]=dojo.widget.defaultStrings[key]; -} -} -for(var i=0;i<_79d.length;i++){ -var key=_79d[i]; -key=key.substring(2,key.length-1); -var kval=(key.substring(0,5)=="this.")?dojo.lang.getObjPathValue(key.substring(5),this):hash[key]; -var _7a4; -if((kval)||(dojo.lang.isString(kval))){ -_7a4=new String((dojo.lang.isFunction(kval))?kval.call(this,key,this.templateString):kval); -while(_7a4.indexOf("\"")>-1){ -_7a4=_7a4.replace("\"","""); -} -tstr=tstr.replace(_79d[i],_7a4); -} -} -}else{ -this.templateNode=this.createNodesFromText(this.templateString,true)[0]; -if(!_79b){ -ts.node=this.templateNode; -} -} -} -if((!this.templateNode)&&(!_79d)){ -dojo.debug("DomWidget.buildFromTemplate: could not create template"); -return false; -}else{ -if(!_79d){ -node=this.templateNode.cloneNode(true); -if(!node){ -return false; -} -}else{ -node=this.createNodesFromText(tstr,true)[0]; -} -} -this.domNode=node; -this.attachTemplateNodes(); -if(this.isContainer&&this.containerNode){ -var src=this.getFragNodeRef(frag); -if(src){ -dojo.dom.moveChildren(src,this.containerNode); -} -} -},attachTemplateNodes:function(_7a6,_7a7){ -if(!_7a6){ -_7a6=this.domNode; -} -if(!_7a7){ -_7a7=this; -} -return dojo.widget.attachTemplateNodes(_7a6,_7a7,dojo.widget.getDojoEventsFromStr(this.templateString)); -},fillInTemplate:function(){ -},destroyRendering:function(){ -try{ -dojo.dom.destroyNode(this.domNode); -delete this.domNode; -} -catch(e){ -} -if(this._sourceNodeRef){ -try{ -dojo.dom.destroyNode(this._sourceNodeRef); -} -catch(e){ -} -} -},createNodesFromText:function(){ -dojo.unimplemented("dojo.widget.DomWidget.createNodesFromText"); -}}); -dojo.provide("dojo.html.util"); -dojo.html.getElementWindow=function(_7a8){ -return dojo.html.getDocumentWindow(_7a8.ownerDocument); -}; -dojo.html.getDocumentWindow=function(doc){ -if(dojo.render.html.safari&&!doc._parentWindow){ -var fix=function(win){ -win.document._parentWindow=win; -for(var i=0;i=left&&_7b7.x<=_7bd&&_7b7.y>=top&&_7b7.y<=_7bb); -}; -dojo.html.renderedTextContent=function(node){ -node=dojo.byId(node); -var _7bf=""; -if(node==null){ -return _7bf; -} -for(var i=0;i]/i).test(txt.replace(/^\s+/))){ -txt=""+txt+"
"; -_7c8="cell"; -}else{ -if((/^]/i).test(txt.replace(/^\s+/))){ -txt=""+txt+"
"; -_7c8="row"; -}else{ -if((/^<(thead|tbody|tfoot)[\s\r\n>]/i).test(txt.replace(/^\s+/))){ -txt=""+txt+"
"; -_7c8="section"; -} -} -} -tn.innerHTML=txt; -if(tn["normalize"]){ -tn.normalize(); -} -var _7c9=null; -switch(_7c8){ -case "cell": -_7c9=tn.getElementsByTagName("tr")[0]; -break; -case "row": -_7c9=tn.getElementsByTagName("tbody")[0]; -break; -case "section": -_7c9=tn.getElementsByTagName("table")[0]; -break; -default: -_7c9=tn; -break; -} -var _7ca=[]; -for(var x=0;x<_7c9.childNodes.length;x++){ -_7ca.push(_7c9.childNodes[x].cloneNode(true)); -} -tn.style.display="none"; -dojo.html.destroyNode(tn); -return _7ca; -}; -dojo.html.placeOnScreen=function(node,_7cd,_7ce,_7cf,_7d0,_7d1,_7d2){ -if(_7cd instanceof Array||typeof _7cd=="array"){ -_7d2=_7d1; -_7d1=_7d0; -_7d0=_7cf; -_7cf=_7ce; -_7ce=_7cd[1]; -_7cd=_7cd[0]; -} -if(_7d1 instanceof String||typeof _7d1=="string"){ -_7d1=_7d1.split(","); -} -if(!isNaN(_7cf)){ -_7cf=[Number(_7cf),Number(_7cf)]; -}else{ -if(!(_7cf instanceof Array||typeof _7cf=="array")){ -_7cf=[0,0]; -} -} -var _7d3=dojo.html.getScroll().offset; -var view=dojo.html.getViewport(); -node=dojo.byId(node); -var _7d5=node.style.display; -node.style.display=""; -var bb=dojo.html.getBorderBox(node); -var w=bb.width; -var h=bb.height; -node.style.display=_7d5; -if(!(_7d1 instanceof Array||typeof _7d1=="array")){ -_7d1=["TL"]; -} -var _7d9,_7da,_7db=Infinity,_7dc; -for(var _7dd=0;_7dd<_7d1.length;++_7dd){ -var _7de=_7d1[_7dd]; -var _7df=true; -var tryX=_7cd-(_7de.charAt(1)=="L"?0:w)+_7cf[0]*(_7de.charAt(1)=="L"?1:-1); -var tryY=_7ce-(_7de.charAt(0)=="T"?0:h)+_7cf[1]*(_7de.charAt(0)=="T"?1:-1); -if(_7d0){ -tryX-=_7d3.x; -tryY-=_7d3.y; -} -if(tryX<0){ -tryX=0; -_7df=false; -} -if(tryY<0){ -tryY=0; -_7df=false; -} -var x=tryX+w; -if(x>view.width){ -x=view.width-w; -_7df=false; -}else{ -x=tryX; -} -x=Math.max(_7cf[0],x)+_7d3.x; -var y=tryY+h; -if(y>view.height){ -y=view.height-h; -_7df=false; -}else{ -y=tryY; -} -y=Math.max(_7cf[1],y)+_7d3.y; -if(_7df){ -_7d9=x; -_7da=y; -_7db=0; -_7dc=_7de; -break; -}else{ -var dist=Math.pow(x-tryX-_7d3.x,2)+Math.pow(y-tryY-_7d3.y,2); -if(_7db>dist){ -_7db=dist; -_7d9=x; -_7da=y; -_7dc=_7de; -} -} -} -if(!_7d2){ -node.style.left=_7d9+"px"; -node.style.top=_7da+"px"; -} -return {left:_7d9,top:_7da,x:_7d9,y:_7da,dist:_7db,corner:_7dc}; -}; -dojo.html.placeOnScreenPoint=function(node,_7e6,_7e7,_7e8,_7e9){ -dojo.deprecated("dojo.html.placeOnScreenPoint","use dojo.html.placeOnScreen() instead","0.5"); -return dojo.html.placeOnScreen(node,_7e6,_7e7,_7e8,_7e9,["TL","TR","BL","BR"]); -}; -dojo.html.placeOnScreenAroundElement=function(node,_7eb,_7ec,_7ed,_7ee,_7ef){ -var best,_7f1=Infinity; -_7eb=dojo.byId(_7eb); -var _7f2=_7eb.style.display; -_7eb.style.display=""; -var mb=dojo.html.getElementBox(_7eb,_7ed); -var _7f4=mb.width; -var _7f5=mb.height; -var _7f6=dojo.html.getAbsolutePosition(_7eb,true,_7ed); -_7eb.style.display=_7f2; -for(var _7f7 in _7ee){ -var pos,_7f9,_7fa; -var _7fb=_7ee[_7f7]; -_7f9=_7f6.x+(_7f7.charAt(1)=="L"?0:_7f4); -_7fa=_7f6.y+(_7f7.charAt(0)=="T"?0:_7f5); -pos=dojo.html.placeOnScreen(node,_7f9,_7fa,_7ec,true,_7fb,true); -if(pos.dist==0){ -best=pos; -break; -}else{ -if(_7f1>pos.dist){ -_7f1=pos.dist; -best=pos; -} -} -} -if(!_7ef){ -node.style.left=best.left+"px"; -node.style.top=best.top+"px"; -} -return best; -}; -dojo.html.scrollIntoView=function(node){ -if(!node){ -return; -} -if(dojo.render.html.ie){ -if(dojo.html.getBorderBox(node.parentNode).height<=node.parentNode.scrollHeight){ -node.scrollIntoView(false); -} -}else{ -if(dojo.render.html.mozilla){ -node.scrollIntoView(false); -}else{ -var _7fd=node.parentNode; -var _7fe=_7fd.scrollTop+dojo.html.getBorderBox(_7fd).height; -var _7ff=node.offsetTop+dojo.html.getMarginBox(node).height; -if(_7fe<_7ff){ -_7fd.scrollTop+=(_7ff-_7fe); -}else{ -if(_7fd.scrollTop>node.offsetTop){ -_7fd.scrollTop-=(_7fd.scrollTop-node.offsetTop); -} -} -} -} -}; -dojo.provide("dojo.lfx.toggle"); -dojo.lfx.toggle.plain={show:function(node,_801,_802,_803){ -dojo.html.show(node); -if(dojo.lang.isFunction(_803)){ -_803(); -} -},hide:function(node,_805,_806,_807){ -dojo.html.hide(node); -if(dojo.lang.isFunction(_807)){ -_807(); -} -}}; -dojo.lfx.toggle.fade={show:function(node,_809,_80a,_80b){ -dojo.lfx.fadeShow(node,_809,_80a,_80b).play(); -},hide:function(node,_80d,_80e,_80f){ -dojo.lfx.fadeHide(node,_80d,_80e,_80f).play(); -}}; -dojo.lfx.toggle.wipe={show:function(node,_811,_812,_813){ -dojo.lfx.wipeIn(node,_811,_812,_813).play(); -},hide:function(node,_815,_816,_817){ -dojo.lfx.wipeOut(node,_815,_816,_817).play(); -}}; -dojo.lfx.toggle.explode={show:function(node,_819,_81a,_81b,_81c){ -dojo.lfx.explode(_81c||{x:0,y:0,width:0,height:0},node,_819,_81a,_81b).play(); -},hide:function(node,_81e,_81f,_820,_821){ -dojo.lfx.implode(node,_821||{x:0,y:0,width:0,height:0},_81e,_81f,_820).play(); -}}; -dojo.provide("dojo.widget.HtmlWidget"); -dojo.declare("dojo.widget.HtmlWidget",dojo.widget.DomWidget,{templateCssPath:null,templatePath:null,lang:"",toggle:"plain",toggleDuration:150,initialize:function(args,frag){ -},postMixInProperties:function(args,frag){ -if(this.lang===""){ -this.lang=null; -} -this.toggleObj=dojo.lfx.toggle[this.toggle.toLowerCase()]||dojo.lfx.toggle.plain; -},createNodesFromText:function(txt,wrap){ -return dojo.html.createNodesFromText(txt,wrap); -},destroyRendering:function(_828){ -try{ -if(this.bgIframe){ -this.bgIframe.remove(); -delete this.bgIframe; -} -if(!_828&&this.domNode){ -dojo.event.browser.clean(this.domNode); -} -dojo.widget.HtmlWidget.superclass.destroyRendering.call(this); -} -catch(e){ -} -},isShowing:function(){ -return dojo.html.isShowing(this.domNode); -},toggleShowing:function(){ -if(this.isShowing()){ -this.hide(); -}else{ -this.show(); -} -},show:function(){ -if(this.isShowing()){ -return; -} -this.animationInProgress=true; -this.toggleObj.show(this.domNode,this.toggleDuration,null,dojo.lang.hitch(this,this.onShow),this.explodeSrc); -},onShow:function(){ -this.animationInProgress=false; -this.checkSize(); -},hide:function(){ -if(!this.isShowing()){ -return; -} -this.animationInProgress=true; -this.toggleObj.hide(this.domNode,this.toggleDuration,null,dojo.lang.hitch(this,this.onHide),this.explodeSrc); -},onHide:function(){ -this.animationInProgress=false; -},_isResized:function(w,h){ -if(!this.isShowing()){ -return false; -} -var wh=dojo.html.getMarginBox(this.domNode); -var _82c=w||wh.width; -var _82d=h||wh.height; -if(this.width==_82c&&this.height==_82d){ -return false; -} -this.width=_82c; -this.height=_82d; -return true; -},checkSize:function(){ -if(!this._isResized()){ -return; -} -this.onResized(); -},resizeTo:function(w,h){ -dojo.html.setMarginBox(this.domNode,{width:w,height:h}); -if(this.isShowing()){ -this.onResized(); -} -},resizeSoon:function(){ -if(this.isShowing()){ -dojo.lang.setTimeout(this,this.onResized,0); -} -},onResized:function(){ -dojo.lang.forEach(this.children,function(_830){ -if(_830.checkSize){ -_830.checkSize(); -} -}); -}}); -dojo.kwCompoundRequire({common:["dojo.xml.Parse","dojo.widget.Widget","dojo.widget.Parse","dojo.widget.Manager"],browser:["dojo.widget.DomWidget","dojo.widget.HtmlWidget"],dashboard:["dojo.widget.DomWidget","dojo.widget.HtmlWidget"],svg:["dojo.widget.SvgWidget"],rhino:["dojo.widget.SwtWidget"]}); -dojo.provide("dojo.widget.*"); -dojo.kwCompoundRequire({common:["dojo.html.common","dojo.html.style"]}); -dojo.provide("dojo.html.*"); -dojo.provide("dojo.html.selection"); -dojo.html.selectionType={NONE:0,TEXT:1,CONTROL:2}; -dojo.html.clearSelection=function(){ -var _831=dojo.global(); -var _832=dojo.doc(); -try{ -if(_831["getSelection"]){ -if(dojo.render.html.safari){ -_831.getSelection().collapse(); -}else{ -_831.getSelection().removeAllRanges(); -} -}else{ -if(_832.selection){ -if(_832.selection.empty){ -_832.selection.empty(); -}else{ -if(_832.selection.clear){ -_832.selection.clear(); -} -} -} -} -return true; -} -catch(e){ -dojo.debug(e); -return false; -} -}; -dojo.html.disableSelection=function(_833){ -_833=dojo.byId(_833)||dojo.body(); -var h=dojo.render.html; -if(h.mozilla){ -_833.style.MozUserSelect="none"; -}else{ -if(h.safari){ -_833.style.KhtmlUserSelect="none"; -}else{ -if(h.ie){ -_833.unselectable="on"; -}else{ -return false; -} -} -} -return true; -}; -dojo.html.enableSelection=function(_835){ -_835=dojo.byId(_835)||dojo.body(); -var h=dojo.render.html; -if(h.mozilla){ -_835.style.MozUserSelect=""; -}else{ -if(h.safari){ -_835.style.KhtmlUserSelect=""; -}else{ -if(h.ie){ -_835.unselectable="off"; -}else{ -return false; -} -} -} -return true; -}; -dojo.html.selectElement=function(_837){ -dojo.deprecated("dojo.html.selectElement","replaced by dojo.html.selection.selectElementChildren",0.5); -}; -dojo.html.selectInputText=function(_838){ -var _839=dojo.global(); -var _83a=dojo.doc(); -_838=dojo.byId(_838); -if(_83a["selection"]&&dojo.body()["createTextRange"]){ -var _83b=_838.createTextRange(); -_83b.moveStart("character",0); -_83b.moveEnd("character",_838.value.length); -_83b.select(); -}else{ -if(_839["getSelection"]){ -var _83c=_839.getSelection(); -_838.setSelectionRange(0,_838.value.length); -} -} -_838.focus(); -}; -dojo.html.isSelectionCollapsed=function(){ -dojo.deprecated("dojo.html.isSelectionCollapsed","replaced by dojo.html.selection.isCollapsed",0.5); -return dojo.html.selection.isCollapsed(); -}; -dojo.lang.mixin(dojo.html.selection,{getType:function(){ -if(dojo.doc()["selection"]){ -return dojo.html.selectionType[dojo.doc().selection.type.toUpperCase()]; -}else{ -var _83d=dojo.html.selectionType.TEXT; -var oSel; -try{ -oSel=dojo.global().getSelection(); -} -catch(e){ -} -if(oSel&&oSel.rangeCount==1){ -var _83f=oSel.getRangeAt(0); -if(_83f.startContainer==_83f.endContainer&&(_83f.endOffset-_83f.startOffset)==1&&_83f.startContainer.nodeType!=dojo.dom.TEXT_NODE){ -_83d=dojo.html.selectionType.CONTROL; -} -} -return _83d; -} -},isCollapsed:function(){ -var _840=dojo.global(); -var _841=dojo.doc(); -if(_841["selection"]){ -return _841.selection.createRange().text==""; -}else{ -if(_840["getSelection"]){ -var _842=_840.getSelection(); -if(dojo.lang.isString(_842)){ -return _842==""; -}else{ -return _842.isCollapsed||_842.toString()==""; -} -} -} -},getSelectedElement:function(){ -if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){ -if(dojo.doc()["selection"]){ -var _843=dojo.doc().selection.createRange(); -if(_843&&_843.item){ -return dojo.doc().selection.createRange().item(0); -} -}else{ -var _844=dojo.global().getSelection(); -return _844.anchorNode.childNodes[_844.anchorOffset]; -} -} -},getParentElement:function(){ -if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){ -var p=dojo.html.selection.getSelectedElement(); -if(p){ -return p.parentNode; -} -}else{ -if(dojo.doc()["selection"]){ -return dojo.doc().selection.createRange().parentElement(); -}else{ -var _846=dojo.global().getSelection(); -if(_846){ -var node=_846.anchorNode; -while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){ -node=node.parentNode; -} -return node; -} -} -} -},getSelectedText:function(){ -if(dojo.doc()["selection"]){ -if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){ -return null; -} -return dojo.doc().selection.createRange().text; -}else{ -var _848=dojo.global().getSelection(); -if(_848){ -return _848.toString(); -} -} -},getSelectedHtml:function(){ -if(dojo.doc()["selection"]){ -if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){ -return null; -} -return dojo.doc().selection.createRange().htmlText; -}else{ -var _849=dojo.global().getSelection(); -if(_849&&_849.rangeCount){ -var frag=_849.getRangeAt(0).cloneContents(); -var div=document.createElement("div"); -div.appendChild(frag); -return div.innerHTML; -} -return null; -} -},hasAncestorElement:function(_84c){ -return (dojo.html.selection.getAncestorElement.apply(this,arguments)!=null); -},getAncestorElement:function(_84d){ -var node=dojo.html.selection.getSelectedElement()||dojo.html.selection.getParentElement(); -while(node){ -if(dojo.html.selection.isTag(node,arguments).length>0){ -return node; -} -node=node.parentNode; -} -return null; -},isTag:function(node,tags){ -if(node&&node.tagName){ -for(var i=0;i=0)){ -this._fire(); -} -},_continue:function(res){ -this._resback(res); -this._unpause(); -},_resback:function(res){ -this.fired=((res instanceof Error)?1:0); -this.results[this.fired]=res; -this._fire(); -},_check:function(){ -if(this.fired!=-1){ -if(!this.silentlyCancelled){ -dojo.raise("already called!"); -} -this.silentlyCancelled=false; -return; -} -},callback:function(res){ -this._check(); -this._resback(res); -},errback:function(res){ -this._check(); -if(!(res instanceof Error)){ -res=new Error(res); -} -this._resback(res); -},addBoth:function(cb,cbfn){ -var _874=this.getFunctionFromArgs(cb,cbfn); -if(arguments.length>2){ -_874=dojo.lang.curryArguments(null,_874,arguments,2); -} -return this.addCallbacks(_874,_874); -},addCallback:function(cb,cbfn){ -var _877=this.getFunctionFromArgs(cb,cbfn); -if(arguments.length>2){ -_877=dojo.lang.curryArguments(null,_877,arguments,2); -} -return this.addCallbacks(_877,null); -},addErrback:function(cb,cbfn){ -var _87a=this.getFunctionFromArgs(cb,cbfn); -if(arguments.length>2){ -_87a=dojo.lang.curryArguments(null,_87a,arguments,2); -} -return this.addCallbacks(null,_87a); -return this.addCallbacks(null,cbfn); -},addCallbacks:function(cb,eb){ -this.chain.push([cb,eb]); -if(this.fired>=0){ -this._fire(); -} -return this; -},_fire:function(){ -var _87d=this.chain; -var _87e=this.fired; -var res=this.results[_87e]; -var self=this; -var cb=null; -while(_87d.length>0&&this.paused==0){ -var pair=_87d.shift(); -var f=pair[_87e]; -if(f==null){ -continue; -} -try{ -res=f(res); -_87e=((res instanceof Error)?1:0); -if(res instanceof dojo.Deferred){ -cb=function(res){ -self._continue(res); -}; -this._pause(); -} -} -catch(err){ -_87e=1; -res=err; -} -} -this.fired=_87e; -this.results[_87e]=res; -if((cb)&&(this.paused)){ -res.addBoth(cb); -} -}}); -dojo.provide("dojo.widget.RichText"); -if(!djConfig["useXDomain"]||djConfig["allowXdRichTextSave"]){ -if(dojo.hostenv.post_load_){ -(function(){ -var _885=dojo.doc().createElement("textarea"); -_885.id="dojo.widget.RichText.savedContent"; -_885.style="display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;"; -dojo.body().appendChild(_885); -})(); -}else{ -try{ -dojo.doc().write(""); -} -catch(e){ -} -} -} -dojo.widget.defineWidget("dojo.widget.RichText",dojo.widget.HtmlWidget,function(){ -this.contentPreFilters=[]; -this.contentPostFilters=[]; -this.contentDomPreFilters=[]; -this.contentDomPostFilters=[]; -this.editingAreaStyleSheets=[]; -if(dojo.render.html.moz){ -this.contentPreFilters.push(this._fixContentForMoz); -} -this._keyHandlers={}; -if(dojo.Deferred){ -this.onLoadDeferred=new dojo.Deferred(); -} -},{inheritWidth:false,focusOnLoad:false,saveName:"",styleSheets:"",_content:"",height:"",minHeight:"1em",isClosed:true,isLoaded:false,useActiveX:false,relativeImageUrls:false,_SEPARATOR:"@@**%%__RICHTEXTBOUNDRY__%%**@@",onLoadDeferred:null,fillInTemplate:function(){ -dojo.event.topic.publish("dojo.widget.RichText::init",this); -this.open(); -dojo.event.connect(this,"onKeyPressed",this,"afterKeyPress"); -dojo.event.connect(this,"onKeyPress",this,"keyPress"); -dojo.event.connect(this,"onKeyDown",this,"keyDown"); -dojo.event.connect(this,"onKeyUp",this,"keyUp"); -this.setupDefaultShortcuts(); -},setupDefaultShortcuts:function(){ -var ctrl=this.KEY_CTRL; -var exec=function(cmd,arg){ -return arguments.length==1?function(){ -this.execCommand(cmd); -}:function(){ -this.execCommand(cmd,arg); -}; -}; -this.addKeyHandler("b",ctrl,exec("bold")); -this.addKeyHandler("i",ctrl,exec("italic")); -this.addKeyHandler("u",ctrl,exec("underline")); -this.addKeyHandler("a",ctrl,exec("selectall")); -this.addKeyHandler("s",ctrl,function(){ -this.save(true); -}); -this.addKeyHandler("1",ctrl,exec("formatblock","h1")); -this.addKeyHandler("2",ctrl,exec("formatblock","h2")); -this.addKeyHandler("3",ctrl,exec("formatblock","h3")); -this.addKeyHandler("4",ctrl,exec("formatblock","h4")); -this.addKeyHandler("\\",ctrl,exec("insertunorderedlist")); -if(!dojo.render.html.ie){ -this.addKeyHandler("Z",ctrl,exec("redo")); -} -},events:["onBlur","onFocus","onKeyPress","onKeyDown","onKeyUp","onClick"],open:function(_88a){ -if(this.onLoadDeferred.fired>=0){ -this.onLoadDeferred=new dojo.Deferred(); -} -var h=dojo.render.html; -if(!this.isClosed){ -this.close(); -} -dojo.event.topic.publish("dojo.widget.RichText::open",this); -this._content=""; -if((arguments.length==1)&&(_88a["nodeName"])){ -this.domNode=_88a; -} -if((this.domNode["nodeName"])&&(this.domNode.nodeName.toLowerCase()=="textarea")){ -this.textarea=this.domNode; -var html=this._preFilterContent(this.textarea.value); -this.domNode=dojo.doc().createElement("div"); -dojo.html.copyStyle(this.domNode,this.textarea); -var _88d=dojo.lang.hitch(this,function(){ -with(this.textarea.style){ -display="block"; -position="absolute"; -left=top="-1000px"; -if(h.ie){ -this.__overflow=overflow; -overflow="hidden"; -} -} -}); -if(h.ie){ -setTimeout(_88d,10); -}else{ -_88d(); -} -if(!h.safari){ -dojo.html.insertBefore(this.domNode,this.textarea); -} -if(this.textarea.form){ -dojo.event.connect("before",this.textarea.form,"onsubmit",dojo.lang.hitch(this,function(){ -this.textarea.value=this.getEditorContent(); -})); -} -var _88e=this; -dojo.event.connect(this,"postCreate",function(){ -dojo.html.insertAfter(_88e.textarea,_88e.domNode); -}); -}else{ -var html=this._preFilterContent(dojo.string.trim(this.domNode.innerHTML)); -} -if(html==""){ -html=" "; -} -var _88f=dojo.html.getContentBox(this.domNode); -this._oldHeight=_88f.height; -this._oldWidth=_88f.width; -this._firstChildContributingMargin=this._getContributingMargin(this.domNode,"top"); -this._lastChildContributingMargin=this._getContributingMargin(this.domNode,"bottom"); -this.savedContent=html; -this.domNode.innerHTML=""; -this.editingArea=dojo.doc().createElement("div"); -this.domNode.appendChild(this.editingArea); -if((this.domNode["nodeName"])&&(this.domNode.nodeName=="LI")){ -this.domNode.innerHTML="
"; -} -if(this.saveName!=""&&(!djConfig["useXDomain"]||djConfig["allowXdRichTextSave"])){ -var _890=dojo.doc().getElementById("dojo.widget.RichText.savedContent"); -if(_890.value!=""){ -var _891=_890.value.split(this._SEPARATOR); -for(var i=0;i<_891.length;i++){ -var data=_891[i].split(":"); -if(data[0]==this.saveName){ -html=data[1]; -_891.splice(i,1); -break; -} -} -} -dojo.event.connect("before",window,"onunload",this,"_saveContent"); -} -if(h.ie70&&this.useActiveX){ -dojo.debug("activeX in ie70 is not currently supported, useActiveX is ignored for now."); -this.useActiveX=false; -} -if(this.useActiveX&&h.ie){ -var self=this; -setTimeout(function(){ -self._drawObject(html); -},0); -}else{ -if(h.ie||this._safariIsLeopard()||h.opera){ -this.iframe=dojo.doc().createElement("iframe"); -this.iframe.src="javascript:void(0)"; -this.editorObject=this.iframe; -with(this.iframe.style){ -border="0"; -width="100%"; -} -this.iframe.frameBorder=0; -this.editingArea.appendChild(this.iframe); -this.window=this.iframe.contentWindow; -this.document=this.window.document; -this.document.open(); -this.document.write("
"); -this.document.close(); -this.editNode=this.document.body.firstChild; -this.editNode.contentEditable=true; -with(this.iframe.style){ -if(h.ie70){ -if(this.height){ -height=this.height; -} -if(this.minHeight){ -minHeight=this.minHeight; -} -}else{ -height=this.height?this.height:this.minHeight; -} -} -var _895=["p","pre","address","h1","h2","h3","h4","h5","h6","ol","div","ul"]; -var _896=""; -for(var i in _895){ -if(_895[i].charAt(1)!="l"){ -_896+="<"+_895[i]+">content"; -}else{ -_896+="<"+_895[i]+">
  • content
  • "; -} -} -with(this.editNode.style){ -position="absolute"; -left="-2000px"; -top="-2000px"; -} -this.editNode.innerHTML=_896; -var node=this.editNode.firstChild; -while(node){ -dojo.withGlobal(this.window,"selectElement",dojo.html.selection,[node.firstChild]); -var _898=node.tagName.toLowerCase(); -this._local2NativeFormatNames[_898]=this.queryCommandValue("formatblock"); -this._native2LocalFormatNames[this._local2NativeFormatNames[_898]]=_898; -node=node.nextSibling; -} -with(this.editNode.style){ -position=""; -left=""; -top=""; -} -this.editNode.innerHTML=html; -if(this.height){ -this.document.body.style.overflowY="scroll"; -} -dojo.lang.forEach(this.events,function(e){ -dojo.event.connect(this.editNode,e.toLowerCase(),this,e); -},this); -this.onLoad(); -}else{ -this._drawIframe(html); -this.editorObject=this.iframe; -} -} -if(this.domNode.nodeName=="LI"){ -this.domNode.lastChild.style.marginTop="-1.2em"; -} -dojo.html.addClass(this.domNode,"RichTextEditable"); -this.isClosed=false; -},_hasCollapseableMargin:function(_89a,side){ -if(dojo.html.getPixelValue(_89a,"border-"+side+"-width",false)){ -return false; -}else{ -if(dojo.html.getPixelValue(_89a,"padding-"+side,false)){ -return false; -}else{ -return true; -} -} -},_getContributingMargin:function(_89c,_89d){ -if(_89d=="top"){ -var _89e="previousSibling"; -var _89f="nextSibling"; -var _8a0="firstChild"; -var _8a1="margin-top"; -var _8a2="margin-bottom"; -}else{ -var _89e="nextSibling"; -var _89f="previousSibling"; -var _8a0="lastChild"; -var _8a1="margin-bottom"; -var _8a2="margin-top"; -} -var _8a3=dojo.html.getPixelValue(_89c,_8a1,false); -function isSignificantNode(_8a4){ -return !(_8a4.nodeType==3&&dojo.string.isBlank(_8a4.data))&&dojo.html.getStyle(_8a4,"display")!="none"&&!dojo.html.isPositionAbsolute(_8a4); -} -var _8a5=0; -var _8a6=_89c[_8a0]; -while(_8a6){ -while((!isSignificantNode(_8a6))&&_8a6[_89f]){ -_8a6=_8a6[_89f]; -} -_8a5=Math.max(_8a5,dojo.html.getPixelValue(_8a6,_8a1,false)); -if(!this._hasCollapseableMargin(_8a6,_89d)){ -break; -} -_8a6=_8a6[_8a0]; -} -if(!this._hasCollapseableMargin(_89c,_89d)){ -return parseInt(_8a5); -} -var _8a7=0; -var _8a8=_89c[_89e]; -while(_8a8){ -if(isSignificantNode(_8a8)){ -_8a7=dojo.html.getPixelValue(_8a8,_8a2,false); -break; -} -_8a8=_8a8[_89e]; -} -if(!_8a8){ -_8a7=dojo.html.getPixelValue(_89c.parentNode,_8a1,false); -} -if(_8a5>_8a3){ -return parseInt(Math.max((_8a5-_8a3)-_8a7,0)); -}else{ -return 0; -} -},_drawIframe:function(html){ -var _8aa=Boolean(dojo.render.html.moz&&(typeof window.XML=="undefined")); -if(!this.iframe){ -var _8ab=(new dojo.uri.Uri(dojo.doc().location)).host; -this.iframe=dojo.doc().createElement("iframe"); -with(this.iframe){ -style.border="none"; -style.lineHeight="0"; -style.verticalAlign="bottom"; -scrolling=this.height?"auto":"no"; -} -} -if(djConfig["useXDomain"]&&!djConfig["dojoRichTextFrameUrl"]){ -dojo.debug("dojo.widget.RichText: When using cross-domain Dojo builds,"+" please save src/widget/templates/richtextframe.html to your domain and set djConfig.dojoRichTextFrameUrl"+" to the path on your domain to richtextframe.html"); -} -this.iframe.src=(djConfig["dojoRichTextFrameUrl"]||dojo.uri.moduleUri("dojo.widget","templates/richtextframe.html"))+((dojo.doc().domain!=_8ab)?("#"+dojo.doc().domain):""); -this.iframe.width=this.inheritWidth?this._oldWidth:"100%"; -if(this.height){ -this.iframe.style.height=this.height; -}else{ -var _8ac=this._oldHeight; -if(this._hasCollapseableMargin(this.domNode,"top")){ -_8ac+=this._firstChildContributingMargin; -} -if(this._hasCollapseableMargin(this.domNode,"bottom")){ -_8ac+=this._lastChildContributingMargin; -} -this.iframe.height=_8ac; -} -var _8ad=dojo.doc().createElement("div"); -_8ad.innerHTML=html; -this.editingArea.appendChild(_8ad); -if(this.relativeImageUrls){ -var imgs=_8ad.getElementsByTagName("img"); -for(var i=0;i *:first-child{padding-top:0 !important;margin-top:"+this._firstChildContributingMargin+"px !important;}"+"body > *:last-child{padding-bottom:0 !important;margin-bottom:"+this._lastChildContributingMargin+"px !important;}"+"li > ul:-moz-first-node, li > ol:-moz-first-node{padding-top:1.2em;}\n"+"li{min-height:1.2em;}"+"",this.document); -dojo.html.removeNode(_8ad); -this.document.body.innerHTML=html; -if(_8aa||dojo.render.html.safari){ -this.document.designMode="on"; -} -this.onLoad(); -}else{ -dojo.html.removeNode(_8ad); -this.editNode.innerHTML=html; -this.onDisplayChanged(); -} -}); -if(this.editNode){ -_8b3(); -}else{ -if(dojo.render.html.moz){ -this.iframe.onload=function(){ -setTimeout(_8b3,250); -}; -}else{ -this.iframe.onload=_8b3; -} -} -},_applyEditingAreaStyleSheets:function(){ -var _8ba=[]; -if(this.styleSheets){ -_8ba=this.styleSheets.split(";"); -this.styleSheets=""; -} -_8ba=_8ba.concat(this.editingAreaStyleSheets); -this.editingAreaStyleSheets=[]; -if(_8ba.length>0){ -for(var i=0;i<_8ba.length;i++){ -var url=_8ba[i]; -if(url){ -this.addStyleSheet(dojo.uri.dojoUri(url)); -} -} -} -},addStyleSheet:function(uri){ -var url=uri.toString(); -if(dojo.lang.find(this.editingAreaStyleSheets,url)>-1){ -dojo.debug("dojo.widget.RichText.addStyleSheet: Style sheet "+url+" is already applied to the editing area!"); -return; -} -if(url.charAt(0)=="."||(url.charAt(0)!="/"&&!uri.host)){ -url=(new dojo.uri.Uri(dojo.global().location,url)).toString(); -} -this.editingAreaStyleSheets.push(url); -if(this.document.createStyleSheet){ -this.document.createStyleSheet(url); -}else{ -var head=this.document.getElementsByTagName("head")[0]; -var _8c0=this.document.createElement("link"); -with(_8c0){ -rel="stylesheet"; -type="text/css"; -href=url; -} -head.appendChild(_8c0); -} -},removeStyleSheet:function(uri){ -var url=uri.toString(); -if(url.charAt(0)=="."||(url.charAt(0)!="/"&&!uri.host)){ -url=(new dojo.uri.Uri(dojo.global().location,url)).toString(); -} -var _8c3=dojo.lang.find(this.editingAreaStyleSheets,url); -if(_8c3==-1){ -dojo.debug("dojo.widget.RichText.removeStyleSheet: Style sheet "+url+" is not applied to the editing area so it can not be removed!"); -return; -} -delete this.editingAreaStyleSheets[_8c3]; -var _8c4=this.document.getElementsByTagName("link"); -for(var i=0;i<_8c4.length;i++){ -if(_8c4[i].href==url){ -if(dojo.render.html.ie){ -_8c4[i].href=""; -} -dojo.html.removeNode(_8c4[i]); -break; -} -} -},_drawObject:function(html){ -this.object=dojo.html.createExternalElement(dojo.doc(),"object"); -with(this.object){ -classid="clsid:2D360201-FFF5-11D1-8D03-00A0C959BC0A"; -width=this.inheritWidth?this._oldWidth:"100%"; -style.height=this.height?this.height:(this._oldHeight+"px"); -Scrollbars=this.height?true:false; -Appearance=this._activeX.appearance.flat; -} -this.editorObject=this.object; -this.editingArea.appendChild(this.object); -this.object.attachEvent("DocumentComplete",dojo.lang.hitch(this,"onLoad")); -dojo.lang.forEach(this.events,function(e){ -this.object.attachEvent(e.toLowerCase(),dojo.lang.hitch(this,e)); -},this); -this.object.DocumentHTML=""+""+""+"
    "+html+"
    "; -this._cacheLocalBlockFormatNames(); -},_local2NativeFormatNames:{},_native2LocalFormatNames:{},_cacheLocalBlockFormatNames:function(){ -if(!this._native2LocalFormatNames["p"]){ -var obj=this.object; -var _8c9=false; -if(!obj){ -try{ -obj=dojo.html.createExternalElement(dojo.doc(),"object"); -obj.classid="clsid:2D360201-FFF5-11D1-8D03-00A0C959BC0A"; -dojo.body().appendChild(obj); -obj.DocumentHTML=""; -} -catch(e){ -_8c9=true; -} -} -try{ -var _8ca=new ActiveXObject("DEGetBlockFmtNamesParam.DEGetBlockFmtNamesParam"); -obj.ExecCommand(this._activeX.command["getblockformatnames"],0,_8ca); -var _8cb=new VBArray(_8ca.Names); -var _8cc=_8cb.toArray(); -var _8cd=["p","pre","address","h1","h2","h3","h4","h5","h6","ol","ul","","","","","div"]; -for(var i=0;i<_8cd.length;++i){ -if(_8cd[i].length>0){ -this._local2NativeFormatNames[_8cc[i]]=_8cd[i]; -this._native2LocalFormatNames[_8cd[i]]=_8cc[i]; -} -} -} -catch(e){ -_8c9=true; -} -if(obj&&!this.object){ -dojo.body().removeChild(obj); -} -} -return !_8c9; -},_isResized:function(){ -return false; -},onLoad:function(e){ -this.isLoaded=true; -if(this.object){ -this.document=this.object.DOM; -this.window=this.document.parentWindow; -this.editNode=this.document.body.firstChild; -this.editingArea.style.height=this.height?this.height:this.minHeight; -if(!this.height){ -this.connect(this,"onDisplayChanged","_updateHeight"); -} -this.window._frameElement=this.object; -}else{ -if(this.iframe&&!dojo.render.html.ie){ -this.editNode=this.document.body; -if(!this.height){ -this.connect(this,"onDisplayChanged","_updateHeight"); -} -try{ -this.document.execCommand("useCSS",false,true); -this.document.execCommand("styleWithCSS",false,false); -} -catch(e2){ -} -if(dojo.render.html.safari){ -this.connect(this.editNode,"onblur","onBlur"); -this.connect(this.editNode,"onfocus","onFocus"); -this.connect(this.editNode,"onclick","onFocus"); -this.interval=setInterval(dojo.lang.hitch(this,"onDisplayChanged"),750); -}else{ -if(dojo.render.html.mozilla||dojo.render.html.opera){ -var doc=this.document; -var _8d1=dojo.event.browser.addListener; -var self=this; -dojo.lang.forEach(this.events,function(e){ -var l=_8d1(self.document,e.substr(2).toLowerCase(),dojo.lang.hitch(self,e)); -if(e=="onBlur"){ -var _8d5={unBlur:function(e){ -dojo.event.browser.removeListener(doc,"blur",l); -}}; -dojo.event.connect("before",self,"close",_8d5,"unBlur"); -} -}); -} -} -}else{ -if(dojo.render.html.ie){ -if(!this.height){ -this.connect(this,"onDisplayChanged","_updateHeight"); -} -this.editNode.style.zoom=1; -} -} -} -this._applyEditingAreaStyleSheets(); -if(this.focusOnLoad){ -this.focus(); -} -this.onDisplayChanged(e); -if(this.onLoadDeferred){ -this.onLoadDeferred.callback(true); -} -},onKeyDown:function(e){ -if((!e)&&(this.object)){ -e=dojo.event.browser.fixEvent(this.window.event); -} -if((dojo.render.html.ie)&&(e.keyCode==e.KEY_TAB)){ -e.preventDefault(); -e.stopPropagation(); -this.execCommand((e.shiftKey?"outdent":"indent")); -}else{ -if(dojo.render.html.ie){ -if((65<=e.keyCode)&&(e.keyCode<=90)){ -e.charCode=e.keyCode; -this.onKeyPress(e); -} -} -} -},onKeyUp:function(e){ -return; -},KEY_CTRL:1,onKeyPress:function(e){ -if((!e)&&(this.object)){ -e=dojo.event.browser.fixEvent(this.window.event); -} -var _8da=e.ctrlKey?this.KEY_CTRL:0; -if(this._keyHandlers[e.key]){ -var _8db=this._keyHandlers[e.key],i=0,_8dd; -while(_8dd=_8db[i++]){ -if(_8da==_8dd.modifiers){ -e.preventDefault(); -_8dd.handler.call(this); -break; -} -} -} -dojo.lang.setTimeout(this,this.onKeyPressed,1,e); -},addKeyHandler:function(key,_8df,_8e0){ -if(!(this._keyHandlers[key] instanceof Array)){ -this._keyHandlers[key]=[]; -} -this._keyHandlers[key].push({modifiers:_8df||0,handler:_8e0}); -},onKeyPressed:function(e){ -this.onDisplayChanged(); -},onClick:function(e){ -this.onDisplayChanged(e); -},onBlur:function(e){ -},_initialFocus:true,onFocus:function(e){ -if((dojo.render.html.mozilla)&&(this._initialFocus)){ -this._initialFocus=false; -if(dojo.string.trim(this.editNode.innerHTML)==" "){ -this.placeCursorAtStart(); -} -} -},blur:function(){ -if(this.iframe){ -this.window.blur(); -}else{ -if(this.object){ -this.document.body.blur(); -}else{ -if(this.editNode){ -this.editNode.blur(); -} -} -} -},focus:function(){ -if(this.iframe&&!dojo.render.html.ie){ -this.window.focus(); -}else{ -if(this.object){ -this.document.focus(); -}else{ -if(this.editNode&&this.editNode.focus){ -this.editNode.focus(); -}else{ -dojo.debug("Have no idea how to focus into the editor!"); -} -} -} -},onDisplayChanged:function(e){ -},_activeX:{command:{bold:5000,italic:5023,underline:5048,justifycenter:5024,justifyleft:5025,justifyright:5026,cut:5003,copy:5002,paste:5032,"delete":5004,undo:5049,redo:5033,removeformat:5034,selectall:5035,unlink:5050,indent:5018,outdent:5031,insertorderedlist:5030,insertunorderedlist:5051,inserttable:5022,insertcell:5019,insertcol:5020,insertrow:5021,deletecells:5005,deletecols:5006,deleterows:5007,mergecells:5029,splitcell:5047,setblockformat:5043,getblockformat:5011,getblockformatnames:5012,setfontname:5044,getfontname:5013,setfontsize:5045,getfontsize:5014,setbackcolor:5042,getbackcolor:5010,setforecolor:5046,getforecolor:5015,findtext:5008,font:5009,hyperlink:5016,image:5017,lockelement:5027,makeabsolute:5028,sendbackward:5036,bringforward:5037,sendbelowtext:5038,bringabovetext:5039,sendtoback:5040,bringtofront:5041,properties:5052},ui:{"default":0,prompt:1,noprompt:2},status:{notsupported:0,disabled:1,enabled:3,latched:7,ninched:11},appearance:{flat:0,inset:1},state:{unchecked:0,checked:1,gray:2}},_normalizeCommand:function(cmd){ -var drh=dojo.render.html; -var _8e8=cmd.toLowerCase(); -if(_8e8=="formatblock"){ -if(drh.safari){ -_8e8="heading"; -} -}else{ -if(this.object){ -switch(_8e8){ -case "createlink": -_8e8="hyperlink"; -break; -case "insertimage": -_8e8="image"; -break; -} -}else{ -if(_8e8=="hilitecolor"&&!drh.mozilla){ -_8e8="backcolor"; -} -} -} -return _8e8; -},_safariIsLeopard:function(){ -var _8e9=false; -if(dojo.render.html.safari){ -var tmp=dojo.render.html.UA.split("AppleWebKit/")[1]; -var ver=parseFloat(tmp.split(" ")[0]); -if(ver>=420){ -_8e9=true; -} -} -return _8e9; -},queryCommandAvailable:function(_8ec){ -var ie=1; -var _8ee=1<<1; -var _8ef=1<<2; -var _8f0=1<<3; -var _8f1=1<<4; -var _8f2=this._safariIsLeopard(); -function isSupportedBy(_8f3){ -return {ie:Boolean(_8f3&ie),mozilla:Boolean(_8f3&_8ee),safari:Boolean(_8f3&_8ef),safari420:Boolean(_8f3&_8f1),opera:Boolean(_8f3&_8f0)}; -} -var _8f4=null; -switch(_8ec.toLowerCase()){ -case "bold": -case "italic": -case "underline": -case "subscript": -case "superscript": -case "fontname": -case "fontsize": -case "forecolor": -case "hilitecolor": -case "justifycenter": -case "justifyfull": -case "justifyleft": -case "justifyright": -case "delete": -case "selectall": -_8f4=isSupportedBy(_8ee|ie|_8ef|_8f0); -break; -case "createlink": -case "unlink": -case "removeformat": -case "inserthorizontalrule": -case "insertimage": -case "insertorderedlist": -case "insertunorderedlist": -case "indent": -case "outdent": -case "formatblock": -case "inserthtml": -case "undo": -case "redo": -case "strikethrough": -_8f4=isSupportedBy(_8ee|ie|_8f0|_8f1); -break; -case "blockdirltr": -case "blockdirrtl": -case "dirltr": -case "dirrtl": -case "inlinedirltr": -case "inlinedirrtl": -_8f4=isSupportedBy(ie); -break; -case "cut": -case "copy": -case "paste": -_8f4=isSupportedBy(ie|_8ee|_8f1); -break; -case "inserttable": -_8f4=isSupportedBy(_8ee|(this.object?ie:0)); -break; -case "insertcell": -case "insertcol": -case "insertrow": -case "deletecells": -case "deletecols": -case "deleterows": -case "mergecells": -case "splitcell": -_8f4=isSupportedBy(this.object?ie:0); -break; -default: -return false; -} -return (dojo.render.html.ie&&_8f4.ie)||(dojo.render.html.mozilla&&_8f4.mozilla)||(dojo.render.html.safari&&_8f4.safari)||(_8f2&&_8f4.safari420)||(dojo.render.html.opera&&_8f4.opera); -},execCommand:function(_8f5,_8f6){ -var _8f7; -this.focus(); -_8f5=this._normalizeCommand(_8f5); -if(_8f6!=undefined){ -if(_8f5=="heading"){ -throw new Error("unimplemented"); -}else{ -if(_8f5=="formatblock"){ -if(this.object){ -_8f6=this._native2LocalFormatNames[_8f6]; -}else{ -if(dojo.render.html.ie){ -_8f6="<"+_8f6+">"; -} -} -} -} -} -if(this.object){ -switch(_8f5){ -case "hilitecolor": -_8f5="setbackcolor"; -break; -case "forecolor": -case "backcolor": -case "fontsize": -case "fontname": -_8f5="set"+_8f5; -break; -case "formatblock": -_8f5="setblockformat"; -} -if(_8f5=="strikethrough"){ -_8f5="inserthtml"; -var _8f8=this.document.selection.createRange(); -if(!_8f8.htmlText){ -return; -} -_8f6=_8f8.htmlText.strike(); -}else{ -if(_8f5=="inserthorizontalrule"){ -_8f5="inserthtml"; -_8f6="
    "; -} -} -if(_8f5=="inserthtml"){ -var _8f8=this.document.selection.createRange(); -if(this.document.selection.type.toUpperCase()=="CONTROL"){ -for(var i=0;i<_8f8.length;i++){ -_8f8.item(i).outerHTML=_8f6; -} -}else{ -_8f8.pasteHTML(_8f6); -_8f8.select(); -} -_8f7=true; -}else{ -if(arguments.length==1){ -_8f7=this.object.ExecCommand(this._activeX.command[_8f5],this._activeX.ui.noprompt); -}else{ -_8f7=this.object.ExecCommand(this._activeX.command[_8f5],this._activeX.ui.noprompt,_8f6); -} -} -}else{ -if(_8f5=="inserthtml"){ -if(dojo.render.html.ie){ -var _8fa=this.document.selection.createRange(); -_8fa.pasteHTML(_8f6); -_8fa.select(); -return true; -}else{ -return this.document.execCommand(_8f5,false,_8f6); -} -}else{ -if((_8f5=="unlink")&&(this.queryCommandEnabled("unlink"))&&(dojo.render.html.mozilla)){ -var _8fb=this.window.getSelection(); -var _8fc=_8fb.getRangeAt(0); -var _8fd=_8fc.startContainer; -var _8fe=_8fc.startOffset; -var _8ff=_8fc.endContainer; -var _900=_8fc.endOffset; -var a=dojo.withGlobal(this.window,"getAncestorElement",dojo.html.selection,["a"]); -dojo.withGlobal(this.window,"selectElement",dojo.html.selection,[a]); -_8f7=this.document.execCommand("unlink",false,null); -var _8fc=this.document.createRange(); -_8fc.setStart(_8fd,_8fe); -_8fc.setEnd(_8ff,_900); -_8fb.removeAllRanges(); -_8fb.addRange(_8fc); -return _8f7; -}else{ -if((_8f5=="hilitecolor")&&(dojo.render.html.mozilla)){ -this.document.execCommand("useCSS",false,false); -_8f7=this.document.execCommand(_8f5,false,_8f6); -this.document.execCommand("useCSS",false,true); -}else{ -if((dojo.render.html.ie)&&((_8f5=="backcolor")||(_8f5=="forecolor"))){ -_8f6=arguments.length>1?_8f6:null; -_8f7=this.document.execCommand(_8f5,false,_8f6); -}else{ -_8f6=arguments.length>1?_8f6:null; -if(_8f6||_8f5!="createlink"){ -_8f7=this.document.execCommand(_8f5,false,_8f6); -} -} -} -} -} -} -this.onDisplayChanged(); -return _8f7; -},queryCommandEnabled:function(_902){ -_902=this._normalizeCommand(_902); -if(this.object){ -switch(_902){ -case "hilitecolor": -_902="setbackcolor"; -break; -case "forecolor": -case "backcolor": -case "fontsize": -case "fontname": -_902="set"+_902; -break; -case "formatblock": -_902="setblockformat"; -break; -case "strikethrough": -_902="bold"; -break; -case "inserthorizontalrule": -return true; -} -if(typeof this._activeX.command[_902]=="undefined"){ -return false; -} -var _903=this.object.QueryStatus(this._activeX.command[_902]); -return ((_903!=this._activeX.status.notsupported)&&(_903!=this._activeX.status.disabled)); -}else{ -if(dojo.render.html.mozilla){ -if(_902=="unlink"){ -return dojo.withGlobal(this.window,"hasAncestorElement",dojo.html.selection,["a"]); -}else{ -if(_902=="inserttable"){ -return true; -} -} -} -var elem=(dojo.render.html.ie)?this.document.selection.createRange():this.document; -return elem.queryCommandEnabled(_902); -} -},queryCommandState:function(_905){ -_905=this._normalizeCommand(_905); -if(this.object){ -if(_905=="forecolor"){ -_905="setforecolor"; -}else{ -if(_905=="backcolor"){ -_905="setbackcolor"; -}else{ -if(_905=="strikethrough"){ -return dojo.withGlobal(this.window,"hasAncestorElement",dojo.html.selection,["strike"]); -}else{ -if(_905=="inserthorizontalrule"){ -return false; -} -} -} -} -if(typeof this._activeX.command[_905]=="undefined"){ -return null; -} -var _906=this.object.QueryStatus(this._activeX.command[_905]); -return ((_906==this._activeX.status.latched)||(_906==this._activeX.status.ninched)); -}else{ -return this.document.queryCommandState(_905); -} -},queryCommandValue:function(_907){ -_907=this._normalizeCommand(_907); -if(this.object){ -switch(_907){ -case "forecolor": -case "backcolor": -case "fontsize": -case "fontname": -_907="get"+_907; -return this.object.execCommand(this._activeX.command[_907],this._activeX.ui.noprompt); -case "formatblock": -var _908=this.object.execCommand(this._activeX.command["getblockformat"],this._activeX.ui.noprompt); -if(_908){ -return this._local2NativeFormatNames[_908]; -} -} -}else{ -if(dojo.render.html.ie&&_907=="formatblock"){ -return this._local2NativeFormatNames[this.document.queryCommandValue(_907)]||this.document.queryCommandValue(_907); -} -return this.document.queryCommandValue(_907); -} -},placeCursorAtStart:function(){ -this.focus(); -if(dojo.render.html.moz&&this.editNode.firstChild&&this.editNode.firstChild.nodeType!=dojo.dom.TEXT_NODE){ -dojo.withGlobal(this.window,"selectElementChildren",dojo.html.selection,[this.editNode.firstChild]); -}else{ -dojo.withGlobal(this.window,"selectElementChildren",dojo.html.selection,[this.editNode]); -} -dojo.withGlobal(this.window,"collapse",dojo.html.selection,[true]); -},placeCursorAtEnd:function(){ -this.focus(); -if(dojo.render.html.moz&&this.editNode.lastChild&&this.editNode.lastChild.nodeType!=dojo.dom.TEXT_NODE){ -dojo.withGlobal(this.window,"selectElementChildren",dojo.html.selection,[this.editNode.lastChild]); -}else{ -dojo.withGlobal(this.window,"selectElementChildren",dojo.html.selection,[this.editNode]); -} -dojo.withGlobal(this.window,"collapse",dojo.html.selection,[false]); -},replaceEditorContent:function(html){ -html=this._preFilterContent(html); -if(this.isClosed){ -this.domNode.innerHTML=html; -}else{ -if(this.window&&this.window.getSelection&&!dojo.render.html.moz){ -this.editNode.innerHTML=html; -}else{ -if((this.window&&this.window.getSelection)||(this.document&&this.document.selection)){ -this.execCommand("selectall"); -if(dojo.render.html.moz&&!html){ -html=" "; -} -this.execCommand("inserthtml",html); -} -} -} -},_preFilterContent:function(html){ -var ec=html; -dojo.lang.forEach(this.contentPreFilters,function(ef){ -ec=ef(ec); -}); -if(this.contentDomPreFilters.length>0){ -var dom=dojo.doc().createElement("div"); -dom.style.display="none"; -dojo.body().appendChild(dom); -dom.innerHTML=ec; -dojo.lang.forEach(this.contentDomPreFilters,function(ef){ -dom=ef(dom); -}); -ec=dom.innerHTML; -dojo.body().removeChild(dom); -} -return ec; -},_postFilterContent:function(html){ -var ec=html; -if(this.contentDomPostFilters.length>0){ -var dom=this.document.createElement("div"); -dom.innerHTML=ec; -dojo.lang.forEach(this.contentDomPostFilters,function(ef){ -dom=ef(dom); -}); -ec=dom.innerHTML; -} -dojo.lang.forEach(this.contentPostFilters,function(ef){ -ec=ef(ec); -}); -return ec; -},_lastHeight:0,_updateHeight:function(){ -if(!this.isLoaded){ -return; -} -if(this.height){ -return; -} -var _914=dojo.html.getBorderBox(this.editNode).height; -if(!_914){ -_914=dojo.html.getBorderBox(this.document.body).height; -} -if(_914==0){ -dojo.debug("Can not figure out the height of the editing area!"); -return; -} -this._lastHeight=_914; -this.editorObject.style.height=this._lastHeight+"px"; -this.window.scrollTo(0,0); -},_saveContent:function(e){ -var _916=dojo.doc().getElementById("dojo.widget.RichText.savedContent"); -_916.value+=this._SEPARATOR+this.saveName+":"+this.getEditorContent(); -},getEditorContent:function(){ -var ec=""; -try{ -ec=(this._content.length>0)?this._content:this.editNode.innerHTML; -if(dojo.string.trim(ec)==" "){ -ec=""; -} -} -catch(e){ -} -if(dojo.render.html.ie&&!this.object){ -var re=new RegExp("(?:

     

    [\n\r]*)+$","i"); -ec=ec.replace(re,""); -} -ec=this._postFilterContent(ec); -if(this.relativeImageUrls){ -var _919=dojo.global().location.protocol+"//"+dojo.global().location.host; -var _91a=dojo.global().location.pathname; -if(_91a.match(/\/$/)){ -}else{ -var _91b=_91a.split("/"); -if(_91b.length){ -_91b.pop(); -} -_91a=_91b.join("/")+"/"; -} -var _91c=new RegExp("(]* src=[\"'])("+_919+"("+_91a+")?)","ig"); -ec=ec.replace(_91c,"$1"); -} -return ec; -},close:function(save,_91e){ -if(this.isClosed){ -return false; -} -if(arguments.length==0){ -save=true; -} -this._content=this._postFilterContent(this.editNode.innerHTML); -var _91f=(this.savedContent!=this._content); -if(this.interval){ -clearInterval(this.interval); -} -if(dojo.render.html.ie&&!this.object){ -dojo.event.browser.clean(this.editNode); -} -if(this.iframe){ -delete this.iframe; -} -if(this.textarea){ -with(this.textarea.style){ -position=""; -left=top=""; -if(dojo.render.html.ie){ -overflow=this.__overflow; -this.__overflow=null; -} -} -if(save){ -this.textarea.value=this._content; -}else{ -this.textarea.value=this.savedContent; -} -dojo.html.removeNode(this.domNode); -this.domNode=this.textarea; -}else{ -if(save){ -if(dojo.render.html.moz){ -var nc=dojo.doc().createElement("span"); -this.domNode.appendChild(nc); -nc.innerHTML=this.editNode.innerHTML; -}else{ -this.domNode.innerHTML=this._content; -} -}else{ -this.domNode.innerHTML=this.savedContent; -} -} -dojo.html.removeClass(this.domNode,"RichTextEditable"); -this.isClosed=true; -this.isLoaded=false; -delete this.editNode; -if(this.window._frameElement){ -this.window._frameElement=null; -} -this.window=null; -this.document=null; -this.object=null; -this.editingArea=null; -this.editorObject=null; -return _91f; -},destroyRendering:function(){ -},destroy:function(){ -this.destroyRendering(); -if(!this.isClosed){ -this.close(false); -} -dojo.widget.RichText.superclass.destroy.call(this); -},connect:function(_921,_922,_923){ -dojo.event.connect(_921,_922,this,_923); -},disconnect:function(_924,_925,_926){ -dojo.event.disconnect(_924,_925,this,_926); -},disconnectAllWithRoot:function(_927){ -dojo.deprecated("disconnectAllWithRoot","is deprecated. No need to disconnect manually","0.5"); -},_fixContentForMoz:function(html){ -html=html.replace(/])/gi,"/gi,""); -html=html.replace(/])/gi,"/gi,""); -return html; -}}); -dojo.provide("dojo.lang.type"); -dojo.lang.whatAmI=function(_929){ -dojo.deprecated("dojo.lang.whatAmI","use dojo.lang.getType instead","0.5"); -return dojo.lang.getType(_929); -}; -dojo.lang.whatAmI.custom={}; -dojo.lang.getType=function(_92a){ -try{ -if(dojo.lang.isArray(_92a)){ -return "array"; -} -if(dojo.lang.isFunction(_92a)){ -return "function"; -} -if(dojo.lang.isString(_92a)){ -return "string"; -} -if(dojo.lang.isNumber(_92a)){ -return "number"; -} -if(dojo.lang.isBoolean(_92a)){ -return "boolean"; -} -if(dojo.lang.isAlien(_92a)){ -return "alien"; -} -if(dojo.lang.isUndefined(_92a)){ -return "undefined"; -} -for(var name in dojo.lang.whatAmI.custom){ -if(dojo.lang.whatAmI.custom[name](_92a)){ -return name; -} -} -if(dojo.lang.isObject(_92a)){ -return "object"; -} -} -catch(e){ -} -return "unknown"; -}; -dojo.lang.isNumeric=function(_92c){ -return (!isNaN(_92c)&&isFinite(_92c)&&(_92c!=null)&&!dojo.lang.isBoolean(_92c)&&!dojo.lang.isArray(_92c)&&!/^\s*$/.test(_92c)); -}; -dojo.lang.isBuiltIn=function(_92d){ -return (dojo.lang.isArray(_92d)||dojo.lang.isFunction(_92d)||dojo.lang.isString(_92d)||dojo.lang.isNumber(_92d)||dojo.lang.isBoolean(_92d)||(_92d==null)||(_92d instanceof Error)||(typeof _92d=="error")); -}; -dojo.lang.isPureObject=function(_92e){ -return ((_92e!=null)&&dojo.lang.isObject(_92e)&&_92e.constructor==Object); -}; -dojo.lang.isOfType=function(_92f,type,_931){ -var _932=false; -if(_931){ -_932=_931["optional"]; -} -if(_932&&((_92f===null)||dojo.lang.isUndefined(_92f))){ -return true; -} -if(dojo.lang.isArray(type)){ -var _933=type; -for(var i in _933){ -var _935=_933[i]; -if(dojo.lang.isOfType(_92f,_935)){ -return true; -} -} -return false; -}else{ -if(dojo.lang.isString(type)){ -type=type.toLowerCase(); -} -switch(type){ -case Array: -case "array": -return dojo.lang.isArray(_92f); -case Function: -case "function": -return dojo.lang.isFunction(_92f); -case String: -case "string": -return dojo.lang.isString(_92f); -case Number: -case "number": -return dojo.lang.isNumber(_92f); -case "numeric": -return dojo.lang.isNumeric(_92f); -case Boolean: -case "boolean": -return dojo.lang.isBoolean(_92f); -case Object: -case "object": -return dojo.lang.isObject(_92f); -case "pureobject": -return dojo.lang.isPureObject(_92f); -case "builtin": -return dojo.lang.isBuiltIn(_92f); -case "alien": -return dojo.lang.isAlien(_92f); -case "undefined": -return dojo.lang.isUndefined(_92f); -case null: -case "null": -return (_92f===null); -case "optional": -dojo.deprecated("dojo.lang.isOfType(value, [type, \"optional\"])","use dojo.lang.isOfType(value, type, {optional: true} ) instead","0.5"); -return ((_92f===null)||dojo.lang.isUndefined(_92f)); -default: -if(dojo.lang.isFunction(type)){ -return (_92f instanceof type); -}else{ -dojo.raise("dojo.lang.isOfType() was passed an invalid type"); -} -} -} -dojo.raise("If we get here, it means a bug was introduced above."); -}; -dojo.lang.getObject=function(str){ -var _937=str.split("."),i=0,obj=dj_global; -do{ -obj=obj[_937[i++]]; -}while(i<_937.length&&obj); -return (obj!=dj_global)?obj:null; -}; -dojo.lang.doesObjectExist=function(str){ -var _93b=str.split("."),i=0,obj=dj_global; -do{ -obj=obj[_93b[i++]]; -}while(i<_93b.length&&obj); -return (obj&&obj!=dj_global); -}; -dojo.provide("dojo.lang.assert"); -dojo.lang.assert=function(_93e,_93f){ -if(!_93e){ -var _940="An assert statement failed.\n"+"The method dojo.lang.assert() was called with a 'false' value.\n"; -if(_93f){ -_940+="Here's the assert message:\n"+_93f+"\n"; -} -throw new Error(_940); -} -}; -dojo.lang.assertType=function(_941,type,_943){ -if(dojo.lang.isString(_943)){ -dojo.deprecated("dojo.lang.assertType(value, type, \"message\")","use dojo.lang.assertType(value, type) instead","0.5"); -} -if(!dojo.lang.isOfType(_941,type,_943)){ -if(!dojo.lang.assertType._errorMessage){ -dojo.lang.assertType._errorMessage="Type mismatch: dojo.lang.assertType() failed."; -} -dojo.lang.assert(false,dojo.lang.assertType._errorMessage); -} -}; -dojo.lang.assertValidKeywords=function(_944,_945,_946){ -var key; -if(!_946){ -if(!dojo.lang.assertValidKeywords._errorMessage){ -dojo.lang.assertValidKeywords._errorMessage="In dojo.lang.assertValidKeywords(), found invalid keyword:"; -} -_946=dojo.lang.assertValidKeywords._errorMessage; -} -if(dojo.lang.isArray(_945)){ -for(key in _944){ -if(!dojo.lang.inArray(_945,key)){ -dojo.lang.assert(false,_946+" "+key); -} -} -}else{ -for(key in _944){ -if(!(key in _945)){ -dojo.lang.assert(false,_946+" "+key); -} -} -} -}; -dojo.provide("dojo.AdapterRegistry"); -dojo.AdapterRegistry=function(_948){ -this.pairs=[]; -this.returnWrappers=_948||false; -}; -dojo.lang.extend(dojo.AdapterRegistry,{register:function(name,_94a,wrap,_94c,_94d){ -var type=(_94d)?"unshift":"push"; -this.pairs[type]([name,_94a,wrap,_94c]); -},match:function(){ -for(var i=0;i"; -this.iframe=dojo.doc().createElement(html); -this.iframe.tabIndex=-1; -if(node){ -node.appendChild(this.iframe); -this.domNode=node; -}else{ -dojo.body().appendChild(this.iframe); -this.iframe.style.display="none"; -} -} -}; -dojo.lang.extend(dojo.html.BackgroundIframe,{iframe:null,onResized:function(){ -if(this.iframe&&this.domNode&&this.domNode.parentNode){ -var _963=dojo.html.getMarginBox(this.domNode); -if(_963.width==0||_963.height==0){ -dojo.lang.setTimeout(this,this.onResized,100); -return; -} -this.iframe.style.width=_963.width+"px"; -this.iframe.style.height=_963.height+"px"; -} -},size:function(node){ -if(!this.iframe){ -return; -} -var _965=dojo.html.toCoordinateObject(node,true,dojo.html.boxSizing.BORDER_BOX); -with(this.iframe.style){ -width=_965.width+"px"; -height=_965.height+"px"; -left=_965.left+"px"; -top=_965.top+"px"; -} -},setZIndex:function(node){ -if(!this.iframe){ -return; -} -if(dojo.dom.isNode(node)){ -this.iframe.style.zIndex=dojo.html.getStyle(node,"z-index")-1; -}else{ -if(!isNaN(node)){ -this.iframe.style.zIndex=node; -} -} -},show:function(){ -if(this.iframe){ -this.iframe.style.display="block"; -} -},hide:function(){ -if(this.iframe){ -this.iframe.style.display="none"; -} -},remove:function(){ -if(this.iframe){ -dojo.html.removeNode(this.iframe,true); -delete this.iframe; -this.iframe=null; -} -}}); -dojo.provide("dojo.widget.PopupContainer"); -dojo.declare("dojo.widget.PopupContainerBase",null,function(){ -this.queueOnAnimationFinish=[]; -},{isShowingNow:false,currentSubpopup:null,beginZIndex:1000,parentPopup:null,parent:null,popupIndex:0,aroundBox:dojo.html.boxSizing.BORDER_BOX,openedForWindow:null,processKey:function(evt){ -return false; -},applyPopupBasicStyle:function(){ -with(this.domNode.style){ -display="none"; -position="absolute"; -} -},aboutToShow:function(){ -},open:function(x,y,_96a,_96b,_96c,_96d){ -if(this.isShowingNow){ -return; -} -if(this.animationInProgress){ -this.queueOnAnimationFinish.push(this.open,arguments); -return; -} -this.aboutToShow(); -var _96e=false,node,_970; -if(typeof x=="object"){ -node=x; -_970=_96b; -_96b=_96a; -_96a=y; -_96e=true; -} -this.parent=_96a; -dojo.body().appendChild(this.domNode); -_96b=_96b||_96a["domNode"]||[]; -var _971=null; -this.isTopLevel=true; -while(_96a){ -if(_96a!==this&&(_96a.setOpenedSubpopup!=undefined&&_96a.applyPopupBasicStyle!=undefined)){ -_971=_96a; -this.isTopLevel=false; -_971.setOpenedSubpopup(this); -break; -} -_96a=_96a.parent; -} -this.parentPopup=_971; -this.popupIndex=_971?_971.popupIndex+1:1; -if(this.isTopLevel){ -var _972=dojo.html.isNode(_96b)?_96b:null; -dojo.widget.PopupManager.opened(this,_972); -} -if(this.isTopLevel&&!dojo.withGlobal(this.openedForWindow||dojo.global(),dojo.html.selection.isCollapsed)){ -this._bookmark=dojo.withGlobal(this.openedForWindow||dojo.global(),dojo.html.selection.getBookmark); -}else{ -this._bookmark=null; -} -if(_96b instanceof Array){ -_96b={left:_96b[0],top:_96b[1],width:0,height:0}; -} -with(this.domNode.style){ -display=""; -zIndex=this.beginZIndex+this.popupIndex; -} -if(_96e){ -this.move(node,_96d,_970); -}else{ -this.move(x,y,_96d,_96c); -} -this.domNode.style.display="none"; -this.explodeSrc=_96b; -this.show(); -this.isShowingNow=true; -},move:function(x,y,_975,_976){ -var _977=(typeof x=="object"); -if(_977){ -var _978=_975; -var node=x; -_975=y; -if(!_978){ -_978={"BL":"TL","TL":"BL"}; -} -dojo.html.placeOnScreenAroundElement(this.domNode,node,_975,this.aroundBox,_978); -}else{ -if(!_976){ -_976="TL,TR,BL,BR"; -} -dojo.html.placeOnScreen(this.domNode,x,y,_975,true,_976); -} -},close:function(_97a){ -if(_97a){ -this.domNode.style.display="none"; -} -if(this.animationInProgress){ -this.queueOnAnimationFinish.push(this.close,[]); -return; -} -this.closeSubpopup(_97a); -this.hide(); -if(this.bgIframe){ -this.bgIframe.hide(); -this.bgIframe.size({left:0,top:0,width:0,height:0}); -} -if(this.isTopLevel){ -dojo.widget.PopupManager.closed(this); -} -this.isShowingNow=false; -if(this.parent){ -setTimeout(dojo.lang.hitch(this,function(){ -try{ -if(this.parent["focus"]){ -this.parent.focus(); -}else{ -this.parent.domNode.focus(); -} -} -catch(e){ -dojo.debug("No idea how to focus to parent",e); -} -}),10); -} -if(this._bookmark&&dojo.withGlobal(this.openedForWindow||dojo.global(),dojo.html.selection.isCollapsed)){ -if(this.openedForWindow){ -this.openedForWindow.focus(); -} -try{ -dojo.withGlobal(this.openedForWindow||dojo.global(),"moveToBookmark",dojo.html.selection,[this._bookmark]); -} -catch(e){ -} -} -this._bookmark=null; -},closeAll:function(_97b){ -if(this.parentPopup){ -this.parentPopup.closeAll(_97b); -}else{ -this.close(_97b); -} -},setOpenedSubpopup:function(_97c){ -this.currentSubpopup=_97c; -},closeSubpopup:function(_97d){ -if(this.currentSubpopup==null){ -return; -} -this.currentSubpopup.close(_97d); -this.currentSubpopup=null; -},onShow:function(){ -dojo.widget.PopupContainer.superclass.onShow.apply(this,arguments); -this.openedSize={w:this.domNode.style.width,h:this.domNode.style.height}; -if(dojo.render.html.ie){ -if(!this.bgIframe){ -this.bgIframe=new dojo.html.BackgroundIframe(); -this.bgIframe.setZIndex(this.domNode); -} -this.bgIframe.size(this.domNode); -this.bgIframe.show(); -} -this.processQueue(); -},processQueue:function(){ -if(!this.queueOnAnimationFinish.length){ -return; -} -var func=this.queueOnAnimationFinish.shift(); -var args=this.queueOnAnimationFinish.shift(); -func.apply(this,args); -},onHide:function(){ -dojo.widget.HtmlWidget.prototype.onHide.call(this); -if(this.openedSize){ -with(this.domNode.style){ -width=this.openedSize.w; -height=this.openedSize.h; -} -} -this.processQueue(); -}}); -dojo.widget.defineWidget("dojo.widget.PopupContainer",[dojo.widget.HtmlWidget,dojo.widget.PopupContainerBase],{isContainer:true,fillInTemplate:function(){ -this.applyPopupBasicStyle(); -dojo.widget.PopupContainer.superclass.fillInTemplate.apply(this,arguments); -}}); -dojo.widget.PopupManager=new function(){ -this.currentMenu=null; -this.currentButton=null; -this.currentFocusMenu=null; -this.focusNode=null; -this.registeredWindows=[]; -this.registerWin=function(win){ -if(!win.__PopupManagerRegistered){ -dojo.event.connect(win.document,"onmousedown",this,"onClick"); -dojo.event.connect(win,"onscroll",this,"onClick"); -dojo.event.connect(win.document,"onkey",this,"onKey"); -win.__PopupManagerRegistered=true; -this.registeredWindows.push(win); -} -}; -this.registerAllWindows=function(_981){ -if(!_981){ -_981=dojo.html.getDocumentWindow(window.top&&window.top.document||window.document); -} -this.registerWin(_981); -for(var i=0;i<_981.frames.length;i++){ -try{ -var win=dojo.html.getDocumentWindow(_981.frames[i].document); -if(win){ -this.registerAllWindows(win); -} -} -catch(e){ -} -} -}; -this.unRegisterWin=function(win){ -if(win.__PopupManagerRegistered){ -dojo.event.disconnect(win.document,"onmousedown",this,"onClick"); -dojo.event.disconnect(win,"onscroll",this,"onClick"); -dojo.event.disconnect(win.document,"onkey",this,"onKey"); -win.__PopupManagerRegistered=false; -} -}; -this.unRegisterAllWindows=function(){ -for(var i=0;i]*>([\s\S]*?)<\/title>/i; -while(_9c6=_9d0.exec(s)){ -_9c3.push(_9c6[1]); -s=s.substring(0,_9c6.index)+s.substr(_9c6.index+_9c6[0].length); -} -if(this.adjustPaths){ -var _9d1=/<[a-z][a-z0-9]*[^>]*\s(?:(?:src|href|style)=[^>])+[^>]*>/i; -var _9d2=/\s(src|href|style)=(['"]?)([\w()\[\]\/.,\\'"-:;#=&?\s@]+?)\2/i; -var _9d3=/^(?:[#]|(?:(?:https?|ftps?|file|javascript|mailto|news):))/; -while(tag=_9d1.exec(s)){ -str+=s.substring(0,tag.index); -s=s.substring((tag.index+tag[0].length),s.length); -tag=tag[0]; -_9cd=""; -while(attr=_9d2.exec(tag)){ -path=""; -_9cf=attr[3]; -switch(attr[1].toLowerCase()){ -case "src": -case "href": -if(_9d3.exec(_9cf)){ -path=_9cf; -}else{ -path=(new dojo.uri.Uri(url,_9cf).toString()); -} -break; -case "style": -path=dojo.html.fixPathsInCssText(_9cf,url); -break; -default: -path=_9cf; -} -fix=" "+attr[1]+"="+attr[2]+path+attr[2]; -_9cd+=tag.substring(0,attr.index)+fix; -tag=tag.substring((attr.index+attr[0].length),tag.length); -} -str+=_9cd+tag; -} -s=str+s; -} -_9d0=/(?:<(style)[^>]*>([\s\S]*?)<\/style>|]*rel=['"]?stylesheet['"]?[^>]*)>)/i; -while(_9c6=_9d0.exec(s)){ -if(_9c6[1]&&_9c6[1].toLowerCase()=="style"){ -_9c9.push(dojo.html.fixPathsInCssText(_9c6[2],url)); -}else{ -if(attr=_9c6[3].match(/href=(['"]?)([^'">]*)\1/i)){ -_9c9.push({path:attr[2]}); -} -} -s=s.substring(0,_9c6.index)+s.substr(_9c6.index+_9c6[0].length); -} -var _9d0=/]*)>([\s\S]*?)<\/script>/i; -var _9d4=/src=(['"]?)([^"']*)\1/i; -var _9d5=/.*(\bdojo\b\.js(?:\.uncompressed\.js)?)$/; -var _9d6=/(?:var )?\bdjConfig\b(?:[\s]*=[\s]*\{[^}]+\}|\.[\w]*[\s]*=[\s]*[^;\n]*)?;?|dojo\.hostenv\.writeIncludes\(\s*\);?/g; -var _9d7=/dojo\.(?:(?:require(?:After)?(?:If)?)|(?:widget\.(?:manager\.)?registerWidgetPackage)|(?:(?:hostenv\.)?setModulePrefix|registerModulePath)|defineNamespace)\((['"]).*?\1\)\s*;?/; -while(_9c6=_9d0.exec(s)){ -if(this.executeScripts&&_9c6[1]){ -if(attr=_9d4.exec(_9c6[1])){ -if(_9d5.exec(attr[2])){ -dojo.debug("Security note! inhibit:"+attr[2]+" from being loaded again."); -}else{ -_9c4.push({path:attr[2]}); -} -} -} -if(_9c6[2]){ -var sc=_9c6[2].replace(_9d6,""); -if(!sc){ -continue; -} -while(tmp=_9d7.exec(sc)){ -_9c7.push(tmp[0]); -sc=sc.substring(0,tmp.index)+sc.substr(tmp.index+tmp[0].length); -} -if(this.executeScripts){ -_9c4.push(sc); -} -} -s=s.substr(0,_9c6.index)+s.substr(_9c6.index+_9c6[0].length); -} -if(this.extractContent){ -_9c6=s.match(/]*>\s*([\s\S]+)\s*<\/body>/im); -if(_9c6){ -s=_9c6[1]; -} -} -if(this.executeScripts&&this.scriptSeparation){ -var _9d0=/(<[a-zA-Z][a-zA-Z0-9]*\s[^>]*?\S=)((['"])[^>]*scriptScope[^>]*>)/; -var _9d9=/([\s'";:\(])scriptScope(.*)/; -str=""; -while(tag=_9d0.exec(s)){ -tmp=((tag[3]=="'")?"\"":"'"); -fix=""; -str+=s.substring(0,tag.index)+tag[1]; -while(attr=_9d9.exec(tag[2])){ -tag[2]=tag[2].substring(0,attr.index)+attr[1]+"dojo.widget.byId("+tmp+this.widgetId+tmp+").scriptScope"+attr[2]; -} -str+=tag[2]; -s=s.substr(tag.index+tag[0].length); -} -s=str+s; -} -} -return {"xml":s,"styles":_9c9,"titles":_9c3,"requires":_9c7,"scripts":_9c4,"url":url}; -},_setContent:function(cont){ -this.destroyChildren(); -for(var i=0;i\r\n\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tW\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tS\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\t
    normal
    \r\n\t\t\t\t\t\t\t\t\t\t

    Heading 1

    \r\n\t\t\t\t\t\t\t\t\t\t

    Heading 2

    \r\n\t\t\t\t\t\t\t\t\t\t

    Heading 3

    \r\n\t\t\t\t\t\t\t\t\t\t

    Heading 4

    \r\n\t\t\t\t\t\t\t\t\t\t
    blah
    \r\n\t\t\t\t\t\t\t\t\t\t
    blah
    \r\n\t\t\t\t\t\t\t\t\t\t
    blah
    \r\n\t\t\t\t\t\t\t\t\t\t
    blah
    \r\n\t\t\t\t\t\t\t\t\t\t
    blah
    \r\n\t\t\t\t\t\t\t\t\t\t
    blah
    \r\n\t\t\t\t\t\t\t\t\t\t
    blah
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\tthud\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t  copy\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t  paste\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t  undo\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t  redo\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n
    \r\n",templateCssString:".StyleDropdownContainer {\r\n\tposition: absolute;\r\n\tz-index: 1000;\r\n\toverflow: auto;\r\n\tcursor: default;\r\n\twidth: 250px;\r\n\theight: 250px;\r\n\tbackground-color: white;\r\n\tborder: 1px solid black;\r\n}\r\n\r\n.ColorDropdownContainer {\r\n\tposition: absolute;\r\n\tz-index: 1000;\r\n\toverflow: auto;\r\n\tcursor: default;\r\n\twidth: 250px;\r\n\theight: 150px;\r\n\tbackground-color: white;\r\n\tborder: 1px solid black;\r\n}\r\n\r\n.EditorToolbarDomNode {\r\n\tbackground-image: url(buttons/bg-fade.png);\r\n\tbackground-repeat: repeat-x;\r\n\tbackground-position: 0px -50px;\r\n}\r\n\r\n.EditorToolbarSmallBg {\r\n\tbackground-image: url(images/toolbar-bg.gif);\r\n\tbackground-repeat: repeat-x;\r\n\tbackground-position: 0px 0px;\r\n}\r\n\r\n/*\r\nbody {\r\n\tbackground:url(images/blank.gif) fixed;\r\n}*/\r\n\r\n.IEFixedToolbar {\r\n\tposition:absolute;\r\n\t/* top:0; */\r\n\ttop: expression(eval((document.documentElement||document.body).scrollTop));\r\n}\r\n\r\ndiv.bigIcon {\r\n\twidth: 40px;\r\n\theight: 40px; \r\n\t/* background-color: white; */\r\n\t/* border: 1px solid #a6a7a3; */\r\n\tfont-family: Verdana, Trebuchet, Tahoma, Arial;\r\n}\r\n\r\n.iconContainer {\r\n\tfont-family: Verdana, Trebuchet, Tahoma, Arial;\r\n\tfont-size: 13px;\r\n\tfloat: left;\r\n\theight: 18px;\r\n\tdisplay: block;\r\n\t/* background-color: white; */\r\n\tcursor: pointer;\r\n\tpadding: 1px 4px 1px 1px; /* almost the same as a transparent border */\r\n\tborder: 0px;\r\n}\r\n\r\n.dojoE2TBIcon {\r\n\tdisplay: block;\r\n\ttext-align: center;\r\n\tmin-width: 18px;\r\n\twidth: 18px;\r\n\theight: 18px;\r\n\t/* background-color: #a6a7a3; */\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-image: url(buttons/aggregate.gif);\r\n}\r\n\r\n\r\n.dojoE2TBIcon[class~=dojoE2TBIcon] {\r\n}\r\n\r\n.ToolbarButtonLatched {\r\n border: #316ac5 1px solid; !important;\r\n padding: 0px 3px 0px 0px; !important; /* make room for border */\r\n background-color: #c1d2ee;\r\n}\r\n\r\n.ToolbarButtonHighlighted {\r\n border: #316ac5 1px solid; !important;\r\n padding: 0px 3px 0px 0px; !important; /* make room for border */\r\n background-color: #dff1ff;\r\n}\r\n\r\n.ToolbarButtonDisabled{\r\n filter: gray() alpha(opacity=30); /* IE */\r\n opacity: 0.30; /* Safari, Opera and Mozilla */\r\n}\r\n\r\n.headingContainer {\r\n\twidth: 150px;\r\n\theight: 30px;\r\n\tmargin: 0px;\r\n\t/* padding-left: 5px; */\r\n\toverflow: hidden;\r\n\tline-height: 25px;\r\n\tborder-bottom: 1px solid black;\r\n\tborder-top: 1px solid white;\r\n}\r\n\r\n.EditorToolbarDomNode select {\r\n\tfont-size: 14px;\r\n}\r\n \r\n.dojoE2TBIcon_Sep { width: 5px; min-width: 5px; max-width: 5px; background-position: 0px 0px}\r\n.dojoE2TBIcon_Backcolor { background-position: -18px 0px}\r\n.dojoE2TBIcon_Bold { background-position: -36px 0px}\r\n.dojoE2TBIcon_Cancel { background-position: -54px 0px}\r\n.dojoE2TBIcon_Copy { background-position: -72px 0px}\r\n.dojoE2TBIcon_Link { background-position: -90px 0px}\r\n.dojoE2TBIcon_Cut { background-position: -108px 0px}\r\n.dojoE2TBIcon_Delete { background-position: -126px 0px}\r\n.dojoE2TBIcon_TextColor { background-position: -144px 0px}\r\n.dojoE2TBIcon_BackgroundColor { background-position: -162px 0px}\r\n.dojoE2TBIcon_Indent { background-position: -180px 0px}\r\n.dojoE2TBIcon_HorizontalLine { background-position: -198px 0px}\r\n.dojoE2TBIcon_Image { background-position: -216px 0px}\r\n.dojoE2TBIcon_NumberedList { background-position: -234px 0px}\r\n.dojoE2TBIcon_Table { background-position: -252px 0px}\r\n.dojoE2TBIcon_BulletedList { background-position: -270px 0px}\r\n.dojoE2TBIcon_Italic { background-position: -288px 0px}\r\n.dojoE2TBIcon_CenterJustify { background-position: -306px 0px}\r\n.dojoE2TBIcon_BlockJustify { background-position: -324px 0px}\r\n.dojoE2TBIcon_LeftJustify { background-position: -342px 0px}\r\n.dojoE2TBIcon_RightJustify { background-position: -360px 0px}\r\n.dojoE2TBIcon_left_to_right { background-position: -378px 0px}\r\n.dojoE2TBIcon_list_bullet_indent { background-position: -396px 0px}\r\n.dojoE2TBIcon_list_bullet_outdent { background-position: -414px 0px}\r\n.dojoE2TBIcon_list_num_indent { background-position: -432px 0px}\r\n.dojoE2TBIcon_list_num_outdent { background-position: -450px 0px}\r\n.dojoE2TBIcon_Outdent { background-position: -468px 0px}\r\n.dojoE2TBIcon_Paste { background-position: -486px 0px}\r\n.dojoE2TBIcon_Redo { background-position: -504px 0px}\r\ndojoE2TBIcon_RemoveFormat { background-position: -522px 0px}\r\n.dojoE2TBIcon_right_to_left { background-position: -540px 0px}\r\n.dojoE2TBIcon_Save { background-position: -558px 0px}\r\n.dojoE2TBIcon_Space { background-position: -576px 0px}\r\n.dojoE2TBIcon_StrikeThrough { background-position: -594px 0px}\r\n.dojoE2TBIcon_Subscript { background-position: -612px 0px}\r\n.dojoE2TBIcon_Superscript { background-position: -630px 0px}\r\n.dojoE2TBIcon_Underline { background-position: -648px 0px}\r\n.dojoE2TBIcon_Undo { background-position: -666px 0px}\r\n.dojoE2TBIcon_WikiWord { background-position: -684px 0px}\r\n\r\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/EditorToolbar.css"),ToolbarLatchedItemStyle:"ToolbarButtonLatched",ToolbarEnabledItemStyle:"ToolbarButtonEnabled",ToolbarDisabledItemStyle:"ToolbarButtonDisabled",ToolbarHighlightedItemStyle:"ToolbarButtonHighlighted",ToolbarHighlightedSelectStyle:"ToolbarSelectHighlighted",ToolbarHighlightedSelectItemStyle:"ToolbarSelectHighlightedItem",postCreate:function(){ -var _a38=dojo.html.getElementsByClass("dojoEditorToolbarItem",this.domNode); -this.items={}; -for(var x=0;x<_a38.length;x++){ -var node=_a38[x]; -var _a3b=node.getAttribute("dojoETItemName"); -if(_a3b){ -var item=dojo.widget.Editor2ToolbarItemManager.getToolbarItem(_a3b); -if(item){ -item.create(node,this); -this.items[_a3b.toLowerCase()]=item; -}else{ -node.style.display="none"; -} -} -} -},update:function(){ -for(var cmd in this.items){ -this.items[cmd].refreshState(); -} -},shareGroup:"",checkAvailability:function(){ -if(!this.shareGroup){ -this.parent.focus(); -return true; -} -var _a3e=dojo.widget.Editor2Manager.getCurrentInstance(); -if(this.shareGroup==_a3e.toolbarGroup){ -return true; -} -return false; -},destroy:function(){ -for(var it in this.items){ -this.items[it].destroy(); -delete this.items[it]; -} -dojo.widget.Editor2Toolbar.superclass.destroy.call(this); -}}); -dojo.provide("dojo.uri.cache"); -dojo.uri.cache={_cache:{},set:function(uri,_a41){ -this._cache[uri.toString()]=_a41; -return uri; -},remove:function(uri){ -delete this._cache[uri.toString()]; -},get:function(uri){ -var key=uri.toString(); -var _a45=this._cache[key]; -if(!_a45){ -_a45=dojo.hostenv.getText(key); -if(_a45){ -this._cache[key]=_a45; -} -} -return _a45; -},allow:function(uri){ -return uri; -}}; -dojo.provide("dojo.lfx.shadow"); -dojo.lfx.shadow=function(node){ -this.shadowPng=dojo.uri.moduleUri("dojo.html","images/shadow"); -this.shadowThickness=8; -this.shadowOffset=15; -this.init(node); -}; -dojo.extend(dojo.lfx.shadow,{init:function(node){ -this.node=node; -this.pieces={}; -var x1=-1*this.shadowThickness; -var y0=this.shadowOffset; -var y1=this.shadowOffset+this.shadowThickness; -this._makePiece("tl","top",y0,"left",x1); -this._makePiece("l","top",y1,"left",x1,"scale"); -this._makePiece("tr","top",y0,"left",0); -this._makePiece("r","top",y1,"left",0,"scale"); -this._makePiece("bl","top",0,"left",x1); -this._makePiece("b","top",0,"left",0,"crop"); -this._makePiece("br","top",0,"left",0); -},_makePiece:function(name,_a4d,_a4e,_a4f,_a50,_a51){ -var img; -var url=this.shadowPng+name.toUpperCase()+".png"; -if(dojo.render.html.ie55||dojo.render.html.ie60){ -img=dojo.doc().createElement("div"); -img.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+url+"'"+(_a51?", sizingMethod='"+_a51+"'":"")+")"; -}else{ -img=dojo.doc().createElement("img"); -img.src=url; -} -img.style.position="absolute"; -img.style[_a4d]=_a4e+"px"; -img.style[_a4f]=_a50+"px"; -img.style.width=this.shadowThickness+"px"; -img.style.height=this.shadowThickness+"px"; -this.pieces[name]=img; -this.node.appendChild(img); -},size:function(_a54,_a55){ -var _a56=_a55-(this.shadowOffset+this.shadowThickness+1); -if(_a56<0){ -_a56=0; -} -if(_a55<1){ -_a55=1; -} -if(_a54<1){ -_a54=1; -} -with(this.pieces){ -l.style.height=_a56+"px"; -r.style.height=_a56+"px"; -b.style.width=(_a54-1)+"px"; -bl.style.top=(_a55-1)+"px"; -b.style.top=(_a55-1)+"px"; -br.style.top=(_a55-1)+"px"; -tr.style.left=(_a54-1)+"px"; -r.style.left=(_a54-1)+"px"; -br.style.left=(_a54-1)+"px"; -} -}}); -dojo.provide("dojo.widget.html.layout"); -dojo.widget.html.layout=function(_a57,_a58,_a59){ -dojo.html.addClass(_a57,"dojoLayoutContainer"); -_a58=dojo.lang.filter(_a58,function(_a5a,idx){ -_a5a.idx=idx; -return dojo.lang.inArray(["top","bottom","left","right","client","flood"],_a5a.layoutAlign); -}); -if(_a59&&_a59!="none"){ -var rank=function(_a5d){ -switch(_a5d.layoutAlign){ -case "flood": -return 1; -case "left": -case "right": -return (_a59=="left-right")?2:3; -case "top": -case "bottom": -return (_a59=="left-right")?3:2; -default: -return 4; -} -}; -_a58.sort(function(a,b){ -return (rank(a)-rank(b))||(a.idx-b.idx); -}); -} -var f={top:dojo.html.getPixelValue(_a57,"padding-top",true),left:dojo.html.getPixelValue(_a57,"padding-left",true)}; -dojo.lang.mixin(f,dojo.html.getContentBox(_a57)); -dojo.lang.forEach(_a58,function(_a61){ -var elm=_a61.domNode; -var pos=_a61.layoutAlign; -with(elm.style){ -left=f.left+"px"; -top=f.top+"px"; -bottom="auto"; -right="auto"; -} -dojo.html.addClass(elm,"dojoAlign"+dojo.string.capitalize(pos)); -if((pos=="top")||(pos=="bottom")){ -dojo.html.setMarginBox(elm,{width:f.width}); -var h=dojo.html.getMarginBox(elm).height; -f.height-=h; -if(pos=="top"){ -f.top+=h; -}else{ -elm.style.top=f.top+f.height+"px"; -} -if(_a61.onResized){ -_a61.onResized(); -} -}else{ -if(pos=="left"||pos=="right"){ -var w=dojo.html.getMarginBox(elm).width; -if(_a61.resizeTo){ -_a61.resizeTo(w,f.height); -}else{ -dojo.html.setMarginBox(elm,{width:w,height:f.height}); -} -f.width-=w; -if(pos=="left"){ -f.left+=w; -}else{ -elm.style.left=f.left+f.width+"px"; -} -}else{ -if(pos=="flood"||pos=="client"){ -if(_a61.resizeTo){ -_a61.resizeTo(f.width,f.height); -}else{ -dojo.html.setMarginBox(elm,{width:f.width,height:f.height}); -} -} -} -} -}); -}; -dojo.html.insertCssText(".dojoLayoutContainer{ position: relative; display: block; overflow: hidden; }\n"+"body .dojoAlignTop, body .dojoAlignBottom, body .dojoAlignLeft, body .dojoAlignRight { position: absolute; overflow: hidden; }\n"+"body .dojoAlignClient { position: absolute }\n"+".dojoAlignClient { overflow: auto; }\n"); -dojo.provide("dojo.dnd.DragAndDrop"); -dojo.declare("dojo.dnd.DragSource",null,{type:"",onDragEnd:function(evt){ -},onDragStart:function(evt){ -},onSelected:function(evt){ -},unregister:function(){ -dojo.dnd.dragManager.unregisterDragSource(this); -},reregister:function(){ -dojo.dnd.dragManager.registerDragSource(this); -}}); -dojo.declare("dojo.dnd.DragObject",null,{type:"",register:function(){ -var dm=dojo.dnd.dragManager; -if(dm["registerDragObject"]){ -dm.registerDragObject(this); -} -},onDragStart:function(evt){ -},onDragMove:function(evt){ -},onDragOver:function(evt){ -},onDragOut:function(evt){ -},onDragEnd:function(evt){ -},onDragLeave:dojo.lang.forward("onDragOut"),onDragEnter:dojo.lang.forward("onDragOver"),ondragout:dojo.lang.forward("onDragOut"),ondragover:dojo.lang.forward("onDragOver")}); -dojo.declare("dojo.dnd.DropTarget",null,{acceptsType:function(type){ -if(!dojo.lang.inArray(this.acceptedTypes,"*")){ -if(!dojo.lang.inArray(this.acceptedTypes,type)){ -return false; -} -} -return true; -},accepts:function(_a70){ -if(!dojo.lang.inArray(this.acceptedTypes,"*")){ -for(var i=0;i<_a70.length;i++){ -if(!dojo.lang.inArray(this.acceptedTypes,_a70[i].type)){ -return false; -} -} -} -return true; -},unregister:function(){ -dojo.dnd.dragManager.unregisterDropTarget(this); -},onDragOver:function(evt){ -},onDragOut:function(evt){ -},onDragMove:function(evt){ -},onDropStart:function(evt){ -},onDrop:function(evt){ -},onDropEnd:function(){ -}},function(){ -this.acceptedTypes=[]; -}); -dojo.dnd.DragEvent=function(){ -this.dragSource=null; -this.dragObject=null; -this.target=null; -this.eventStatus="success"; -}; -dojo.declare("dojo.dnd.DragManager",null,{selectedSources:[],dragObjects:[],dragSources:[],registerDragSource:function(_a77){ -},dropTargets:[],registerDropTarget:function(_a78){ -},lastDragTarget:null,currentDragTarget:null,onKeyDown:function(){ -},onMouseOut:function(){ -},onMouseMove:function(){ -},onMouseUp:function(){ -}}); -dojo.provide("dojo.dnd.HtmlDragManager"); -dojo.declare("dojo.dnd.HtmlDragManager",dojo.dnd.DragManager,{disabled:false,nestedTargets:false,mouseDownTimer:null,dsCounter:0,dsPrefix:"dojoDragSource",dropTargetDimensions:[],currentDropTarget:null,previousDropTarget:null,_dragTriggered:false,selectedSources:[],dragObjects:[],dragSources:[],dropTargets:[],currentX:null,currentY:null,lastX:null,lastY:null,mouseDownX:null,mouseDownY:null,threshold:7,dropAcceptable:false,cancelEvent:function(e){ -e.stopPropagation(); -e.preventDefault(); -},registerDragSource:function(ds){ -if(ds["domNode"]){ -var dp=this.dsPrefix; -var _a7c=dp+"Idx_"+(this.dsCounter++); -ds.dragSourceId=_a7c; -this.dragSources[_a7c]=ds; -ds.domNode.setAttribute(dp,_a7c); -if(dojo.render.html.ie){ -dojo.event.browser.addListener(ds.domNode,"ondragstart",this.cancelEvent); -} -} -},unregisterDragSource:function(ds){ -if(ds["domNode"]){ -var dp=this.dsPrefix; -var _a7f=ds.dragSourceId; -delete ds.dragSourceId; -delete this.dragSources[_a7f]; -ds.domNode.setAttribute(dp,null); -if(dojo.render.html.ie){ -dojo.event.browser.removeListener(ds.domNode,"ondragstart",this.cancelEvent); -} -} -},registerDropTarget:function(dt){ -this.dropTargets.push(dt); -},unregisterDropTarget:function(dt){ -var _a82=dojo.lang.find(this.dropTargets,dt,true); -if(_a82>=0){ -this.dropTargets.splice(_a82,1); -} -},getDragSource:function(e){ -var tn=e.target; -if(tn===dojo.body()){ -return; -} -var ta=dojo.html.getAttribute(tn,this.dsPrefix); -while((!ta)&&(tn)){ -tn=tn.parentNode; -if((!tn)||(tn===dojo.body())){ -return; -} -ta=dojo.html.getAttribute(tn,this.dsPrefix); -} -return this.dragSources[ta]; -},onKeyDown:function(e){ -},onMouseDown:function(e){ -if(this.disabled){ -return; -} -if(dojo.render.html.ie){ -if(e.button!=1){ -return; -} -}else{ -if(e.which!=1){ -return; -} -} -var _a88=e.target.nodeType==dojo.html.TEXT_NODE?e.target.parentNode:e.target; -if(dojo.html.isTag(_a88,"button","textarea","input","select","option")){ -return; -} -var ds=this.getDragSource(e); -if(!ds){ -return; -} -if(!dojo.lang.inArray(this.selectedSources,ds)){ -this.selectedSources.push(ds); -ds.onSelected(); -} -this.mouseDownX=e.pageX; -this.mouseDownY=e.pageY; -e.preventDefault(); -dojo.event.connect(document,"onmousemove",this,"onMouseMove"); -},onMouseUp:function(e,_a8b){ -if(this.selectedSources.length==0){ -return; -} -this.mouseDownX=null; -this.mouseDownY=null; -this._dragTriggered=false; -e.dragSource=this.dragSource; -if((!e.shiftKey)&&(!e.ctrlKey)){ -if(this.currentDropTarget){ -this.currentDropTarget.onDropStart(); -} -dojo.lang.forEach(this.dragObjects,function(_a8c){ -var ret=null; -if(!_a8c){ -return; -} -if(this.currentDropTarget){ -e.dragObject=_a8c; -var ce=this.currentDropTarget.domNode.childNodes; -if(ce.length>0){ -e.dropTarget=ce[0]; -while(e.dropTarget==_a8c.domNode){ -e.dropTarget=e.dropTarget.nextSibling; -} -}else{ -e.dropTarget=this.currentDropTarget.domNode; -} -if(this.dropAcceptable){ -ret=this.currentDropTarget.onDrop(e); -}else{ -this.currentDropTarget.onDragOut(e); -} -} -e.dragStatus=this.dropAcceptable&&ret?"dropSuccess":"dropFailure"; -dojo.lang.delayThese([function(){ -try{ -_a8c.dragSource.onDragEnd(e); -} -catch(err){ -var _a8f={}; -for(var i in e){ -if(i=="type"){ -_a8f.type="mouseup"; -continue; -} -_a8f[i]=e[i]; -} -_a8c.dragSource.onDragEnd(_a8f); -} -},function(){ -_a8c.onDragEnd(e); -}]); -},this); -this.selectedSources=[]; -this.dragObjects=[]; -this.dragSource=null; -if(this.currentDropTarget){ -this.currentDropTarget.onDropEnd(); -} -}else{ -} -dojo.event.disconnect(document,"onmousemove",this,"onMouseMove"); -this.currentDropTarget=null; -},onScroll:function(){ -for(var i=0;ithis.threshold); -if(!this._dragTriggered){ -return; -} -dx=e.pageX-this.mouseDownX; -dy=e.pageY-this.mouseDownY; -} -this.dragSource=this.selectedSources[0]; -dojo.lang.forEach(this.selectedSources,function(_a9f){ -if(!_a9f){ -return; -} -var tdo=_a9f.onDragStart(e); -if(tdo){ -tdo.onDragStart(e); -tdo.dragOffset.y+=dy; -tdo.dragOffset.x+=dx; -tdo.dragSource=_a9f; -this.dragObjects.push(tdo); -} -},this); -this.previousDropTarget=null; -this.cacheTargetLocations(); -} -dojo.lang.forEach(this.dragObjects,function(_aa1){ -if(_aa1){ -_aa1.onDragMove(e); -} -}); -if(this.currentDropTarget){ -var c=dojo.html.toCoordinateObject(this.currentDropTarget.domNode,true); -var dtp=[[c.x,c.y],[c.x+c.width,c.y+c.height]]; -} -if((!this.nestedTargets)&&(dtp)&&(this.isInsideBox(e,dtp))){ -if(this.dropAcceptable){ -this.currentDropTarget.onDragMove(e,this.dragObjects); -} -}else{ -var _aa4=this.findBestTarget(e); -if(_aa4.target===null){ -if(this.currentDropTarget){ -this.currentDropTarget.onDragOut(e); -this.previousDropTarget=this.currentDropTarget; -this.currentDropTarget=null; -} -this.dropAcceptable=false; -return; -} -if(this.currentDropTarget!==_aa4.target){ -if(this.currentDropTarget){ -this.previousDropTarget=this.currentDropTarget; -this.currentDropTarget.onDragOut(e); -} -this.currentDropTarget=_aa4.target; -e.dragObjects=this.dragObjects; -this.dropAcceptable=this.currentDropTarget.onDragOver(e); -}else{ -if(this.dropAcceptable){ -this.currentDropTarget.onDragMove(e,this.dragObjects); -} -} -} -},findBestTarget:function(e){ -var _aa6=this; -var _aa7=new Object(); -_aa7.target=null; -_aa7.points=null; -dojo.lang.every(this.dropTargetDimensions,function(_aa8){ -if(!_aa6.isInsideBox(e,_aa8)){ -return true; -} -_aa7.target=_aa8[2]; -_aa7.points=_aa8; -return Boolean(_aa6.nestedTargets); -}); -return _aa7; -},isInsideBox:function(e,_aaa){ -if((e.pageX>_aaa[0][0])&&(e.pageX<_aaa[1][0])&&(e.pageY>_aaa[0][1])&&(e.pageY<_aaa[1][1])){ -return true; -} -return false; -},onMouseOver:function(e){ -},onMouseOut:function(e){ -}}); -dojo.dnd.dragManager=new dojo.dnd.HtmlDragManager(); -(function(){ -var d=document; -var dm=dojo.dnd.dragManager; -dojo.event.connect(d,"onkeydown",dm,"onKeyDown"); -dojo.event.connect(d,"onmouseover",dm,"onMouseOver"); -dojo.event.connect(d,"onmouseout",dm,"onMouseOut"); -dojo.event.connect(d,"onmousedown",dm,"onMouseDown"); -dojo.event.connect(d,"onmouseup",dm,"onMouseUp"); -dojo.event.connect(window,"onscroll",dm,"onScroll"); -})(); -dojo.provide("dojo.dnd.HtmlDragAndDrop"); -dojo.declare("dojo.dnd.HtmlDragSource",dojo.dnd.DragSource,{dragClass:"",onDragStart:function(){ -var _aaf=new dojo.dnd.HtmlDragObject(this.dragObject,this.type); -if(this.dragClass){ -_aaf.dragClass=this.dragClass; -} -if(this.constrainToContainer){ -_aaf.constrainTo(this.constrainingContainer||this.domNode.parentNode); -} -return _aaf; -},setDragHandle:function(node){ -node=dojo.byId(node); -dojo.dnd.dragManager.unregisterDragSource(this); -this.domNode=node; -dojo.dnd.dragManager.registerDragSource(this); -},setDragTarget:function(node){ -this.dragObject=node; -},constrainTo:function(_ab2){ -this.constrainToContainer=true; -if(_ab2){ -this.constrainingContainer=_ab2; -} -},onSelected:function(){ -for(var i=0;ithis.constraints.maxX){ -x=this.constraints.maxX; -} -if(y>this.constraints.maxY){ -y=this.constraints.maxY; -} -} -this.setAbsolutePosition(x,y); -dojo.event.topic.publish("dragMove",{source:this}); -},setAbsolutePosition:function(x,y){ -if(!this.disableY){ -this.dragClone.style.top=y+"px"; -} -if(!this.disableX){ -this.dragClone.style.left=x+"px"; -} -},onDragEnd:function(e){ -switch(e.dragStatus){ -case "dropSuccess": -dojo.html.removeNode(this.dragClone); -this.dragClone=null; -break; -case "dropFailure": -var _ad5=dojo.html.getAbsolutePosition(this.dragClone,true); -var _ad6={left:this.dragStartPosition.x+1,top:this.dragStartPosition.y+1}; -var anim=dojo.lfx.slideTo(this.dragClone,_ad6,300); -var _ad8=this; -dojo.event.connect(anim,"onEnd",function(e){ -dojo.html.removeNode(_ad8.dragClone); -_ad8.dragClone=null; -}); -anim.play(); -break; -} -dojo.event.topic.publish("dragEnd",{source:this}); -},constrainTo:function(_ada){ -this.constrainToContainer=true; -if(_ada){ -this.constrainingContainer=_ada; -}else{ -this.constrainingContainer=this.domNode.parentNode; -} -}},function(node,type){ -this.domNode=dojo.byId(node); -this.type=type; -this.constrainToContainer=false; -this.dragSource=null; -dojo.dnd.DragObject.prototype.register.call(this); -}); -dojo.declare("dojo.dnd.HtmlDropTarget",dojo.dnd.DropTarget,{vertical:false,onDragOver:function(e){ -if(!this.accepts(e.dragObjects)){ -return false; -} -this.childBoxes=[]; -for(var i=0,_adf;i=left&&e.pageX<=right&&e.pageY>=top&&e.pageY<=bottom){ -return i; -} -} -} -return -1; -},createDropIndicator:function(){ -this.dropIndicator=document.createElement("div"); -with(this.dropIndicator.style){ -position="absolute"; -zIndex=999; -if(this.vertical){ -borderLeftWidth="1px"; -borderLeftColor="black"; -borderLeftStyle="solid"; -height=dojo.html.getBorderBox(this.domNode).height+"px"; -top=dojo.html.getAbsolutePosition(this.domNode,true).y+"px"; -}else{ -borderTopWidth="1px"; -borderTopColor="black"; -borderTopStyle="solid"; -width=dojo.html.getBorderBox(this.domNode).width+"px"; -left=dojo.html.getAbsolutePosition(this.domNode,true).x+"px"; -} -} -},onDragMove:function(e,_ae6){ -var i=this._getNodeUnderMouse(e); -if(!this.dropIndicator){ -this.createDropIndicator(); -} -var _ae8=this.vertical?dojo.html.gravity.WEST:dojo.html.gravity.NORTH; -var hide=false; -if(i<0){ -if(this.childBoxes.length){ -var _aea=(dojo.html.gravity(this.childBoxes[0].node,e)&_ae8); -if(_aea){ -hide=true; -} -}else{ -var _aea=true; -} -}else{ -var _aeb=this.childBoxes[i]; -var _aea=(dojo.html.gravity(_aeb.node,e)&_ae8); -if(_aeb.node===_ae6[0].dragSource.domNode){ -hide=true; -}else{ -var _aec=_aea?(i>0?this.childBoxes[i-1]:_aeb):(i=3){ -_b0b=new dojo.gfx.color.Color(arguments[0],arguments[1],arguments[2]); -}else{ -_b0b=new dojo.gfx.color.Color(_b0b); -} -this.bg.style.backgroundColor=_b0b.toString(); -return this.bgColor=_b0b; -},setBackgroundOpacity:function(op){ -if(arguments.length==0){ -op=this.bgOpacity; -} -dojo.html.setOpacity(this.bg,op); -try{ -this.bgOpacity=dojo.html.getOpacity(this.bg); -} -catch(e){ -this.bgOpacity=op; -} -return this.bgOpacity; -},_sizeBackground:function(){ -if(this.bgOpacity>0){ -var _b0d=dojo.html.getViewport(); -var h=_b0d.height; -var w=_b0d.width; -with(this.bg.style){ -width=w+"px"; -height=h+"px"; -} -var _b10=dojo.html.getScroll().offset; -this.bg.style.top=_b10.y+"px"; -this.bg.style.left=_b10.x+"px"; -var _b0d=dojo.html.getViewport(); -if(_b0d.width!=w){ -this.bg.style.width=_b0d.width+"px"; -} -if(_b0d.height!=h){ -this.bg.style.height=_b0d.height+"px"; -} -} -this.bgIframe.size(this.bg); -},_showBackground:function(){ -if(this.bgOpacity>0){ -this.bg.style.display="block"; -} -if(this.bgIframe.iframe){ -this.bgIframe.iframe.style.display="block"; -} -},placeModalDialog:function(){ -var _b11=dojo.html.getScroll().offset; -var _b12=dojo.html.getViewport(); -var mb; -if(this.isShowing()){ -mb=dojo.html.getMarginBox(this.domNode); -}else{ -dojo.html.setVisibility(this.domNode,false); -dojo.html.show(this.domNode); -mb=dojo.html.getMarginBox(this.domNode); -dojo.html.hide(this.domNode); -dojo.html.setVisibility(this.domNode,true); -} -var x=_b11.x+(_b12.width-mb.width)/2; -var y=_b11.y+(_b12.height-mb.height)/2; -with(this.domNode.style){ -left=x+"px"; -top=y+"px"; -} -},_onKey:function(evt){ -if(evt.key){ -var node=evt.target; -while(node!=null){ -if(node==this.domNode){ -return; -} -node=node.parentNode; -} -if(evt.key!=evt.KEY_TAB){ -dojo.event.browser.stopEvent(evt); -}else{ -if(!dojo.render.html.opera){ -try{ -this.tabStart.focus(); -} -catch(e){ -} -} -} -} -},showModalDialog:function(){ -if(this.followScroll&&!this._scrollConnected){ -this._scrollConnected=true; -dojo.event.connect(window,"onscroll",this,"_onScroll"); -} -dojo.event.connect(document.documentElement,"onkey",this,"_onKey"); -this.placeModalDialog(); -this.setBackgroundOpacity(); -this._sizeBackground(); -this._showBackground(); -this._fromTrap=true; -setTimeout(dojo.lang.hitch(this,function(){ -try{ -this.tabStart.focus(); -} -catch(e){ -} -}),50); -},hideModalDialog:function(){ -if(this.focusElement){ -dojo.byId(this.focusElement).focus(); -dojo.byId(this.focusElement).blur(); -} -this.bg.style.display="none"; -this.bg.style.width=this.bg.style.height="1px"; -if(this.bgIframe.iframe){ -this.bgIframe.iframe.style.display="none"; -} -dojo.event.disconnect(document.documentElement,"onkey",this,"_onKey"); -if(this._scrollConnected){ -this._scrollConnected=false; -dojo.event.disconnect(window,"onscroll",this,"_onScroll"); -} -},_onScroll:function(){ -var _b18=dojo.html.getScroll().offset; -this.bg.style.top=_b18.y+"px"; -this.bg.style.left=_b18.x+"px"; -this.placeModalDialog(); -},checkSize:function(){ -if(this.isShowing()){ -this._sizeBackground(); -this.placeModalDialog(); -this.onResized(); -} -},onBackgroundClick:function(){ -if(this.lifetime-this.timeRemaining>=this.blockDuration){ -return; -} -this.hide(); -}}); -dojo.widget.defineWidget("dojo.widget.Dialog",[dojo.widget.ContentPane,dojo.widget.ModalDialogBase],{templateString:"
    \r\n\t\r\n\t\r\n\t
    \r\n\t\r\n\t\r\n
    \r\n",blockDuration:0,lifetime:0,closeNode:"",postMixInProperties:function(){ -dojo.widget.Dialog.superclass.postMixInProperties.apply(this,arguments); -if(this.closeNode){ -this.setCloseControl(this.closeNode); -} -},postCreate:function(){ -dojo.widget.Dialog.superclass.postCreate.apply(this,arguments); -dojo.widget.ModalDialogBase.prototype.postCreate.apply(this,arguments); -},show:function(){ -if(this.lifetime){ -this.timeRemaining=this.lifetime; -if(this.timerNode){ -this.timerNode.innerHTML=Math.ceil(this.timeRemaining/1000); -} -if(this.blockDuration&&this.closeNode){ -if(this.lifetime>this.blockDuration){ -this.closeNode.style.visibility="hidden"; -}else{ -this.closeNode.style.display="none"; -} -} -if(this.timer){ -clearInterval(this.timer); -} -this.timer=setInterval(dojo.lang.hitch(this,"_onTick"),100); -} -this.showModalDialog(); -dojo.widget.Dialog.superclass.show.call(this); -},onLoad:function(){ -this.placeModalDialog(); -dojo.widget.Dialog.superclass.onLoad.call(this); -},fillInTemplate:function(){ -},hide:function(){ -this.hideModalDialog(); -dojo.widget.Dialog.superclass.hide.call(this); -if(this.timer){ -clearInterval(this.timer); -} -},setTimerNode:function(node){ -this.timerNode=node; -},setCloseControl:function(node){ -this.closeNode=dojo.byId(node); -dojo.event.connect(this.closeNode,"onclick",this,"hide"); -},setShowControl:function(node){ -node=dojo.byId(node); -dojo.event.connect(node,"onclick",this,"show"); -},_onTick:function(){ -if(this.timer){ -this.timeRemaining-=100; -if(this.lifetime-this.timeRemaining>=this.blockDuration){ -if(this.closeNode){ -this.closeNode.style.visibility="visible"; -} -} -if(!this.timeRemaining){ -clearInterval(this.timer); -this.hide(); -}else{ -if(this.timerNode){ -this.timerNode.innerHTML=Math.ceil(this.timeRemaining/1000); -} -} -} -}}); -dojo.provide("dojo.widget.ResizeHandle"); -dojo.widget.defineWidget("dojo.widget.ResizeHandle",dojo.widget.HtmlWidget,{targetElmId:"",templateCssString:".dojoHtmlResizeHandle {\r\n\tfloat: right;\r\n\tposition: absolute;\r\n\tright: 2px;\r\n\tbottom: 2px;\r\n\twidth: 13px;\r\n\theight: 13px;\r\n\tz-index: 20;\r\n\tcursor: nw-resize;\r\n\tbackground-image: url(grabCorner.gif);\r\n\tline-height: 0px;\r\n}\r\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/ResizeHandle.css"),templateString:"
    ",postCreate:function(){ -dojo.event.connect(this.domNode,"onmousedown",this,"_beginSizing"); -},_beginSizing:function(e){ -if(this._isSizing){ -return false; -} -this.targetWidget=dojo.widget.byId(this.targetElmId); -this.targetDomNode=this.targetWidget?this.targetWidget.domNode:dojo.byId(this.targetElmId); -if(!this.targetDomNode){ -return; -} -this._isSizing=true; -this.startPoint={"x":e.clientX,"y":e.clientY}; -var mb=dojo.html.getMarginBox(this.targetDomNode); -this.startSize={"w":mb.width,"h":mb.height}; -dojo.event.kwConnect({srcObj:dojo.body(),srcFunc:"onmousemove",targetObj:this,targetFunc:"_changeSizing",rate:25}); -dojo.event.connect(dojo.body(),"onmouseup",this,"_endSizing"); -e.preventDefault(); -},_changeSizing:function(e){ -try{ -if(!e.clientX||!e.clientY){ -return; -} -} -catch(e){ -return; -} -var dx=this.startPoint.x-e.clientX; -var dy=this.startPoint.y-e.clientY; -var newW=this.startSize.w-dx; -var newH=this.startSize.h-dy; -if(this.minSize){ -var mb=dojo.html.getMarginBox(this.targetDomNode); -if(newW\r\n\t
    \r\n\t \t\r\n\t\t
    \r\n\t\t
    \r\n\t\t
    \r\n\t\t
    \r\n\t \t
    ${this.title}
    \r\n\t
    \r\n\r\n\t
    \r\n\r\n\t
    \r\n
    \r\n",templateCssString:"\r\n/********** Outer Window ***************/\r\n\r\n.dojoFloatingPane {\r\n\t/* essential css */\r\n\tposition: absolute;\r\n\toverflow: visible;\t\t/* so drop shadow is displayed */\r\n\tz-index: 10;\r\n\r\n\t/* styling css */\r\n\tborder: 1px solid;\r\n\tborder-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;\r\n\tbackground-color: ThreeDFace;\r\n}\r\n\r\n\r\n/********** Title Bar ****************/\r\n\r\n.dojoFloatingPaneTitleBar {\r\n\tvertical-align: top;\r\n\tmargin: 2px 2px 2px 2px;\r\n\tz-index: 10;\r\n\tbackground-color: #7596c6;\r\n\tcursor: default;\r\n\toverflow: hidden;\r\n\tborder-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;\r\n\tvertical-align: middle;\r\n}\r\n\r\n.dojoFloatingPaneTitleText {\r\n\tfloat: left;\r\n\tpadding: 2px 4px 2px 2px;\r\n\twhite-space: nowrap;\r\n\tcolor: CaptionText;\r\n\tfont: small-caption;\r\n}\r\n\r\n.dojoTitleBarIcon {\r\n\tfloat: left;\r\n\theight: 22px;\r\n\twidth: 22px;\r\n\tvertical-align: middle;\r\n\tmargin-right: 5px;\r\n\tmargin-left: 5px;\r\n}\r\n\r\n.dojoFloatingPaneActions{\r\n\tfloat: right;\r\n\tposition: absolute;\r\n\tright: 2px;\r\n\ttop: 2px;\r\n\tvertical-align: middle;\r\n}\r\n\r\n\r\n.dojoFloatingPaneActionItem {\r\n\tvertical-align: middle;\r\n\tmargin-right: 1px;\r\n\theight: 22px;\r\n\twidth: 22px;\r\n}\r\n\r\n\r\n.dojoFloatingPaneTitleBarIcon {\r\n\t/* essential css */\r\n\tfloat: left;\r\n\r\n\t/* styling css */\r\n\tmargin-left: 2px;\r\n\tmargin-right: 4px;\r\n\theight: 22px;\r\n}\r\n\r\n/* minimize/maximize icons are specified by CSS only */\r\n.dojoFloatingPaneMinimizeIcon,\r\n.dojoFloatingPaneMaximizeIcon,\r\n.dojoFloatingPaneRestoreIcon,\r\n.dojoFloatingPaneCloseIcon {\r\n\tvertical-align: middle;\r\n\theight: 22px;\r\n\twidth: 22px;\r\n\tfloat: right;\r\n}\r\n.dojoFloatingPaneMinimizeIcon {\r\n\tbackground-image: url(images/floatingPaneMinimize.gif);\r\n}\r\n.dojoFloatingPaneMaximizeIcon {\r\n\tbackground-image: url(images/floatingPaneMaximize.gif);\r\n}\r\n.dojoFloatingPaneRestoreIcon {\r\n\tbackground-image: url(images/floatingPaneRestore.gif);\r\n}\r\n.dojoFloatingPaneCloseIcon {\r\n\tbackground-image: url(images/floatingPaneClose.gif);\r\n}\r\n\r\n/* bar at bottom of window that holds resize handle */\r\n.dojoFloatingPaneResizebar {\r\n\tz-index: 10;\r\n\theight: 13px;\r\n\tbackground-color: ThreeDFace;\r\n}\r\n\r\n/************* Client Area ***************/\r\n\r\n.dojoFloatingPaneClient {\r\n\tposition: relative;\r\n\tz-index: 10;\r\n\tborder: 1px solid;\r\n\tborder-color: ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow;\r\n\tmargin: 2px;\r\n\tbackground-color: ThreeDFace;\r\n\tpadding: 8px;\r\n\tfont-family: Verdana, Helvetica, Garamond, sans-serif;\r\n\tfont-size: 12px;\r\n\toverflow: auto;\r\n}\r\n\r\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/FloatingPane.css"),fillInFloatingPaneTemplate:function(args,frag){ -var _b27=this.getFragNodeRef(frag); -dojo.html.copyStyle(this.domNode,_b27); -dojo.body().appendChild(this.domNode); -if(!this.isShowing()){ -this.windowState="minimized"; -} -if(this.iconSrc==""){ -dojo.html.removeNode(this.titleBarIcon); -}else{ -this.titleBarIcon.src=this.iconSrc.toString(); -} -if(this.titleBarDisplay){ -this.titleBar.style.display=""; -dojo.html.disableSelection(this.titleBar); -this.titleBarIcon.style.display=(this.iconSrc==""?"none":""); -this.minimizeAction.style.display=(this.displayMinimizeAction?"":"none"); -this.maximizeAction.style.display=(this.displayMaximizeAction&&this.windowState!="maximized"?"":"none"); -this.restoreAction.style.display=(this.displayMaximizeAction&&this.windowState=="maximized"?"":"none"); -this.closeAction.style.display=(this.displayCloseAction?"":"none"); -this.drag=new dojo.dnd.HtmlDragMoveSource(this.domNode); -if(this.constrainToContainer){ -this.drag.constrainTo(); -} -this.drag.setDragHandle(this.titleBar); -var self=this; -dojo.event.topic.subscribe("dragMove",function(info){ -if(info.source.domNode==self.domNode){ -dojo.event.topic.publish("floatingPaneMove",{source:self}); -} -}); -} -if(this.resizable){ -this.resizeBar.style.display=""; -this.resizeHandle=dojo.widget.createWidget("ResizeHandle",{targetElmId:this.widgetId,id:this.widgetId+"_resize"}); -this.resizeBar.appendChild(this.resizeHandle.domNode); -} -if(this.hasShadow){ -this.shadow=new dojo.lfx.shadow(this.domNode); -} -this.bgIframe=new dojo.html.BackgroundIframe(this.domNode); -if(this.taskBarId){ -this._taskBarSetup(); -} -dojo.body().removeChild(this.domNode); -},postCreate:function(){ -if(dojo.hostenv.post_load_){ -this._setInitialWindowState(); -}else{ -dojo.addOnLoad(this,"_setInitialWindowState"); -} -},maximizeWindow:function(evt){ -var mb=dojo.html.getMarginBox(this.domNode); -this.previous={width:mb.width||this.width,height:mb.height||this.height,left:this.domNode.style.left,top:this.domNode.style.top,bottom:this.domNode.style.bottom,right:this.domNode.style.right}; -if(this.domNode.parentNode.style.overflow.toLowerCase()!="hidden"){ -this.parentPrevious={overflow:this.domNode.parentNode.style.overflow}; -dojo.debug(this.domNode.parentNode.style.overflow); -this.domNode.parentNode.style.overflow="hidden"; -} -this.domNode.style.left=dojo.html.getPixelValue(this.domNode.parentNode,"padding-left",true)+"px"; -this.domNode.style.top=dojo.html.getPixelValue(this.domNode.parentNode,"padding-top",true)+"px"; -if((this.domNode.parentNode.nodeName.toLowerCase()=="body")){ -var _b2c=dojo.html.getViewport(); -var _b2d=dojo.html.getPadding(dojo.body()); -this.resizeTo(_b2c.width-_b2d.width,_b2c.height-_b2d.height); -}else{ -var _b2e=dojo.html.getContentBox(this.domNode.parentNode); -this.resizeTo(_b2e.width,_b2e.height); -} -this.maximizeAction.style.display="none"; -this.restoreAction.style.display=""; -if(this.resizeHandle){ -this.resizeHandle.domNode.style.display="none"; -} -this.drag.setDragHandle(null); -this.windowState="maximized"; -},minimizeWindow:function(evt){ -this.hide(); -for(var attr in this.parentPrevious){ -this.domNode.parentNode.style[attr]=this.parentPrevious[attr]; -} -this.lastWindowState=this.windowState; -this.windowState="minimized"; -},restoreWindow:function(evt){ -if(this.windowState=="minimized"){ -this.show(); -if(this.lastWindowState=="maximized"){ -this.domNode.parentNode.style.overflow="hidden"; -this.windowState="maximized"; -}else{ -this.windowState="normal"; -} -}else{ -if(this.windowState=="maximized"){ -for(var attr in this.previous){ -this.domNode.style[attr]=this.previous[attr]; -} -for(var attr in this.parentPrevious){ -this.domNode.parentNode.style[attr]=this.parentPrevious[attr]; -} -this.resizeTo(this.previous.width,this.previous.height); -this.previous=null; -this.parentPrevious=null; -this.restoreAction.style.display="none"; -this.maximizeAction.style.display=this.displayMaximizeAction?"":"none"; -if(this.resizeHandle){ -this.resizeHandle.domNode.style.display=""; -} -this.drag.setDragHandle(this.titleBar); -this.windowState="normal"; -}else{ -} -} -},toggleDisplay:function(){ -if(this.windowState=="minimized"){ -this.restoreWindow(); -}else{ -this.minimizeWindow(); -} -},closeWindow:function(evt){ -dojo.html.removeNode(this.domNode); -this.destroy(); -},onMouseDown:function(evt){ -this.bringToTop(); -},bringToTop:function(){ -var _b35=dojo.widget.manager.getWidgetsByType(this.widgetType); -var _b36=[]; -for(var x=0;x<_b35.length;x++){ -if(this.widgetId!=_b35[x].widgetId){ -_b36.push(_b35[x]); -} -} -_b36.sort(function(a,b){ -return a.domNode.style.zIndex-b.domNode.style.zIndex; -}); -_b36.push(this); -var _b3a=100; -for(x=0;x<_b36.length;x++){ -_b36[x].domNode.style.zIndex=_b3a+x*2; -} -},_setInitialWindowState:function(){ -if(this.isShowing()){ -this.width=-1; -var mb=dojo.html.getMarginBox(this.domNode); -this.resizeTo(mb.width,mb.height); -} -if(this.windowState=="maximized"){ -this.maximizeWindow(); -this.show(); -return; -} -if(this.windowState=="normal"){ -this.show(); -return; -} -if(this.windowState=="minimized"){ -this.hide(); -return; -} -this.windowState="minimized"; -},_taskBarSetup:function(){ -var _b3c=dojo.widget.getWidgetById(this.taskBarId); -if(!_b3c){ -if(this._taskBarConnectAttemptsthis._scrollThreshold){ -if(!this._fixEnabled){ -var _b4c=dojo.html.getMarginBox(tdn); -this.editor.editorObject.style.marginTop=_b4c.height+"px"; -if(isIE){ -tdn.style.left=dojo.html.abs(tdn,dojo.html.boxSizing.MARGIN_BOX).x; -if(tdn.previousSibling){ -this._IEOriginalPos=["after",tdn.previousSibling]; -}else{ -if(tdn.nextSibling){ -this._IEOriginalPos=["before",tdn.nextSibling]; -}else{ -this._IEOriginalPos=["",tdn.parentNode]; -} -} -dojo.body().appendChild(tdn); -dojo.html.addClass(tdn,"IEFixedToolbar"); -}else{ -with(tdn.style){ -position="fixed"; -top="0px"; -} -} -tdn.style.width=_b4c.width+"px"; -tdn.style.zIndex=1000; -this._fixEnabled=true; -} -if(!dojo.render.html.safari){ -var _b4d=(this.height)?parseInt(this.editor.height):this.editor._lastHeight; -if(_b4b>(this._scrollThreshold+_b4d)){ -tdn.style.display="none"; -}else{ -tdn.style.display=""; -} -} -}else{ -if(this._fixEnabled){ -(this.editor.object||this.editor.iframe).style.marginTop=null; -with(tdn.style){ -position=""; -top=""; -zIndex=""; -display=""; -} -if(isIE){ -tdn.style.left=""; -dojo.html.removeClass(tdn,"IEFixedToolbar"); -if(this._IEOriginalPos){ -dojo.html.insertAtPosition(tdn,this._IEOriginalPos[1],this._IEOriginalPos[0]); -this._IEOriginalPos=null; -}else{ -dojo.html.insertBefore(tdn,this.editor.object||this.editor.iframe); -} -} -tdn.style.width=""; -this._fixEnabled=false; -} -} -},destroy:function(){ -this._IEOriginalPos=null; -this._handleScroll=false; -clearInterval(this.scrollInterval); -this.editor.unregisterLoadedPlugin(this); -if(dojo.render.html.ie){ -dojo.html.removeClass(this.editor.toolbarWidget.domNode,"IEFixedToolbar"); -} -}}); -dojo.provide("dojo.widget.Editor2"); -dojo.widget.Editor2Manager=new dojo.widget.HandlerManager; -dojo.lang.mixin(dojo.widget.Editor2Manager,{_currentInstance:null,commandState:{Disabled:0,Latched:1,Enabled:2},getCurrentInstance:function(){ -return this._currentInstance; -},setCurrentInstance:function(inst){ -this._currentInstance=inst; -},getCommand:function(_b4f,name){ -var _b51; -name=name.toLowerCase(); -for(var i=0;ithis._updateTime||this._state==undefined){ -this._updateTime=this._editor._lastStateTimestamp; -try{ -if(this._editor.queryCommandEnabled(this._name)){ -if(this._editor.queryCommandState(this._name)){ -this._state=dojo.widget.Editor2Manager.commandState.Latched; -}else{ -this._state=dojo.widget.Editor2Manager.commandState.Enabled; -} -}else{ -this._state=dojo.widget.Editor2Manager.commandState.Disabled; -} -} -catch(e){ -this._state=dojo.widget.Editor2Manager.commandState.Enabled; -} -} -return this._state; -},getValue:function(){ -try{ -return this._editor.queryCommandValue(this._name); -} -catch(e){ -} -}}); -dojo.lang.declare("dojo.widget.Editor2FormatBlockCommand",dojo.widget.Editor2BrowserCommand,{}); -dojo.widget.defineWidget("dojo.widget.Editor2Dialog",[dojo.widget.HtmlWidget,dojo.widget.FloatingPaneBase,dojo.widget.ModalDialogBase],{templateString:"
    \r\n\t\r\n\t\r\n\t
    \r\n\t \t\r\n\t\t
    \r\n\t\t
    \r\n\t\t
    \r\n\t\t
    \r\n\t \t
    ${this.title}
    \r\n\t
    \r\n\r\n\t
    \r\n\t\r\n\t\r\n\t
    \r\n
    \r\n",modal:true,width:"",height:"",windowState:"minimized",displayCloseAction:true,contentFile:"",contentClass:"",fillInTemplate:function(args,frag){ -this.fillInFloatingPaneTemplate(args,frag); -dojo.widget.Editor2Dialog.superclass.fillInTemplate.call(this,args,frag); -},postCreate:function(){ -if(this.contentFile){ -dojo.require(this.contentFile); -} -if(this.modal){ -dojo.widget.ModalDialogBase.prototype.postCreate.call(this); -}else{ -with(this.domNode.style){ -zIndex=999; -display="none"; -} -} -dojo.widget.FloatingPaneBase.prototype.postCreate.apply(this,arguments); -dojo.widget.Editor2Dialog.superclass.postCreate.call(this); -if(this.width&&this.height){ -with(this.domNode.style){ -width=this.width; -height=this.height; -} -} -},createContent:function(){ -if(!this.contentWidget&&this.contentClass){ -this.contentWidget=dojo.widget.createWidget(this.contentClass); -this.addChild(this.contentWidget); -} -},show:function(){ -if(!this.contentWidget){ -dojo.widget.Editor2Dialog.superclass.show.apply(this,arguments); -this.createContent(); -dojo.widget.Editor2Dialog.superclass.hide.call(this); -} -if(!this.contentWidget||!this.contentWidget.loadContent()){ -return; -} -this.showFloatingPane(); -dojo.widget.Editor2Dialog.superclass.show.apply(this,arguments); -if(this.modal){ -this.showModalDialog(); -} -if(this.modal){ -this.bg.style.zIndex=this.domNode.style.zIndex-1; -} -},onShow:function(){ -dojo.widget.Editor2Dialog.superclass.onShow.call(this); -this.onFloatingPaneShow(); -},closeWindow:function(){ -this.hide(); -dojo.widget.Editor2Dialog.superclass.closeWindow.apply(this,arguments); -},hide:function(){ -if(this.modal){ -this.hideModalDialog(); -} -dojo.widget.Editor2Dialog.superclass.hide.call(this); -},checkSize:function(){ -if(this.isShowing()){ -if(this.modal){ -this._sizeBackground(); -} -this.placeModalDialog(); -this.onResized(); -} -}}); -dojo.widget.defineWidget("dojo.widget.Editor2DialogContent",dojo.widget.HtmlWidget,{widgetsInTemplate:true,loadContent:function(){ -return true; -},cancel:function(){ -this.parent.hide(); -}}); -dojo.lang.declare("dojo.widget.Editor2DialogCommand",dojo.widget.Editor2BrowserCommand,function(_b5d,name,_b5f){ -this.dialogParas=_b5f; -},{execute:function(){ -if(!this.dialog){ -if(!this.dialogParas.contentFile||!this.dialogParas.contentClass){ -alert("contentFile and contentClass should be set for dojo.widget.Editor2DialogCommand.dialogParas!"); -return; -} -this.dialog=dojo.widget.createWidget("Editor2Dialog",this.dialogParas); -dojo.body().appendChild(this.dialog.domNode); -dojo.event.connect(this,"destroy",this.dialog,"destroy"); -} -this.dialog.show(); -},getText:function(){ -return this.dialogParas.title||dojo.widget.Editor2DialogCommand.superclass.getText.call(this); -}}); -dojo.widget.Editor2ToolbarGroups={}; -dojo.widget.defineWidget("dojo.widget.Editor2",dojo.widget.RichText,function(){ -this._loadedCommands={}; -},{toolbarAlwaysVisible:false,toolbarWidget:null,scrollInterval:null,toolbarTemplatePath:dojo.uri.cache.set(dojo.uri.moduleUri("dojo.widget","templates/EditorToolbarOneline.html"), "
    \r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t<h>\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t 
    \r\n
    \r\n"),toolbarTemplateCssPath:null,toolbarPlaceHolder:"",_inSourceMode:false,_htmlEditNode:null,toolbarGroup:"",shareToolbar:false,contextMenuGroupSet:"",editorOnLoad:function(){ -dojo.event.topic.publish("dojo.widget.Editor2::preLoadingToolbar",this); -if(this.toolbarAlwaysVisible){ -} -if(this.toolbarWidget){ -this.toolbarWidget.show(); -dojo.html.insertBefore(this.toolbarWidget.domNode,this.domNode.firstChild); -}else{ -if(this.shareToolbar){ -dojo.deprecated("Editor2:shareToolbar is deprecated in favor of toolbarGroup","0.5"); -this.toolbarGroup="defaultDojoToolbarGroup"; -} -if(this.toolbarGroup){ -if(dojo.widget.Editor2ToolbarGroups[this.toolbarGroup]){ -this.toolbarWidget=dojo.widget.Editor2ToolbarGroups[this.toolbarGroup]; -} -} -if(!this.toolbarWidget){ -var _b60={shareGroup:this.toolbarGroup,parent:this}; -_b60.templateString=dojo.uri.cache.get(this.toolbarTemplatePath); -if(this.toolbarTemplateCssPath){ -_b60.templateCssPath=this.toolbarTemplateCssPath; -_b60.templateCssString=dojo.uri.cache.get(this.toolbarTemplateCssPath); -} -if(this.toolbarPlaceHolder){ -this.toolbarWidget=dojo.widget.createWidget("Editor2Toolbar",_b60,dojo.byId(this.toolbarPlaceHolder),"after"); -}else{ -this.toolbarWidget=dojo.widget.createWidget("Editor2Toolbar",_b60,this.domNode.firstChild,"before"); -} -if(this.toolbarGroup){ -dojo.widget.Editor2ToolbarGroups[this.toolbarGroup]=this.toolbarWidget; -} -dojo.event.connect(this,"close",this.toolbarWidget,"hide"); -this.toolbarLoaded(); -} -} -dojo.event.topic.registerPublisher("Editor2.clobberFocus",this,"clobberFocus"); -dojo.event.topic.subscribe("Editor2.clobberFocus",this,"setBlur"); -dojo.event.topic.publish("dojo.widget.Editor2::onLoad",this); -},toolbarLoaded:function(){ -},registerLoadedPlugin:function(obj){ -if(!this.loadedPlugins){ -this.loadedPlugins=[]; -} -this.loadedPlugins.push(obj); -},unregisterLoadedPlugin:function(obj){ -for(var i in this.loadedPlugins){ -if(this.loadedPlugins[i]===obj){ -delete this.loadedPlugins[i]; -return; -} -} -dojo.debug("dojo.widget.Editor2.unregisterLoadedPlugin: unknow plugin object: "+obj); -},execCommand:function(_b64,_b65){ -switch(_b64.toLowerCase()){ -case "htmltoggle": -this.toggleHtmlEditing(); -break; -default: -dojo.widget.Editor2.superclass.execCommand.apply(this,arguments); -} -},queryCommandEnabled:function(_b66,_b67){ -switch(_b66.toLowerCase()){ -case "htmltoggle": -return true; -default: -if(this._inSourceMode){ -return false; -} -return dojo.widget.Editor2.superclass.queryCommandEnabled.apply(this,arguments); -} -},queryCommandState:function(_b68,_b69){ -switch(_b68.toLowerCase()){ -case "htmltoggle": -return this._inSourceMode; -default: -return dojo.widget.Editor2.superclass.queryCommandState.apply(this,arguments); -} -},onClick:function(e){ -dojo.widget.Editor2.superclass.onClick.call(this,e); -if(dojo.widget.PopupManager){ -if(!e){ -e=this.window.event; -} -dojo.widget.PopupManager.onClick(e); -} -},clobberFocus:function(){ -},toggleHtmlEditing:function(){ -if(this===dojo.widget.Editor2Manager.getCurrentInstance()){ -if(!this._inSourceMode){ -var html=this.getEditorContent(); -this._inSourceMode=true; -if(!this._htmlEditNode){ -this._htmlEditNode=dojo.doc().createElement("textarea"); -dojo.html.insertAfter(this._htmlEditNode,this.editorObject); -} -this._htmlEditNode.style.display=""; -this._htmlEditNode.style.width="100%"; -this._htmlEditNode.style.height=dojo.html.getBorderBox(this.editNode).height+"px"; -this._htmlEditNode.value=html; -with(this.editorObject.style){ -position="absolute"; -left="-2000px"; -top="-2000px"; -} -}else{ -this._inSourceMode=false; -this._htmlEditNode.blur(); -with(this.editorObject.style){ -position=""; -left=""; -top=""; -} -var html=this._htmlEditNode.value; -dojo.lang.setTimeout(this,"replaceEditorContent",1,html); -this._htmlEditNode.style.display="none"; -this.focus(); -} -this.onDisplayChanged(null,true); -} -},setFocus:function(){ -if(dojo.widget.Editor2Manager.getCurrentInstance()===this){ -return; -} -this.clobberFocus(); -dojo.widget.Editor2Manager.setCurrentInstance(this); -},setBlur:function(){ -},saveSelection:function(){ -this._bookmark=null; -this._bookmark=dojo.withGlobal(this.window,dojo.html.selection.getBookmark); -},restoreSelection:function(){ -if(this._bookmark){ -this.focus(); -dojo.withGlobal(this.window,"moveToBookmark",dojo.html.selection,[this._bookmark]); -this._bookmark=null; -}else{ -dojo.debug("restoreSelection: no saved selection is found!"); -} -},_updateToolbarLastRan:null,_updateToolbarTimer:null,_updateToolbarFrequency:500,updateToolbar:function(_b6c){ -if((!this.isLoaded)||(!this.toolbarWidget)){ -return; -} -var diff=new Date()-this._updateToolbarLastRan; -if((!_b6c)&&(this._updateToolbarLastRan)&&((diff-1?"&":"?")+"struts.enableJSONValidation=true"; -if(!this.ajaxAfterValidation&&this.validate){ -_ba1=_ba1+(_ba1.indexOf("?")>-1?"&":"?")+"struts.validateOnly=true"; -} -if(dojo.dom.isTag(this.domNode,"INPUT","input")&&this.events=="onclick"&&this.domNode.type=="submit"&&!dojo.string.isBlank(this.domNode.name)&&!dojo.string.isBlank(this.domNode.value)){ -var enc=/utf/i.test("")?encodeURIComponent:dojo.string.encodeAscii; -_ba1=_ba1+(_ba1.indexOf("?")>-1?"&":"?")+enc(this.domNode.name)+"="+enc(this.domNode.value); -} -dojo.io.bind({url:_ba1,useCache:false,preventCache:true,formNode:self.formNode,formFilter:window[self.formFilter],transport:self.transport,handler:function(type,data,e){ -dojo.lang.hitch(self,"bindHandler")(type,data,e); -},mimetype:"text/html"}); -} -catch(ex){ -if(this.showError){ -var _ba6=dojo.string.isBlank(this.errorText)?ex:this.errorText; -this.setContent(_ba6); -} -} -} -},parse:function(s){ -this.log("Parsing: "+s); -var _ba8=[]; -var tmp=[]; -var _baa=[]; -while(_ba8){ -_ba8=s.match(/]*)>([\s\S]*?)<\/script>/i); -if(!_ba8){ -break; -} -if(_ba8[1]){ -attr=_ba8[1].match(/src=(['"]?)([^"']*)\1/i); -if(attr){ -var tmp2=attr[2].search(/.*(\bdojo\b(?:\.uncompressed)?\.js)$/); -if(tmp2>-1){ -this.log("Security note! inhibit:"+attr[2]+" from beeing loaded again."); -} -} -} -if(_ba8[2]){ -var sc=_ba8[2].replace(/(?:var )?\bdjConfig\b(?:[\s]*=[\s]*\{[^}]+\}|\.[\w]*[\s]*=[\s]*[^;\n]*)?;?|dojo\.hostenv\.writeIncludes\(\s*\);?/g,""); -if(!sc){ -continue; -} -tmp=[]; -while(tmp){ -tmp=sc.match(/dojo\.(?:(?:require(?:After)?(?:If)?)|(?:widget\.(?:manager\.)?registerWidgetPackage)|(?:(?:hostenv\.)?setModulePrefix))\((['"]).*?\1\)\s*;?/); -if(!tmp){ -break; -} -sc=sc.replace(tmp[0],""); -} -_baa.push(sc); -} -s=s.replace(/]*>[\s\S]*?<\/script>/i,""); -} -return {text:s,scripts:_baa}; -},_executeScripts:function(_bad){ -var self=this; -var tmp="",code=""; -for(var i=0;i<_bad.length;i++){ -if(_bad[i].path){ -dojo.io.bind(this._cacheSetting({"url":_bad[i].path,"load":function(type,_bb3){ -dojo.lang.hitch(self,tmp=";"+_bb3); -},"error":function(type,_bb5){ -_bb5.text=type+" downloading remote script"; -self._handleDefaults.call(self,_bb5,"onExecError","debug"); -},"mimetype":"text/plain","sync":true},this.cacheContent)); -code+=tmp; -}else{ -code+=_bad[i]; -} -} -try{ -if(this.scriptSeparation){ -delete this.scriptScope; -this.scriptScope=new (new Function("_container_",code+"; return this;"))(self); -}else{ -var djg=dojo.global(); -if(djg.execScript){ -djg.execScript(code); -}else{ -var djd=dojo.doc(); -var sc=djd.createElement("script"); -sc.appendChild(djd.createTextNode(code)); -(this.containerNode||this.domNode).appendChild(sc); -} -} -} -catch(e){ -e.text="Error running scripts from content:\n"+e.description; -this.log(e); -} -},_cacheSetting:function(_bb9,_bba){ -for(var x in this.bindArgs){ -if(dojo.lang.isUndefined(_bb9[x])){ -_bb9[x]=this.bindArgs[x]; -} -} -if(dojo.lang.isUndefined(_bb9.useCache)){ -_bb9.useCache=_bba; -} -if(dojo.lang.isUndefined(_bb9.preventCache)){ -_bb9.preventCache=!_bba; -} -if(dojo.lang.isUndefined(_bb9.mimetype)){ -_bb9.mimetype="text/html"; -} -return _bb9; -}}); -dojo.provide("dojo.lang.timing.Timer"); -dojo.lang.timing.Timer=function(_bbc){ -this.timer=null; -this.isRunning=false; -this.interval=_bbc; -this.onStart=null; -this.onStop=null; -}; -dojo.extend(dojo.lang.timing.Timer,{onTick:function(){ -},setInterval:function(_bbd){ -if(this.isRunning){ -dj_global.clearInterval(this.timer); -} -this.interval=_bbd; -if(this.isRunning){ -this.timer=dj_global.setInterval(dojo.lang.hitch(this,"onTick"),this.interval); -} -},start:function(){ -if(typeof this.onStart=="function"){ -this.onStart(); -} -this.isRunning=true; -this.timer=dj_global.setInterval(dojo.lang.hitch(this,"onTick"),this.interval); -},stop:function(){ -if(typeof this.onStop=="function"){ -this.onStop(); -} -this.isRunning=false; -dj_global.clearInterval(this.timer); -}}); -dojo.provide("struts.widget.BindDiv"); -dojo.widget.defineWidget("struts.widget.BindDiv",dojo.widget.ContentPane,{widgetType:"BindDiv",href:"",extractContent:false,parseContent:false,cacheContent:false,refreshOnShow:false,executeScripts:false,preload:true,updateFreq:0,delay:0,autoStart:true,timer:null,loadingText:"Loading...",showLoading:false,errorText:"",showError:true,listenTopics:"",notifyTopics:"",notifyTopicsArray:null,stopTimerListenTopics:"",startTimerListenTopics:"",beforeNotifyTopics:"",beforeNotifyTopicsArray:null,afterNotifyTopics:"",afterNotifyTopicsArray:null,errorNotifyTopics:"",errorNotifyTopicsArray:null,beforeLoading:"",afterLoading:"",formId:"",formFilter:"",indicator:"",parseContent:true,highlightColor:"",highlightDuration:2000,disabled:false,transport:"",onDownloadStart:function(_bbe){ -if(!this.showLoading){ -_bbe.returnValue=false; -return; -} -if(this.showLoading&&!dojo.string.isBlank(this.loadingText)){ -_bbe.text=this.loadingText; -} -},highlight:function(){ -if(!dojo.string.isBlank(this.highlightColor)){ -var _bbf=dojo.lfx.html.highlight([this.domNode],this.highlightColor,this.highlightDuration); -_bbf.play(); -} -},onDownloadError:function(_bc0){ -this.onError(_bc0); -},onContentError:function(_bc1){ -this.onError(_bc1); -},onExecError:function(_bc2){ -this.onError(_bc2); -},onError:function(_bc3){ -if(this.showError){ -if(!dojo.string.isBlank(this.errorText)){ -_bc3.text=this.errorText; -} -}else{ -_bc3.text=""; -} -},notify:function(data,type,e){ -if(this.notifyTopicsArray){ -var self=this; -dojo.lang.forEach(this.notifyTopicsArray,function(_bc8){ -try{ -dojo.event.topic.publish(_bc8,data,type,e,self); -} -catch(ex){ -self.log(ex); -} -}); -} -var _bc9=null; -switch(type){ -case "before": -this.notifyTo(this.beforeNotifyTopicsArray,null,e); -break; -case "load": -this.notifyTo(this.afterNotifyTopicsArray,data,e); -break; -case "error": -this.notifyTo(this.errorNotifyTopicsArray,data,e); -break; -} -},notifyTo:function(_bca,data,e){ -var self=this; -if(_bca){ -dojo.lang.forEach(_bca,function(_bce){ -try{ -if(data!=null){ -dojo.event.topic.publish(_bce,data,e,self); -}else{ -dojo.event.topic.publish(_bce,e,self); -} -} -catch(ex){ -self.log(ex); -} -}); -} -},postCreate:function(args,frag){ -if(this.handler!==""){ -this.setHandler(this.handler); -} -var self=this; -var _bd2=function(){ -dojo.lang.hitch(self,"refresh")(); -}; -var _bd3=function(){ -dojo.lang.hitch(self,"startTimer")(); -}; -if(this.updateFreq>0){ -this.timer=new dojo.lang.timing.Timer(this.updateFreq); -this.timer.onTick=_bd2; -if(this.autoStart){ -if(this.delay>0){ -dojo.lang.setTimeout(_bd3,this.delay); -}else{ -this.startTimer(); -} -} -}else{ -if(this.delay>0){ -dojo.lang.setTimeout(_bd2,this.delay); -} -} -if(!dojo.string.isBlank(this.listenTopics)){ -this.log("Listening to "+this.listenTopics+" to refresh"); -var _bd4=this.listenTopics.split(","); -if(_bd4){ -dojo.lang.forEach(_bd4,function(_bd5){ -dojo.event.topic.subscribe(_bd5,self,"refresh"); -}); -} -} -if(!dojo.string.isBlank(this.stopTimerListenTopics)){ -this.log("Listening to "+this.stopTimerListenTopics+" to stop timer"); -var _bd6=this.stopTimerListenTopics.split(","); -if(_bd6){ -dojo.lang.forEach(_bd6,function(_bd7){ -dojo.event.topic.subscribe(_bd7,self,"stopTimer"); -}); -} -} -if(!dojo.string.isBlank(this.startTimerListenTopics)){ -this.log("Listening to "+this.stopTimerListenTopics+" to start timer"); -var _bd8=this.startTimerListenTopics.split(","); -if(_bd8){ -dojo.lang.forEach(_bd8,function(_bd9){ -dojo.event.topic.subscribe(_bd9,self,"startTimer"); -}); -} -} -if(!dojo.string.isBlank(this.notifyTopics)){ -this.notifyTopicsArray=this.notifyTopics.split(","); -} -if(!dojo.string.isBlank(this.beforeNotifyTopics)){ -this.beforeNotifyTopicsArray=this.beforeNotifyTopics.split(","); -} -if(!dojo.string.isBlank(this.afterNotifyTopics)){ -this.afterNotifyTopicsArray=this.afterNotifyTopics.split(","); -} -if(!dojo.string.isBlank(this.errorNotifyTopics)){ -this.errorNotifyTopicsArray=this.errorNotifyTopics.split(","); -} -if(this.isShowing()&&this.preload&&this.updateFreq<=0&&this.delay<=0){ -this.refresh(); -} -},_downloadExternalContent:function(url,_bdb){ -var _bdc={cancel:false}; -this.notify(this.widgetId,"before",_bdc); -if(_bdc.cancel){ -return; -} -dojo.html.show(this.indicator); -this._handleDefaults("Loading...","onDownloadStart"); -var self=this; -dojo.io.bind({url:url,useCache:_bdb,preventCache:!_bdb,mimetype:"text/html",formNode:dojo.byId(self.formId),formFilter:window[self.formFilter],transport:self.transport,handler:function(type,data,e){ -dojo.html.hide(self.indicator); -self.notify(data,type,e); -if(type=="load"){ -self.onDownloadEnd.call(self,url,data); -self.highlight(); -}else{ -self._handleDefaults.call(self,"Error loading '"+url+"' ("+e.status+" "+e.statusText+")","onDownloadError"); -self.onLoad(); -} -}}); -},log:function(text){ -dojo.debug("["+this.widgetId+"] "+text); -},stopTimer:function(){ -if(this.timer&&this.timer.isRunning){ -this.log("stopping timer"); -this.timer.stop(); -} -},startTimer:function(){ -if(this.timer&&!this.timer.isRunning){ -this.log("starting timer with update interval "+this.updateFreq); -this.timer.start(); -} -},splitAndFixPaths:function(s,url){ -var _be4=[],_be5=[],tmp=[]; -var _be7=[],_be8=[],attr=[],_bea=[]; -var str="",path="",fix="",_bee="",tag="",_bf0=""; -if(!url){ -url="./"; -} -if(s){ -var _bf1=/]*>([\s\S]*?)<\/title>/i; -while(_be7=_bf1.exec(s)){ -_be4.push(_be7[1]); -s=s.substring(0,_be7.index)+s.substr(_be7.index+_be7[0].length); -} -if(this.adjustPaths){ -var _bf2=/<[a-z][a-z0-9]*[^>]*\s(?:(?:src|href|style)=[^>])+[^>]*>/i; -var _bf3=/\s(src|href|style)=(['"]?)([\w()\[\]\/.,\\'"-:;#=&?\s@!]+?)\2/i; -var _bf4=/^(?:[#]|(?:(?:https?|ftps?|file|javascript|mailto|news):))/; -while(tag=_bf2.exec(s)){ -str+=s.substring(0,tag.index); -s=s.substring((tag.index+tag[0].length),s.length); -tag=tag[0]; -_bee=""; -while(attr=_bf3.exec(tag)){ -path=""; -_bf0=attr[3]; -switch(attr[1].toLowerCase()){ -case "src": -case "href": -if(_bf4.exec(_bf0)){ -path=_bf0; -}else{ -path=(new dojo.uri.Uri(url,_bf0).toString()); -} -break; -case "style": -path=dojo.html.fixPathsInCssText(_bf0,url); -break; -default: -path=_bf0; -} -fix=" "+attr[1]+"="+attr[2]+path+attr[2]; -_bee+=tag.substring(0,attr.index)+fix; -tag=tag.substring((attr.index+attr[0].length),tag.length); -} -str+=_bee+tag; -} -s=str+s; -} -_bf1=/(?:<(style)[^>]*>([\s\S]*?)<\/style>|]*rel=['"]?stylesheet['"]?[^>]*)>)/i; -while(_be7=_bf1.exec(s)){ -if(_be7[1]&&_be7[1].toLowerCase()=="style"){ -_bea.push(dojo.html.fixPathsInCssText(_be7[2],url)); -}else{ -if(attr=_be7[3].match(/href=(['"]?)([^'">]*)\1/i)){ -_bea.push({path:attr[2]}); -} -} -s=s.substring(0,_be7.index)+s.substr(_be7.index+_be7[0].length); -} -var _bf1=/]*)>([\s\S]*?)<\/script>/i; -var _bf5=/src=(['"]?)([^"']*)\1/i; -var _bf6=/.*(\bdojo\b\.js(?:\.uncompressed\.js)?)$/; -var _bf7=/(?:var )?\bdjConfig\b(?:[\s]*=[\s]*\{[^}]+\}|\.[\w]*[\s]*=[\s]*[^;\n]*)?;?|dojo\.hostenv\.writeIncludes\(\s*\);?/g; -var _bf8=/dojo\.(?:(?:require(?:After)?(?:If)?)|(?:widget\.(?:manager\.)?registerWidgetPackage)|(?:(?:hostenv\.)?setModulePrefix|registerModulePath)|defineNamespace)\((['"]).*?\1\)\s*;?/; -while(_be7=_bf1.exec(s)){ -if(this.executeScripts&&_be7[1]){ -if(attr=_bf5.exec(_be7[1])){ -if(_bf6.exec(attr[2])){ -dojo.debug("Security note! inhibit:"+attr[2]+" from being loaded again."); -}else{ -_be5.push({path:attr[2]}); -} -} -} -if(_be7[2]){ -var sc=_be7[2].replace(_bf7,""); -if(!sc){ -continue; -} -while(tmp=_bf8.exec(sc)){ -_be8.push(tmp[0]); -sc=sc.substring(0,tmp.index)+sc.substr(tmp.index+tmp[0].length); -} -if(this.executeScripts){ -_be5.push(sc); -} -} -s=s.substr(0,_be7.index)+s.substr(_be7.index+_be7[0].length); -} -if(this.extractContent){ -_be7=s.match(/]*>\s*([\s\S]+)\s*<\/body>/im); -if(_be7){ -s=_be7[1]; -} -} -if(this.executeScripts&&this.scriptSeparation){ -var _bf1=/(<[a-zA-Z][a-zA-Z0-9]*\s[^>]*?\S=)((['"])[^>]*scriptScope[^>]*>)/; -var _bfa=/([\s'";:\(])scriptScope(.*)/; -str=""; -while(tag=_bf1.exec(s)){ -tmp=((tag[3]=="'")?"\"":"'"); -fix=""; -str+=s.substring(0,tag.index)+tag[1]; -while(attr=_bfa.exec(tag[2])){ -tag[2]=tag[2].substring(0,attr.index)+attr[1]+"dojo.widget.byId("+tmp+this.widgetId+tmp+").scriptScope"+attr[2]; -} -str+=tag[2]; -s=s.substr(tag.index+tag[0].length); -} -s=str+s; -} -} -return {"xml":s,"styles":_bea,"titles":_be4,"requires":_be8,"scripts":_be5,"url":url}; -}}); -dojo.provide("struts.widget.BindAnchor"); -dojo.widget.defineWidget("struts.widget.BindAnchor",struts.widget.Bind,{widgetType:"BindAnchor",events:"onclick",postCreate:function(){ -struts.widget.BindAnchor.superclass.postCreate.apply(this); -this.domNode.href="#"; -}}); -dojo.provide("dojo.widget.html.stabile"); -dojo.widget.html.stabile={_sqQuotables:new RegExp("([\\\\'])","g"),_depth:0,_recur:false,depthLimit:2}; -dojo.widget.html.stabile.getState=function(id){ -dojo.widget.html.stabile.setup(); -return dojo.widget.html.stabile.widgetState[id]; -}; -dojo.widget.html.stabile.setState=function(id,_bfd,_bfe){ -dojo.widget.html.stabile.setup(); -dojo.widget.html.stabile.widgetState[id]=_bfd; -if(_bfe){ -dojo.widget.html.stabile.commit(dojo.widget.html.stabile.widgetState); -} -}; -dojo.widget.html.stabile.setup=function(){ -if(!dojo.widget.html.stabile.widgetState){ -var text=dojo.widget.html.stabile._getStorage().value; -dojo.widget.html.stabile.widgetState=text?dj_eval("("+text+")"):{}; -} -}; -dojo.widget.html.stabile.commit=function(_c00){ -dojo.widget.html.stabile._getStorage().value=dojo.widget.html.stabile.description(_c00); -}; -dojo.widget.html.stabile.description=function(v,_c02){ -var _c03=dojo.widget.html.stabile._depth; -var _c04=function(){ -return this.description(this,true); -}; -try{ -if(v===void (0)){ -return "undefined"; -} -if(v===null){ -return "null"; -} -if(typeof (v)=="boolean"||typeof (v)=="number"||v instanceof Boolean||v instanceof Number){ -return v.toString(); -} -if(typeof (v)=="string"||v instanceof String){ -var v1=v.replace(dojo.widget.html.stabile._sqQuotables,"\\$1"); -v1=v1.replace(/\n/g,"\\n"); -v1=v1.replace(/\r/g,"\\r"); -return "'"+v1+"'"; -} -if(v instanceof Date){ -return "new Date("+d.getFullYear+","+d.getMonth()+","+d.getDate()+")"; -} -var d; -if(v instanceof Array||v.push){ -if(_c03>=dojo.widget.html.stabile.depthLimit){ -return "[ ... ]"; -} -d="["; -var _c07=true; -dojo.widget.html.stabile._depth++; -for(var i=0;i=dojo.widget.html.stabile.depthLimit){ -return "{ ... }"; -} -if(typeof (v.hasOwnProperty)!="function"&&v.prototype){ -throw new Error("description: "+v+" not supported by script engine"); -} -var _c07=true; -d="{"; -dojo.widget.html.stabile._depth++; -for(var key in v){ -if(v[key]==void (0)||typeof (v[key])=="function"){ -continue; -} -if(_c07){ -_c07=false; -}else{ -d+=", "; -} -var kd=key; -if(!kd.match(/^[a-zA-Z_][a-zA-Z0-9_]*$/)){ -kd=arguments.callee(key,_c02); -} -d+=kd+": "+arguments.callee(v[key],_c02); -} -return d+"}"; -} -if(_c02){ -if(dojo.widget.html.stabile._recur){ -var _c0b=Object.prototype.toString; -return _c0b.apply(v,[]); -}else{ -dojo.widget.html.stabile._recur=true; -return v.toString(); -} -}else{ -throw new Error("Unknown type: "+v); -return "'unknown'"; -} -} -finally{ -dojo.widget.html.stabile._depth=_c03; -} -}; -dojo.widget.html.stabile._getStorage=function(){ -if(dojo.widget.html.stabile.dataField){ -return dojo.widget.html.stabile.dataField; -} -var form=document.forms._dojo_form; -return dojo.widget.html.stabile.dataField=form?form.stabile:{value:""}; -}; -dojo.provide("dojo.widget.ComboBox"); -dojo.declare("dojo.widget.incrementalComboBoxDataProvider",null,function(_c0d){ -this.searchUrl=_c0d.dataUrl; -this._cache={}; -this._inFlight=false; -this._lastRequest=null; -this.allowCache=false; -},{_addToCache:function(_c0e,data){ -if(this.allowCache){ -this._cache[_c0e]=data; -} -},startSearch:function(_c10,_c11){ -if(this._inFlight){ -} -var tss=encodeURIComponent(_c10); -var _c13=dojo.string.substituteParams(this.searchUrl,{"searchString":tss}); -var _c14=this; -var _c15=this._lastRequest=dojo.io.bind({url:_c13,method:"get",mimetype:"text/json",load:function(type,data,evt){ -_c14._inFlight=false; -if(!dojo.lang.isArray(data)){ -var _c19=[]; -for(var key in data){ -_c19.push([data[key],key]); -} -data=_c19; -} -_c14._addToCache(_c10,data); -if(_c15==_c14._lastRequest){ -_c11(data); -} -}}); -this._inFlight=true; -}}); -dojo.declare("dojo.widget.basicComboBoxDataProvider",null,function(_c1b,node){ -this._data=[]; -this.searchLimit=30; -this.searchType="STARTSTRING"; -this.caseSensitive=false; -if(!dj_undef("dataUrl",_c1b)&&!dojo.string.isBlank(_c1b.dataUrl)){ -this._getData(_c1b.dataUrl); -}else{ -if((node)&&(node.nodeName.toLowerCase()=="select")){ -var opts=node.getElementsByTagName("option"); -var ol=opts.length; -var data=[]; -for(var x=0;x0)&&(ret.length>=this.searchLimit)){ -break; -} -var _c30=new String((!this.caseSensitive)?this._data[x][0].toLowerCase():this._data[x][0]); -if(_c30.length<_c2b.length){ -continue; -} -if(st=="STARTSTRING"){ -if(_c2b==_c30.substr(0,_c2b.length)){ -ret.push(this._data[x]); -} -}else{ -if(st=="SUBSTRING"){ -if(_c30.indexOf(_c2b)>=0){ -ret.push(this._data[x]); -} -}else{ -if(st=="STARTWORD"){ -var idx=_c30.indexOf(_c2b); -if(idx==0){ -ret.push(this._data[x]); -} -if(idx<=0){ -continue; -} -var _c32=false; -while(idx!=-1){ -if(" ,/(".indexOf(_c30.charAt(idx-1))!=-1){ -_c32=true; -break; -} -idx=_c30.indexOf(_c2b,idx+1); -} -if(!_c32){ -continue; -}else{ -ret.push(this._data[x]); -} -} -} -} -} -_c2c(ret); -},setData:function(_c33){ -this._data=_c33; -}}); -dojo.widget.defineWidget("dojo.widget.ComboBox",dojo.widget.HtmlWidget,{forceValidOption:false,searchType:"stringstart",dataProvider:null,autoComplete:true,searchDelay:100,dataUrl:"",fadeTime:200,maxListLength:8,mode:"local",selectedResult:null,dataProviderClass:"",buttonSrc:dojo.uri.moduleUri("dojo.widget","templates/images/combo_box_arrow.png"),dropdownToggle:"fade",templateString:"\r\n",templateCssString:".dojoComboBoxOuter {\r\n\tborder: 0px !important;\r\n\tmargin: 0px !important;\r\n\tpadding: 0px !important;\r\n\tbackground: transparent !important;\r\n\twhite-space: nowrap !important;\r\n}\r\n\r\n.dojoComboBox {\r\n\tborder: 1px inset #afafaf;\r\n\tmargin: 0px;\r\n\tpadding: 0px;\r\n\tvertical-align: middle !important;\r\n\tfloat: none !important;\r\n\tposition: static !important;\r\n\tdisplay: inline !important;\r\n}\r\n\r\n/* the input box */\r\ninput.dojoComboBox {\r\n\tborder-right-width: 0px !important; \r\n\tmargin-right: 0px !important;\r\n\tpadding-right: 0px !important;\r\n}\r\n\r\n/* the down arrow */\r\nimg.dojoComboBox {\r\n\tborder-left-width: 0px !important;\r\n\tpadding-left: 0px !important;\r\n\tmargin-left: 0px !important;\r\n}\r\n\r\n/* IE vertical-alignment calculations can be off by +-1 but these margins are collapsed away */\r\n.dj_ie img.dojoComboBox {\r\n\tmargin-top: 1px; \r\n\tmargin-bottom: 1px; \r\n}\r\n\r\n/* the drop down */\r\n.dojoComboBoxOptions {\r\n\tfont-family: Verdana, Helvetica, Garamond, sans-serif;\r\n\t/* font-size: 0.7em; */\r\n\tbackground-color: white;\r\n\tborder: 1px solid #afafaf;\r\n\tposition: absolute;\r\n\tz-index: 1000; \r\n\toverflow: auto;\r\n\tcursor: default;\r\n}\r\n\r\n.dojoComboBoxItem {\r\n\tpadding-left: 2px;\r\n\tpadding-top: 2px;\r\n\tmargin: 0px;\r\n}\r\n\r\n.dojoComboBoxItemEven {\r\n\tbackground-color: #f4f4f4;\r\n}\r\n\r\n.dojoComboBoxItemOdd {\r\n\tbackground-color: white;\r\n}\r\n\r\n.dojoComboBoxItemHighlight {\r\n\tbackground-color: #63709A;\r\n\tcolor: white;\r\n}\r\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/ComboBox.css"),setValue:function(_c34){ -this.comboBoxValue.value=_c34; -if(this.textInputNode.value!=_c34){ -this.textInputNode.value=_c34; -dojo.widget.html.stabile.setState(this.widgetId,this.getState(),true); -this.onValueChanged(_c34); -} -},onValueChanged:function(_c35){ -},getValue:function(){ -return this.comboBoxValue.value; -},getState:function(){ -return {value:this.getValue()}; -},setState:function(_c36){ -this.setValue(_c36.value); -},enable:function(){ -this.disabled=false; -this.textInputNode.removeAttribute("disabled"); -},disable:function(){ -this.disabled=true; -this.textInputNode.setAttribute("disabled",true); -},_getCaretPos:function(_c37){ -if(dojo.lang.isNumber(_c37.selectionStart)){ -return _c37.selectionStart; -}else{ -if(dojo.render.html.ie){ -var tr=document.selection.createRange().duplicate(); -var ntr=_c37.createTextRange(); -tr.move("character",0); -ntr.move("character",0); -try{ -ntr.setEndPoint("EndToEnd",tr); -return String(ntr.text).replace(/\r/g,"").length; -} -catch(e){ -return 0; -} -} -} -},_setCaretPos:function(_c3a,_c3b){ -_c3b=parseInt(_c3b); -this._setSelectedRange(_c3a,_c3b,_c3b); -},_setSelectedRange:function(_c3c,_c3d,end){ -if(!end){ -end=_c3c.value.length; -} -if(_c3c.setSelectionRange){ -_c3c.focus(); -_c3c.setSelectionRange(_c3d,end); -}else{ -if(_c3c.createTextRange){ -var _c3f=_c3c.createTextRange(); -with(_c3f){ -collapse(true); -moveEnd("character",end); -moveStart("character",_c3d); -select(); -} -}else{ -_c3c.value=_c3c.value; -_c3c.blur(); -_c3c.focus(); -var dist=parseInt(_c3c.value.length)-end; -var _c41=String.fromCharCode(37); -var tcc=_c41.charCodeAt(0); -for(var x=0;x0)){ -var cpos=this._getCaretPos(this.textInputNode); -if((cpos+1)>this.textInputNode.value.length){ -this.textInputNode.value+=_c56[0][0].substr(cpos); -this._setSelectedRange(this.textInputNode,cpos,this.textInputNode.value.length); -} -} -var even=true; -while(_c56.length){ -var tr=_c56.shift(); -if(tr){ -var td=document.createElement("div"); -td.appendChild(document.createTextNode(tr[0])); -td.setAttribute("resultName",tr[0]); -td.setAttribute("resultValue",tr[1]); -td.className="dojoComboBoxItem "+((even)?"dojoComboBoxItemEven":"dojoComboBoxItemOdd"); -even=(!even); -this.optionsListNode.appendChild(td); -} -} -this._showResultList(); -},_onFocusInput:function(){ -this._hasFocus=true; -},_onBlurInput:function(){ -this._hasFocus=false; -this._handleBlurTimer(true,500); -},_handleBlurTimer:function(_c5b,_c5c){ -if(this.blurTimer&&(_c5b||_c5c)){ -clearTimeout(this.blurTimer); -} -if(_c5c){ -this.blurTimer=dojo.lang.setTimeout(this,"_checkBlurred",_c5c); -} -},_onMouseOver:function(evt){ -if(!this._mouseover_list){ -this._handleBlurTimer(true,0); -this._mouseover_list=true; -} -},_onMouseOut:function(evt){ -var _c5f=evt.relatedTarget; -try{ -if(!_c5f||_c5f.parentNode!=this.optionsListNode){ -this._mouseover_list=false; -this._handleBlurTimer(true,100); -this._tryFocus(); -} -} -catch(e){ -} -},_isInputEqualToResult:function(_c60){ -var _c61=this.textInputNode.value; -if(!this.dataProvider.caseSensitive){ -_c61=_c61.toLowerCase(); -_c60=_c60.toLowerCase(); -} -return (_c61==_c60); -},_isValidOption:function(){ -var tgt=dojo.html.firstElement(this.optionsListNode); -var _c63=false; -while(!_c63&&tgt){ -if(this._isInputEqualToResult(tgt.getAttribute("resultName"))){ -_c63=true; -}else{ -tgt=dojo.html.nextElement(tgt); -} -} -return _c63; -},_checkBlurred:function(){ -if(!this._hasFocus&&!this._mouseover_list){ -this._hideResultList(); -if(!this.textInputNode.value.length){ -this.setAllValues("",""); -return; -} -var _c64=this._isValidOption(); -if(this.forceValidOption&&!_c64){ -this.setAllValues("",""); -return; -} -if(!_c64){ -this.setSelectedValue(""); -} -} -},_selectOption:function(evt){ -var tgt=null; -if(!evt){ -evt={target:this._highlighted_option}; -} -if(!dojo.html.isDescendantOf(evt.target,this.optionsListNode)){ -if(!this.textInputNode.value.length){ -return; -} -tgt=dojo.html.firstElement(this.optionsListNode); -if(!tgt||!this._isInputEqualToResult(tgt.getAttribute("resultName"))){ -return; -} -}else{ -tgt=evt.target; -} -while((tgt.nodeType!=1)||(!tgt.getAttribute("resultName"))){ -tgt=tgt.parentNode; -if(tgt===dojo.body()){ -return false; -} -} -this.selectedResult=[tgt.getAttribute("resultName"),tgt.getAttribute("resultValue")]; -this.setAllValues(tgt.getAttribute("resultName"),tgt.getAttribute("resultValue")); -if(!evt.noHide){ -this._hideResultList(); -this._setSelectedRange(this.textInputNode,0,null); -} -this._tryFocus(); -},_clearResultList:function(){ -if(this.optionsListNode.innerHTML){ -this.optionsListNode.innerHTML=""; -} -},_hideResultList:function(){ -this.popupWidget.close(); -},_showResultList:function(){ -var _c67=this.optionsListNode.childNodes; -if(_c67.length){ -var _c68=Math.min(_c67.length,this.maxListLength); -with(this.optionsListNode.style){ -display=""; -if(_c68==_c67.length){ -height=""; -}else{ -height=_c68*dojo.html.getMarginBox(_c67[0]).height+"px"; -} -width=(dojo.html.getMarginBox(this.domNode).width-2)+"px"; -} -this.popupWidget.open(this.domNode,this,this.downArrowNode); -}else{ -this._hideResultList(); -} -},handleArrowClick:function(){ -this._handleBlurTimer(true,0); -this._tryFocus(); -if(this.popupWidget.isShowingNow){ -this._hideResultList(); -}else{ -this._startSearch(""); -} -},_tryFocus:function(){ -try{ -this.textInputNode.focus(); -} -catch(e){ -} -},_startSearchFromInput:function(){ -this._startSearch(this.textInputNode.value); -},_startSearch:function(key){ -this.dataProvider.startSearch(key,dojo.lang.hitch(this,"_openResultList")); -},postCreate:function(){ -this.onResize(); -dojo.event.connect(this.textInputNode,"onblur",this,"_onBlurInput"); -dojo.event.connect(this.textInputNode,"onfocus",this,"_onFocusInput"); -if(this.disabled){ -this.disable(); -} -var s=dojo.widget.html.stabile.getState(this.widgetId); -if(s){ -this.setState(s); -} -}}); -dojo.provide("struts.widget.ComboBox"); -struts.widget.ComboBoxDataProvider=function(_c6b,node){ -this.data=[]; -this.searchLimit=_c6b.searchLimit; -this.searchType="STARTSTRING"; -this.caseSensitive=false; -this._lastSearch=""; -this._lastSearchResults=null; -this.firstRequest=true; -this.cbox=_c6b; -this.formId=this.cbox.formId; -this.formFilter=this.cbox.formFilter; -this.transport=this.cbox.transport; -this.getData=function(url){ -dojo.html.show(this.cbox.indicator); -dojo.io.bind({url:url,formNode:dojo.byId(this.formId),formFilter:window[this.formFilter],transport:this.transport,handler:dojo.lang.hitch(this,function(type,data,evt){ -dojo.html.hide(this.cbox.indicator); -if(!this.firstRequest||type=="error"){ -this.cbox.notify.apply(this.cbox,[data,type,evt]); -} -this.firstRequest=false; -var _c71=null; -var _c72=data[dojo.string.isBlank(this.cbox.dataFieldName)?this.cbox.name:this.cbox.dataFieldName]; -if(!dojo.lang.isArray(data)){ -if(_c72){ -if(dojo.lang.isArray(_c72)){ -_c71=_c72; -}else{ -if(dojo.lang.isObject(_c72)){ -_c71=[]; -for(var key in _c72){ -_c71.push([key,_c72[key]]); -} -} -} -}else{ -var _c74=[]; -for(var key in data){ -if(dojo.string.startsWith(key,this.cbox.name)){ -_c71=data[key]; -break; -}else{ -_c74.push([key,data[key]]); -} -if(!_c71&&dojo.lang.isArray(data[key])&&!dojo.lang.isString(data[key])){ -_c71=data[key]; -} -} -if(!_c71){ -_c71=_c74; -} -} -data=_c71; -} -this.setData(data); -}),mimetype:"text/json"}); -}; -this.startSearch=function(_c75,_c76){ -this._preformSearch(_c75,_c76); -}; -this._preformSearch=function(_c77,_c78){ -var st=this.searchType; -var ret=[]; -if(!this.caseSensitive){ -_c77=_c77.toLowerCase(); -} -for(var x=0;x0)&&(ret.length>=this.searchLimit)){ -break; -} -var _c7c=new String((!this.caseSensitive)?this.data[x][0].toLowerCase():this.data[x][0]); -if(_c7c.length<_c77.length){ -continue; -} -if(st=="STARTSTRING"){ -if(_c77==_c7c.substr(0,_c77.length)){ -ret.push(this.data[x]); -} -}else{ -if(st=="SUBSTRING"){ -if(_c7c.indexOf(_c77)>=0){ -ret.push(this.data[x]); -} -}else{ -if(st=="STARTWORD"){ -var idx=_c7c.indexOf(_c77); -if(idx==0){ -ret.push(this.data[x]); -} -if(idx<=0){ -continue; -} -var _c7e=false; -while(idx!=-1){ -if(" ,/(".indexOf(_c7c.charAt(idx-1))!=-1){ -_c7e=true; -break; -} -idx=_c7c.indexOf(_c77,idx+1); -} -if(!_c7e){ -continue; -}else{ -ret.push(this.data[x]); -} -} -} -} -} -_c78(ret); -}; -this.addData=function(_c7f){ -this.data=this.data.concat(_c7f); -}; -this.setData=function(_c80){ -this.data=_c80; -for(var i=0;i0)){ -var cpos=this._getCaretPos(this.textInputNode); -if((cpos+1)>this.textInputNode.value.length){ -this.textInputNode.value+=_c8b[0][0].substr(cpos); -this._setSelectedRange(this.textInputNode,cpos,this.textInputNode.value.length); -} -} -var _c8d=this.textInputNode.value; -var even=true; -while(_c8b.length){ -var tr=_c8b.shift(); -if(tr){ -var td=document.createElement("div"); -var text=tr[0]; -var i=text.toLowerCase().indexOf(_c8d.toLowerCase()); -if(i>=0){ -var pre=text.substring(0,i); -var _c94=text.substring(i,i+_c8d.length); -var post=text.substring(i+_c8d.length); -if(!dojo.string.isBlank(pre)){ -td.appendChild(document.createTextNode(pre)); -} -var _c96=document.createElement("b"); -td.appendChild(_c96); -_c96.appendChild(document.createTextNode(_c94)); -td.appendChild(document.createTextNode(post)); -}else{ -td.appendChild(document.createTextNode(tr[0])); -} -td.setAttribute("resultName",tr[0]); -td.setAttribute("resultValue",tr[1]); -td.className="dojoComboBoxItem "+((even)?"dojoComboBoxItemEven":"dojoComboBoxItemOdd"); -even=(!even); -this.optionsListNode.appendChild(td); -} -} -this.showResultList(); -},postCreate:function(){ -struts.widget.ComboBox.superclass.postCreate.apply(this); -var self=this; -if(!dojo.string.isBlank(this.listenTopics)){ -var _c98=this.listenTopics.split(","); -for(var i=0;i<_c98.length;i++){ -dojo.event.topic.subscribe(_c98[i],function(){ -var _c9a={cancel:false}; -self.notify(this.widgetId,"before",_c9a); -if(_c9a.cancel){ -return; -} -self.clearValues(); -self.dataProvider.getData(self.dataUrl); -}); -} -} -if(!dojo.string.isBlank(this.notifyTopics)){ -this.notifyTopicsArray=this.notifyTopics.split(","); -} -if(!dojo.string.isBlank(this.beforeNotifyTopics)){ -this.beforeNotifyTopicsArray=this.beforeNotifyTopics.split(","); -} -if(!dojo.string.isBlank(this.afterNotifyTopics)){ -this.afterNotifyTopicsArray=this.afterNotifyTopics.split(","); -} -if(!dojo.string.isBlank(this.errorNotifyTopics)){ -this.errorNotifyTopicsArray=this.errorNotifyTopics.split(","); -} -if(!dojo.string.isBlank(this.valueNotifyTopics)){ -this.valueNotifyTopicsArray=this.valueNotifyTopics.split(","); -} -this.comboBoxSelectionValue.name=dojo.string.isBlank(this.keyName)?this.name+"Key":this.keyName; -this.comboBoxValue.value=this.initialValue; -this.comboBoxSelectionValue.value=this.initialKey; -this.textInputNode.value=this.initialValue; -if(!this.visibleDownArrow){ -dojo.html.hide(this.downArrowNode); -} -if(!dojo.string.isBlank(this.searchType)){ -this.dataProvider.searchType=this.searchType.toUpperCase(); -} -},clearValues:function(){ -this.comboBoxValue.value=""; -this.comboBoxSelectionValue.value=""; -this.textInputNode.value=""; -},onValueChanged:function(data){ -this.notify(data,"valuechanged",null); -},notify:function(data,type,e){ -var self=this; -if(this.notifyTopicsArray){ -dojo.lang.forEach(this.notifyTopicsArray,function(_ca0){ -try{ -dojo.event.topic.publish(_ca0,data,type,e,self); -} -catch(ex){ -self.log(ex); -} -}); -} -var _ca1=null; -switch(type){ -case "before": -this.notifyTo(this.beforeNotifyTopicsArray,[e,this]); -break; -case "load": -this.notifyTo(this.afterNotifyTopicsArray,[data,e,this]); -break; -case "error": -this.notifyTo(this.errorNotifyTopicsArray,[data,e,this]); -break; -case "valuechanged": -this.notifyTo(this.valueNotifyTopicsArray,[this.getSelectedValue(),this.getSelectedKey(),this.getText(),this]); -break; -} -},notifyTo:function(_ca2,_ca3){ -var self=this; -if(_ca2){ -dojo.lang.forEach(_ca2,function(_ca5){ -try{ -dojo.event.topic.publishApply(_ca5,_ca3); -} -catch(ex){ -self.log(ex); -} -}); -} -},log:function(text){ -dojo.debug("["+(this.widgetId?this.widgetId:"unknown")+"] "+text); -},_startSearchFromInput:function(){ -var _ca7=this.textInputNode.value; -if(this.loadOnType){ -if(_ca7.length>=this.loadMinimum){ -var _ca8=this.dataUrl+(this.dataUrl.indexOf("?")>-1?"&":"?"); -_ca8+=this.name+"="+_ca7; -this.dataProvider.getData(_ca8); -this._startSearch(_ca7); -}else{ -this._hideResultList(); -} -}else{ -this._startSearch(_ca7); -} -},setSelectedKey:function(key){ -var data=this.dataProvider.data; -for(element in data){ -var obj=data[element]; -if(obj[1].toString()==key){ -this.setValue(obj[0].toString()); -this.comboBoxSelectionValue.value=obj[1].toString(); -} -} -},getSelectedKey:function(){ -return this.comboBoxSelectionValue.value; -},getSelectedValue:function(){ -return this.comboBoxValue.value; -},getText:function(){ -return this.textInputNode.value; -}}); -dojo.provide("dojo.widget.DropdownContainer"); -dojo.widget.defineWidget("dojo.widget.DropdownContainer",dojo.widget.HtmlWidget,{inputWidth:"7em",id:"",inputId:"",inputName:"",iconURL:dojo.uri.moduleUri("dojo.widget","templates/images/combo_box_arrow.png"),copyClasses:false,iconAlt:"",containerToggle:"plain",containerToggleDuration:150,templateString:" \"${this.iconAlt}\"",templateCssPath:"",isContainer:true,attachTemplateNodes:function(){ -dojo.widget.DropdownContainer.superclass.attachTemplateNodes.apply(this,arguments); -this.popup=dojo.widget.createWidget("PopupContainer",{toggle:this.containerToggle,toggleDuration:this.containerToggleDuration}); -this.containerNode=this.popup.domNode; -},fillInTemplate:function(args,frag){ -this.domNode.appendChild(this.popup.domNode); -if(this.id){ -this.domNode.id=this.id; -} -if(this.inputId){ -this.inputNode.id=this.inputId; -} -if(this.inputName){ -this.inputNode.name=this.inputName; -} -this.inputNode.style.width=this.inputWidth; -this.inputNode.disabled=this.disabled; -if(this.copyClasses){ -this.inputNode.style=""; -this.inputNode.className=this.getFragNodeRef(frag).className; -} -dojo.event.connect(this.inputNode,"onchange",this,"onInputChange"); -},onIconClick:function(evt){ -if(this.disabled){ -return; -} -if(!this.popup.isShowingNow){ -this.popup.open(this.inputNode,this,this.buttonNode); -}else{ -this.popup.close(); -} -},hideContainer:function(){ -if(this.popup.isShowingNow){ -this.popup.close(); -} -},onInputChange:function(){ -},enable:function(){ -this.inputNode.disabled=false; -dojo.widget.DropdownContainer.superclass.enable.apply(this,arguments); -},disable:function(){ -this.inputNode.disabled=true; -dojo.widget.DropdownContainer.superclass.disable.apply(this,arguments); -}}); -dojo.provide("dojo.date.serialize"); -dojo.date.setIso8601=function(_caf,_cb0){ -var _cb1=(_cb0.indexOf("T")==-1)?_cb0.split(" "):_cb0.split("T"); -_caf=dojo.date.setIso8601Date(_caf,_cb1[0]); -if(_cb1.length==2){ -_caf=dojo.date.setIso8601Time(_caf,_cb1[1]); -} -return _caf; -}; -dojo.date.fromIso8601=function(_cb2){ -return dojo.date.setIso8601(new Date(0,0),_cb2); -}; -dojo.date.setIso8601Date=function(_cb3,_cb4){ -var _cb5="^([0-9]{4})((-?([0-9]{2})(-?([0-9]{2}))?)|"+"(-?([0-9]{3}))|(-?W([0-9]{2})(-?([1-7]))?))?$"; -var d=_cb4.match(new RegExp(_cb5)); -if(!d){ -dojo.debug("invalid date string: "+_cb4); -return null; -} -var year=d[1]; -var _cb8=d[4]; -var date=d[6]; -var _cba=d[8]; -var week=d[10]; -var _cbc=d[12]?d[12]:1; -_cb3.setFullYear(year); -if(_cba){ -_cb3.setMonth(0); -_cb3.setDate(Number(_cba)); -}else{ -if(week){ -_cb3.setMonth(0); -_cb3.setDate(1); -var gd=_cb3.getDay(); -var day=gd?gd:7; -var _cbf=Number(_cbc)+(7*Number(week)); -if(day<=4){ -_cb3.setDate(_cbf+1-day); -}else{ -_cb3.setDate(_cbf+8-day); -} -}else{ -if(_cb8){ -_cb3.setDate(1); -_cb3.setMonth(_cb8-1); -} -if(date){ -_cb3.setDate(date); -} -} -} -return _cb3; -}; -dojo.date.fromIso8601Date=function(_cc0){ -return dojo.date.setIso8601Date(new Date(0,0),_cc0); -}; -dojo.date.setIso8601Time=function(_cc1,_cc2){ -var _cc3="Z|(([-+])([0-9]{2})(:?([0-9]{2}))?)$"; -var d=_cc2.match(new RegExp(_cc3)); -var _cc5=0; -if(d){ -if(d[0]!="Z"){ -_cc5=(Number(d[3])*60)+Number(d[5]); -_cc5*=((d[2]=="-")?1:-1); -} -_cc5-=_cc1.getTimezoneOffset(); -_cc2=_cc2.substr(0,_cc2.length-d[0].length); -} -var _cc6="^([0-9]{2})(:?([0-9]{2})(:?([0-9]{2})(.([0-9]+))?)?)?$"; -d=_cc2.match(new RegExp(_cc6)); -if(!d){ -dojo.debug("invalid time string: "+_cc2); -return null; -} -var _cc7=d[1]; -var mins=Number((d[3])?d[3]:0); -var secs=(d[5])?d[5]:0; -var ms=d[7]?(Number("0."+d[7])*1000):0; -_cc1.setHours(_cc7); -_cc1.setMinutes(mins); -_cc1.setSeconds(secs); -_cc1.setMilliseconds(ms); -if(_cc5!==0){ -_cc1.setTime(_cc1.getTime()+_cc5*60000); -} -return _cc1; -}; -dojo.date.fromIso8601Time=function(_ccb){ -return dojo.date.setIso8601Time(new Date(0,0),_ccb); -}; -dojo.date.toRfc3339=function(_ccc,_ccd){ -if(!_ccc){ -_ccc=new Date(); -} -var _=dojo.string.pad; -var _ccf=[]; -if(_ccd!="timeOnly"){ -var date=[_(_ccc.getFullYear(),4),_(_ccc.getMonth()+1,2),_(_ccc.getDate(),2)].join("-"); -_ccf.push(date); -} -if(_ccd!="dateOnly"){ -var time=[_(_ccc.getHours(),2),_(_ccc.getMinutes(),2),_(_ccc.getSeconds(),2)].join(":"); -var _cd2=_ccc.getTimezoneOffset(); -time+=(_cd2>0?"-":"+")+_(Math.floor(Math.abs(_cd2)/60),2)+":"+_(Math.abs(_cd2)%60,2); -_ccf.push(time); -} -return _ccf.join("T"); -}; -dojo.date.fromRfc3339=function(_cd3){ -if(_cd3.indexOf("Tany")!=-1){ -_cd3=_cd3.replace("Tany",""); -} -var _cd4=new Date(); -return dojo.date.setIso8601(_cd4,_cd3); -}; -dojo.provide("dojo.date.common"); -dojo.date.setDayOfYear=function(_cd5,_cd6){ -_cd5.setMonth(0); -_cd5.setDate(_cd6); -return _cd5; -}; -dojo.date.getDayOfYear=function(_cd7){ -var _cd8=_cd7.getFullYear(); -var _cd9=new Date(_cd8-1,11,31); -return Math.floor((_cd7.getTime()-_cd9.getTime())/86400000); -}; -dojo.date.setWeekOfYear=function(_cda,week,_cdc){ -if(arguments.length==1){ -_cdc=0; -} -dojo.unimplemented("dojo.date.setWeekOfYear"); -}; -dojo.date.getWeekOfYear=function(_cdd,_cde){ -if(arguments.length==1){ -_cde=0; -} -var _cdf=new Date(_cdd.getFullYear(),0,1); -var day=_cdf.getDay(); -_cdf.setDate(_cdf.getDate()-day+_cde-(day>_cde?7:0)); -return Math.floor((_cdd.getTime()-_cdf.getTime())/604800000); -}; -dojo.date.setIsoWeekOfYear=function(_ce1,week,_ce3){ -if(arguments.length==1){ -_ce3=1; -} -dojo.unimplemented("dojo.date.setIsoWeekOfYear"); -}; -dojo.date.getIsoWeekOfYear=function(_ce4,_ce5){ -if(arguments.length==1){ -_ce5=1; -} -dojo.unimplemented("dojo.date.getIsoWeekOfYear"); -}; -dojo.date.shortTimezones=["IDLW","BET","HST","MART","AKST","PST","MST","CST","EST","AST","NFT","BST","FST","AT","GMT","CET","EET","MSK","IRT","GST","AFT","AGTT","IST","NPT","ALMT","MMT","JT","AWST","JST","ACST","AEST","LHST","VUT","NFT","NZT","CHAST","PHOT","LINT"]; -dojo.date.timezoneOffsets=[-720,-660,-600,-570,-540,-480,-420,-360,-300,-240,-210,-180,-120,-60,0,60,120,180,210,240,270,300,330,345,360,390,420,480,540,570,600,630,660,690,720,765,780,840]; -dojo.date.getDaysInMonth=function(_ce6){ -var _ce7=_ce6.getMonth(); -var days=[31,28,31,30,31,30,31,31,30,31,30,31]; -if(_ce7==1&&dojo.date.isLeapYear(_ce6)){ -return 29; -}else{ -return days[_ce7]; -} -}; -dojo.date.isLeapYear=function(_ce9){ -var year=_ce9.getFullYear(); -return (year%400==0)?true:(year%100==0)?false:(year%4==0)?true:false; -}; -dojo.date.getTimezoneName=function(_ceb){ -var str=_ceb.toString(); -var tz=""; -var _cee; -var pos=str.indexOf("("); -if(pos>-1){ -pos++; -tz=str.substring(pos,str.indexOf(")")); -}else{ -var pat=/([A-Z\/]+) \d{4}$/; -if((_cee=str.match(pat))){ -tz=_cee[1]; -}else{ -str=_ceb.toLocaleString(); -pat=/ ([A-Z\/]+)$/; -if((_cee=str.match(pat))){ -tz=_cee[1]; -} -} -} -return tz=="AM"||tz=="PM"?"":tz; -}; -dojo.date.getOrdinal=function(_cf1){ -var date=_cf1.getDate(); -if(date%100!=11&&date%10==1){ -return "st"; -}else{ -if(date%100!=12&&date%10==2){ -return "nd"; -}else{ -if(date%100!=13&&date%10==3){ -return "rd"; -}else{ -return "th"; -} -} -} -}; -dojo.date.compareTypes={DATE:1,TIME:2}; -dojo.date.compare=function(_cf3,_cf4,_cf5){ -var dA=_cf3; -var dB=_cf4||new Date(); -var now=new Date(); -with(dojo.date.compareTypes){ -var opt=_cf5||(DATE|TIME); -var d1=new Date((opt&DATE)?dA.getFullYear():now.getFullYear(),(opt&DATE)?dA.getMonth():now.getMonth(),(opt&DATE)?dA.getDate():now.getDate(),(opt&TIME)?dA.getHours():0,(opt&TIME)?dA.getMinutes():0,(opt&TIME)?dA.getSeconds():0); -var d2=new Date((opt&DATE)?dB.getFullYear():now.getFullYear(),(opt&DATE)?dB.getMonth():now.getMonth(),(opt&DATE)?dB.getDate():now.getDate(),(opt&TIME)?dB.getHours():0,(opt&TIME)?dB.getMinutes():0,(opt&TIME)?dB.getSeconds():0); -} -if(d1.valueOf()>d2.valueOf()){ -return 1; -} -if(d1.valueOf()0)?5:-5; -_d01=(incr>0)?((incr-5)/5):((incr+5)/5); -}else{ -days=mod; -_d01=parseInt(incr/5); -} -strt=dt.getDay(); -if(strt==6&&incr>0){ -adj=1; -}else{ -if(strt==0&&incr<0){ -adj=-1; -} -} -trgt=(strt+days); -if(trgt==0||trgt==6){ -adj=(incr>0)?2:-2; -} -sum.setDate(dat+(7*_d01)+days+adj); -break; -case HOUR: -sum.setHours(sum.getHours()+incr); -break; -case MINUTE: -sum.setMinutes(sum.getMinutes()+incr); -break; -case SECOND: -sum.setSeconds(sum.getSeconds()+incr); -break; -case MILLISECOND: -sum.setMilliseconds(sum.getMilliseconds()+incr); -break; -default: -break; -} -} -return sum; -}; -dojo.date.diff=function(dtA,dtB,_d09){ -if(typeof dtA=="number"){ -dtA=new Date(dtA); -} -if(typeof dtB=="number"){ -dtB=new Date(dtB); -} -var _d0a=dtB.getFullYear()-dtA.getFullYear(); -var _d0b=(dtB.getMonth()-dtA.getMonth())+(_d0a*12); -var _d0c=dtB.getTime()-dtA.getTime(); -var _d0d=_d0c/1000; -var _d0e=_d0d/60; -var _d0f=_d0e/60; -var _d10=_d0f/24; -var _d11=_d10/7; -var _d12=0; -with(dojo.date.dateParts){ -switch(_d09){ -case YEAR: -_d12=_d0a; -break; -case QUARTER: -var mA=dtA.getMonth(); -var mB=dtB.getMonth(); -var qA=Math.floor(mA/3)+1; -var qB=Math.floor(mB/3)+1; -qB+=(_d0a*4); -_d12=qB-qA; -break; -case MONTH: -_d12=_d0b; -break; -case WEEK: -_d12=parseInt(_d11); -break; -case DAY: -_d12=_d10; -break; -case WEEKDAY: -var days=Math.round(_d10); -var _d18=parseInt(days/7); -var mod=days%7; -if(mod==0){ -days=_d18*5; -}else{ -var adj=0; -var aDay=dtA.getDay(); -var bDay=dtB.getDay(); -_d18=parseInt(days/7); -mod=days%7; -var _d1d=new Date(dtA); -_d1d.setDate(_d1d.getDate()+(_d18*7)); -var _d1e=_d1d.getDay(); -if(_d10>0){ -switch(true){ -case aDay==6: -adj=-1; -break; -case aDay==0: -adj=0; -break; -case bDay==6: -adj=-1; -break; -case bDay==0: -adj=-2; -break; -case (_d1e+mod)>5: -adj=-2; -break; -default: -break; -} -}else{ -if(_d10<0){ -switch(true){ -case aDay==6: -adj=0; -break; -case aDay==0: -adj=1; -break; -case bDay==6: -adj=2; -break; -case bDay==0: -adj=1; -break; -case (_d1e+mod)<0: -adj=2; -break; -default: -break; -} -} -} -days+=adj; -days-=(_d18*2); -} -_d12=days; -break; -case HOUR: -_d12=_d0f; -break; -case MINUTE: -_d12=_d0e; -break; -case SECOND: -_d12=_d0d; -break; -case MILLISECOND: -_d12=_d0c; -break; -default: -break; -} -} -return Math.round(_d12); -}; -dojo.provide("dojo.date.supplemental"); -dojo.date.getFirstDayOfWeek=function(_d1f){ -var _d20={mv:5,ae:6,af:6,bh:6,dj:6,dz:6,eg:6,er:6,et:6,iq:6,ir:6,jo:6,ke:6,kw:6,lb:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,so:6,tn:6,ye:6,as:0,au:0,az:0,bw:0,ca:0,cn:0,fo:0,ge:0,gl:0,gu:0,hk:0,ie:0,il:0,is:0,jm:0,jp:0,kg:0,kr:0,la:0,mh:0,mo:0,mp:0,mt:0,nz:0,ph:0,pk:0,sg:0,th:0,tt:0,tw:0,um:0,us:0,uz:0,vi:0,za:0,zw:0,et:0,mw:0,ng:0,tj:0,gb:0,sy:4}; -_d1f=dojo.hostenv.normalizeLocale(_d1f); -var _d21=_d1f.split("-")[1]; -var dow=_d20[_d21]; -return (typeof dow=="undefined")?1:dow; -}; -dojo.date.getWeekend=function(_d23){ -var _d24={eg:5,il:5,sy:5,"in":0,ae:4,bh:4,dz:4,iq:4,jo:4,kw:4,lb:4,ly:4,ma:4,om:4,qa:4,sa:4,sd:4,tn:4,ye:4}; -var _d25={ae:5,bh:5,dz:5,iq:5,jo:5,kw:5,lb:5,ly:5,ma:5,om:5,qa:5,sa:5,sd:5,tn:5,ye:5,af:5,ir:5,eg:6,il:6,sy:6}; -_d23=dojo.hostenv.normalizeLocale(_d23); -var _d26=_d23.split("-")[1]; -var _d27=_d24[_d26]; -var end=_d25[_d26]; -if(typeof _d27=="undefined"){ -_d27=6; -} -if(typeof end=="undefined"){ -end=0; -} -return {start:_d27,end:end}; -}; -dojo.date.isWeekend=function(_d29,_d2a){ -var _d2b=dojo.date.getWeekend(_d2a); -var day=(_d29||new Date()).getDay(); -if(_d2b.end<_d2b.start){ -_d2b.end+=7; -if(day<_d2b.start){ -day+=7; -} -} -return day>=_d2b.start&&day<=_d2b.end; -}; -dojo.provide("dojo.i18n.common"); -dojo.i18n.getLocalization=function(_d2d,_d2e,_d2f){ -dojo.hostenv.preloadLocalizations(); -_d2f=dojo.hostenv.normalizeLocale(_d2f); -var _d30=_d2f.split("-"); -var _d31=[_d2d,"nls",_d2e].join("."); -var _d32=dojo.hostenv.findModule(_d31,true); -var _d33; -for(var i=_d30.length;i>0;i--){ -var loc=_d30.slice(0,i).join("_"); -if(_d32[loc]){ -_d33=_d32[loc]; -break; -} -} -if(!_d33){ -_d33=_d32.ROOT; -} -if(_d33){ -var _d36=function(){ -}; -_d36.prototype=_d33; -return new _d36(); -} -dojo.raise("Bundle not found: "+_d2e+" in "+_d2d+" , locale="+_d2f); -}; -dojo.i18n.isLTR=function(_d37){ -var lang=dojo.hostenv.normalizeLocale(_d37).split("-")[0]; -var RTL={ar:true,fa:true,he:true,ur:true,yi:true}; -return !RTL[lang]; -}; -dojo.provide("dojo.date.format"); -(function(){ -dojo.date.format=function(_d3a,_d3b){ -if(typeof _d3b=="string"){ -dojo.deprecated("dojo.date.format","To format dates with POSIX-style strings, please use dojo.date.strftime instead","0.5"); -return dojo.date.strftime(_d3a,_d3b); -} -function formatPattern(_d3c,_d3d){ -return _d3d.replace(/([a-z])\1*/ig,function(_d3e){ -var s; -var c=_d3e.charAt(0); -var l=_d3e.length; -var pad; -var _d43=["abbr","wide","narrow"]; -switch(c){ -case "G": -if(l>3){ -dojo.unimplemented("Era format not implemented"); -} -s=info.eras[_d3c.getFullYear()<0?1:0]; -break; -case "y": -s=_d3c.getFullYear(); -switch(l){ -case 1: -break; -case 2: -s=String(s).substr(-2); -break; -default: -pad=true; -} -break; -case "Q": -case "q": -s=Math.ceil((_d3c.getMonth()+1)/3); -switch(l){ -case 1: -case 2: -pad=true; -break; -case 3: -case 4: -dojo.unimplemented("Quarter format not implemented"); -} -break; -case "M": -case "L": -var m=_d3c.getMonth(); -var _d46; -switch(l){ -case 1: -case 2: -s=m+1; -pad=true; -break; -case 3: -case 4: -case 5: -_d46=_d43[l-3]; -break; -} -if(_d46){ -var type=(c=="L")?"standalone":"format"; -var prop=["months",type,_d46].join("-"); -s=info[prop][m]; -} -break; -case "w": -var _d49=0; -s=dojo.date.getWeekOfYear(_d3c,_d49); -pad=true; -break; -case "d": -s=_d3c.getDate(); -pad=true; -break; -case "D": -s=dojo.date.getDayOfYear(_d3c); -pad=true; -break; -case "E": -case "e": -case "c": -var d=_d3c.getDay(); -var _d46; -switch(l){ -case 1: -case 2: -if(c=="e"){ -var _d4b=dojo.date.getFirstDayOfWeek(_d3b.locale); -d=(d-_d4b+7)%7; -} -if(c!="c"){ -s=d+1; -pad=true; -break; -} -case 3: -case 4: -case 5: -_d46=_d43[l-3]; -break; -} -if(_d46){ -var type=(c=="c")?"standalone":"format"; -var prop=["days",type,_d46].join("-"); -s=info[prop][d]; -} -break; -case "a": -var _d4c=(_d3c.getHours()<12)?"am":"pm"; -s=info[_d4c]; -break; -case "h": -case "H": -case "K": -case "k": -var h=_d3c.getHours(); -switch(c){ -case "h": -s=(h%12)||12; -break; -case "H": -s=h; -break; -case "K": -s=(h%12); -break; -case "k": -s=h||24; -break; -} -pad=true; -break; -case "m": -s=_d3c.getMinutes(); -pad=true; -break; -case "s": -s=_d3c.getSeconds(); -pad=true; -break; -case "S": -s=Math.round(_d3c.getMilliseconds()*Math.pow(10,l-3)); -break; -case "v": -case "z": -s=dojo.date.getTimezoneName(_d3c); -if(s){ -break; -} -l=4; -case "Z": -var _d4e=_d3c.getTimezoneOffset(); -var tz=[(_d4e<=0?"+":"-"),dojo.string.pad(Math.floor(Math.abs(_d4e)/60),2),dojo.string.pad(Math.abs(_d4e)%60,2)]; -if(l==4){ -tz.splice(0,0,"GMT"); -tz.splice(3,0,":"); -} -s=tz.join(""); -break; -case "Y": -case "u": -case "W": -case "F": -case "g": -case "A": -dojo.debug(_d3e+" modifier not yet implemented"); -s="?"; -break; -default: -dojo.raise("dojo.date.format: invalid pattern char: "+_d3d); -} -if(pad){ -s=dojo.string.pad(s,l); -} -return s; -}); -} -_d3b=_d3b||{}; -var _d50=dojo.hostenv.normalizeLocale(_d3b.locale); -var _d51=_d3b.formatLength||"full"; -var info=dojo.date._getGregorianBundle(_d50); -var str=[]; -var _d53=dojo.lang.curry(this,formatPattern,_d3a); -if(_d3b.selector!="timeOnly"){ -var _d54=_d3b.datePattern||info["dateFormat-"+_d51]; -if(_d54){ -str.push(_processPattern(_d54,_d53)); -} -} -if(_d3b.selector!="dateOnly"){ -var _d55=_d3b.timePattern||info["timeFormat-"+_d51]; -if(_d55){ -str.push(_processPattern(_d55,_d53)); -} -} -var _d56=str.join(" "); -return _d56; -}; -dojo.date.parse=function(_d57,_d58){ -_d58=_d58||{}; -var _d59=dojo.hostenv.normalizeLocale(_d58.locale); -var info=dojo.date._getGregorianBundle(_d59); -var _d5b=_d58.formatLength||"full"; -if(!_d58.selector){ -_d58.selector="dateOnly"; -} -var _d5c=_d58.datePattern||info["dateFormat-"+_d5b]; -var _d5d=_d58.timePattern||info["timeFormat-"+_d5b]; -var _d5e; -if(_d58.selector=="dateOnly"){ -_d5e=_d5c; -}else{ -if(_d58.selector=="timeOnly"){ -_d5e=_d5d; -}else{ -if(_d58.selector=="dateTime"){ -_d5e=_d5c+" "+_d5d; -}else{ -var msg="dojo.date.parse: Unknown selector param passed: '"+_d58.selector+"'."; -msg+=" Defaulting to date pattern."; -dojo.debug(msg); -_d5e=_d5c; -} -} -} -var _d60=[]; -var _d61=_processPattern(_d5e,dojo.lang.curry(this,_buildDateTimeRE,_d60,info,_d58)); -var _d62=new RegExp("^"+_d61+"$"); -var _d63=_d62.exec(_d57); -if(!_d63){ -return null; -} -var _d64=["abbr","wide","narrow"]; -var _d65=new Date(1972,0); -var _d66={}; -for(var i=1;i<_d63.length;i++){ -var grp=_d60[i-1]; -var l=grp.length; -var v=_d63[i]; -switch(grp.charAt(0)){ -case "y": -if(l!=2){ -_d65.setFullYear(v); -_d66.year=v; -}else{ -if(v<100){ -v=Number(v); -var year=""+new Date().getFullYear(); -var _d6c=year.substring(0,2)*100; -var _d6d=Number(year.substring(2,4)); -var _d6e=Math.min(_d6d+20,99); -var num=(v<_d6e)?_d6c+v:_d6c-100+v; -_d65.setFullYear(num); -_d66.year=num; -}else{ -if(_d58.strict){ -return null; -} -_d65.setFullYear(v); -_d66.year=v; -} -} -break; -case "M": -if(l>2){ -if(!_d58.strict){ -v=v.replace(/\./g,""); -v=v.toLowerCase(); -} -var _d70=info["months-format-"+_d64[l-3]].concat(); -for(var j=0;j<_d70.length;j++){ -if(!_d58.strict){ -_d70[j]=_d70[j].toLowerCase(); -} -if(v==_d70[j]){ -_d65.setMonth(j); -_d66.month=j; -break; -} -} -if(j==_d70.length){ -dojo.debug("dojo.date.parse: Could not parse month name: '"+v+"'."); -return null; -} -}else{ -_d65.setMonth(v-1); -_d66.month=v-1; -} -break; -case "E": -case "e": -if(!_d58.strict){ -v=v.toLowerCase(); -} -var days=info["days-format-"+_d64[l-3]].concat(); -for(var j=0;j23){ -dojo.debug("dojo.date.parse: Illegal hours value"); -return null; -} -_d65.setHours(v); -break; -case "m": -_d65.setMinutes(v); -break; -case "s": -_d65.setSeconds(v); -break; -case "S": -_d65.setMilliseconds(v); -break; -default: -dojo.unimplemented("dojo.date.parse: unsupported pattern char="+grp.charAt(0)); -} -} -if(_d66.year&&_d65.getFullYear()!=_d66.year){ -dojo.debug("Parsed year: '"+_d65.getFullYear()+"' did not match input year: '"+_d66.year+"'."); -return null; -} -if(_d66.month&&_d65.getMonth()!=_d66.month){ -dojo.debug("Parsed month: '"+_d65.getMonth()+"' did not match input month: '"+_d66.month+"'."); -return null; -} -if(_d66.date&&_d65.getDate()!=_d66.date){ -dojo.debug("Parsed day of month: '"+_d65.getDate()+"' did not match input day of month: '"+_d66.date+"'."); -return null; -} -return _d65; -}; -function _processPattern(_d76,_d77,_d78,_d79){ -var _d7a=function(x){ -return x; -}; -_d77=_d77||_d7a; -_d78=_d78||_d7a; -_d79=_d79||_d7a; -var _d7c=_d76.match(/(''|[^'])+/g); -var _d7d=false; -for(var i=0;i<_d7c.length;i++){ -if(!_d7c[i]){ -_d7c[i]=""; -}else{ -_d7c[i]=(_d7d?_d78:_d77)(_d7c[i]); -_d7d=!_d7d; -} -} -return _d79(_d7c.join("")); -} -function _buildDateTimeRE(_d7f,info,_d81,_d82){ -return _d82.replace(/([a-z])\1*/ig,function(_d83){ -var s; -var c=_d83.charAt(0); -var l=_d83.length; -switch(c){ -case "y": -s="\\d"+((l==2)?"{2,4}":"+"); -break; -case "M": -s=(l>2)?"\\S+":"\\d{1,2}"; -break; -case "d": -s="\\d{1,2}"; -break; -case "E": -s="\\S+"; -break; -case "h": -case "H": -case "K": -case "k": -s="\\d{1,2}"; -break; -case "m": -case "s": -s="[0-5]\\d"; -break; -case "S": -s="\\d{1,3}"; -break; -case "a": -var am=_d81.am||info.am||"AM"; -var pm=_d81.pm||info.pm||"PM"; -if(_d81.strict){ -s=am+"|"+pm; -}else{ -s=am; -s+=(am!=am.toLowerCase())?"|"+am.toLowerCase():""; -s+="|"; -s+=(pm!=pm.toLowerCase())?pm+"|"+pm.toLowerCase():pm; -} -break; -default: -dojo.unimplemented("parse of date format, pattern="+_d82); -} -if(_d7f){ -_d7f.push(_d83); -} -return "\\s*("+s+")\\s*"; -}); -} -})(); -dojo.date.strftime=function(_d89,_d8a,_d8b){ -var _d8c=null; -function _(s,n){ -return dojo.string.pad(s,n||2,_d8c||"0"); -} -var info=dojo.date._getGregorianBundle(_d8b); -function $(_d90){ -switch(_d90){ -case "a": -return dojo.date.getDayShortName(_d89,_d8b); -case "A": -return dojo.date.getDayName(_d89,_d8b); -case "b": -case "h": -return dojo.date.getMonthShortName(_d89,_d8b); -case "B": -return dojo.date.getMonthName(_d89,_d8b); -case "c": -return dojo.date.format(_d89,{locale:_d8b}); -case "C": -return _(Math.floor(_d89.getFullYear()/100)); -case "d": -return _(_d89.getDate()); -case "D": -return $("m")+"/"+$("d")+"/"+$("y"); -case "e": -if(_d8c==null){ -_d8c=" "; -} -return _(_d89.getDate()); -case "f": -if(_d8c==null){ -_d8c=" "; -} -return _(_d89.getMonth()+1); -case "g": -break; -case "G": -dojo.unimplemented("unimplemented modifier 'G'"); -break; -case "F": -return $("Y")+"-"+$("m")+"-"+$("d"); -case "H": -return _(_d89.getHours()); -case "I": -return _(_d89.getHours()%12||12); -case "j": -return _(dojo.date.getDayOfYear(_d89),3); -case "k": -if(_d8c==null){ -_d8c=" "; -} -return _(_d89.getHours()); -case "l": -if(_d8c==null){ -_d8c=" "; -} -return _(_d89.getHours()%12||12); -case "m": -return _(_d89.getMonth()+1); -case "M": -return _(_d89.getMinutes()); -case "n": -return "\n"; -case "p": -return info[_d89.getHours()<12?"am":"pm"]; -case "r": -return $("I")+":"+$("M")+":"+$("S")+" "+$("p"); -case "R": -return $("H")+":"+$("M"); -case "S": -return _(_d89.getSeconds()); -case "t": -return "\t"; -case "T": -return $("H")+":"+$("M")+":"+$("S"); -case "u": -return String(_d89.getDay()||7); -case "U": -return _(dojo.date.getWeekOfYear(_d89)); -case "V": -return _(dojo.date.getIsoWeekOfYear(_d89)); -case "W": -return _(dojo.date.getWeekOfYear(_d89,1)); -case "w": -return String(_d89.getDay()); -case "x": -return dojo.date.format(_d89,{selector:"dateOnly",locale:_d8b}); -case "X": -return dojo.date.format(_d89,{selector:"timeOnly",locale:_d8b}); -case "y": -return _(_d89.getFullYear()%100); -case "Y": -return String(_d89.getFullYear()); -case "z": -var _d91=_d89.getTimezoneOffset(); -return (_d91>0?"-":"+")+_(Math.floor(Math.abs(_d91)/60))+":"+_(Math.abs(_d91)%60); -case "Z": -return dojo.date.getTimezoneName(_d89); -case "%": -return "%"; -} -} -var _d92=""; -var i=0; -var _d94=0; -var _d95=null; -while((_d94=_d8a.indexOf("%",i))!=-1){ -_d92+=_d8a.substring(i,_d94++); -switch(_d8a.charAt(_d94++)){ -case "_": -_d8c=" "; -break; -case "-": -_d8c=""; -break; -case "0": -_d8c="0"; -break; -case "^": -_d95="upper"; -break; -case "*": -_d95="lower"; -break; -case "#": -_d95="swap"; -break; -default: -_d8c=null; -_d94--; -break; -} -var _d96=$(_d8a.charAt(_d94++)); -switch(_d95){ -case "upper": -_d96=_d96.toUpperCase(); -break; -case "lower": -_d96=_d96.toLowerCase(); -break; -case "swap": -var _d97=_d96.toLowerCase(); -var _d98=""; -var j=0; -var ch=""; -while(j<_d96.length){ -ch=_d96.charAt(j); -_d98+=(ch==_d97.charAt(j))?ch.toUpperCase():ch.toLowerCase(); -j++; -} -_d96=_d98; -break; -default: -break; -} -_d95=null; -_d92+=_d96; -i=_d94; -} -_d92+=_d8a.substring(i); -return _d92; -}; -(function(){ -var _d9b=[]; -dojo.date.addCustomFormats=function(_d9c,_d9d){ -_d9b.push({pkg:_d9c,name:_d9d}); -}; -dojo.date._getGregorianBundle=function(_d9e){ -var _d9f={}; -dojo.lang.forEach(_d9b,function(desc){ -var _da1=dojo.i18n.getLocalization(desc.pkg,desc.name,_d9e); -_d9f=dojo.lang.mixin(_d9f,_da1); -},this); -return _d9f; -}; -})(); -dojo.date.addCustomFormats("dojo.i18n.calendar","gregorian"); -dojo.date.addCustomFormats("dojo.i18n.calendar","gregorianExtras"); -dojo.date.getNames=function(item,type,use,_da5){ -var _da6; -var _da7=dojo.date._getGregorianBundle(_da5); -var _da8=[item,use,type]; -if(use=="standAlone"){ -_da6=_da7[_da8.join("-")]; -} -_da8[1]="format"; -return (_da6||_da7[_da8.join("-")]).concat(); -}; -dojo.date.getDayName=function(_da9,_daa){ -return dojo.date.getNames("days","wide","format",_daa)[_da9.getDay()]; -}; -dojo.date.getDayShortName=function(_dab,_dac){ -return dojo.date.getNames("days","abbr","format",_dac)[_dab.getDay()]; -}; -dojo.date.getMonthName=function(_dad,_dae){ -return dojo.date.getNames("months","wide","format",_dae)[_dad.getMonth()]; -}; -dojo.date.getMonthShortName=function(_daf,_db0){ -return dojo.date.getNames("months","abbr","format",_db0)[_daf.getMonth()]; -}; -dojo.date.toRelativeString=function(_db1){ -var now=new Date(); -var diff=(now-_db1)/1000; -var end=" ago"; -var _db5=false; -if(diff<0){ -_db5=true; -end=" from now"; -diff=-diff; -} -if(diff<60){ -diff=Math.round(diff); -return diff+" second"+(diff==1?"":"s")+end; -} -if(diff<60*60){ -diff=Math.round(diff/60); -return diff+" minute"+(diff==1?"":"s")+end; -} -if(diff<60*60*24){ -diff=Math.round(diff/3600); -return diff+" hour"+(diff==1?"":"s")+end; -} -if(diff<60*60*24*7){ -diff=Math.round(diff/(3600*24)); -if(diff==1){ -return _db5?"Tomorrow":"Yesterday"; -}else{ -return diff+" days"+end; -} -} -return dojo.date.format(_db1); -}; -dojo.date.toSql=function(_db6,_db7){ -return dojo.date.strftime(_db6,"%F"+!_db7?" %T":""); -}; -dojo.date.fromSql=function(_db8){ -var _db9=_db8.split(/[\- :]/g); -while(_db9.length<6){ -_db9.push(0); -} -return new Date(_db9[0],(parseInt(_db9[1],10)-1),_db9[2],_db9[3],_db9[4],_db9[5]); -}; -dojo.provide("dojo.widget.TimePicker"); -dojo.widget.defineWidget("dojo.widget.TimePicker",dojo.widget.HtmlWidget,function(){ -this.time=""; -this.useDefaultTime=false; -this.useDefaultMinutes=false; -this.storedTime=""; -this.currentTime={}; -this.classNames={selectedTime:"selectedItem"}; -this.any="any"; -this.selectedTime={hour:"",minute:"",amPm:"",anyTime:false}; -this.hourIndexMap=["",2,4,6,8,10,1,3,5,7,9,11,0]; -this.minuteIndexMap=[0,2,4,6,8,10,1,3,5,7,9,11]; -},{isContainer:false,templateString:"
    \r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t
     ${this.calendar.field-hour}${this.calendar.field-minute} 
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    126
    17
    28
    39
    410
    511
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    0030
    0535
    1040
    1545
    2050
    2555
    \r\n\t\t\t\t
     \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    ${this.calendar.am}${this.calendar.pm}
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    ${this.widgetStrings.any}
    \r\n\t\t\t\t
     
    \r\n
    \r\n",templateCssString:"/*Time Picker */\r\n.timePickerContainer {\r\n\twidth:122px;\r\n\tfont-family:Tahoma, Myriad, Helvetica, Arial, Verdana, sans-serif;\r\n\tfont-size:16px;\r\n}\r\n\r\n.timeContainer {\r\n\tborder-collapse:collapse;\r\n\tborder-spacing:0;\r\n}\r\n\r\n.timeContainer thead {\r\n\tcolor:#293a4b;\r\n\tfont-size:0.9em;\r\n\tfont-weight:700;\r\n}\r\n\r\n.timeContainer thead td {\r\n\tpadding:0.25em;\r\n\tfont-size:0.80em;\r\n\tborder-bottom:1px solid #6782A8;\r\n}\r\n\r\n.timeCorner {\r\n\twidth:10px;\r\n}\r\n\r\n.cornerTopLeft {\r\n\tbackground: url(\"images/dpCurveTL.png\") top left no-repeat;\r\n}\r\n\r\n.cornerTopRight {\r\n\tbackground: url(\"images/dpCurveTR.png\") top right no-repeat;\r\n}\r\n\r\n.timeLabelContainer {\r\n\tbackground: url(\"images/dpMonthBg.png\") top left repeat-x;\r\n}\r\n\r\n.hours, .minutes, .timeBorder {\r\n\tbackground: #7591bc url(\"images/dpBg.gif\") top left repeat-x;\r\n\r\n}\r\n\r\n.hours td, .minutes td {\r\n\tpadding:0.2em;\r\n\ttext-align:center;\r\n\tfont-size:0.7em;\r\n\tfont-weight:bold;\r\n\tcursor:pointer;\r\n\tcursor:hand;\r\n\tcolor:#fff;\r\n}\r\n\r\n.minutes {\r\n\tborder-left:1px solid #f5d1db;\r\n}\r\n\r\n.hours {\r\n\tborder-right:1px solid #6782A8;\r\n}\r\n\r\n.hourSelector {\r\n\tborder-right:1px solid #6782A8;\r\n\tpadding:5px;\r\n\tpadding-right:10px;\r\n}\r\n\r\n.minutesSelector {\r\n\tpadding:5px;\r\n\tborder-left:1px solid #f5c7d4;\r\n\ttext-align:center;\r\n}\r\n\r\n.minutesHeading {\r\n\tpadding-left:9px !important;\r\n}\r\n\r\n.timeOptions {\r\n\tbackground-color:#F9C9D7;\r\n}\r\n\r\n.timeContainer .cornerBottomLeft, .timeContainer .cornerBottomRight, .timeContainer .timeOptions {\r\n\tborder-top:1px solid #6782A8;\r\n}\r\n\r\n.timeContainer .cornerBottomLeft {\r\n\tbackground: url(\"images/dpCurveBL.png\") bottom left no-repeat !important;\r\n\twidth:9px !important;\r\n\tpadding:0;\r\n\tmargin:0;\r\n}\r\n\r\n.timeContainer .cornerBottomRight {\r\n\tbackground: url(\"images/dpCurveBR.png\") bottom right no-repeat !important;\r\n\twidth:9px !important;\r\n\tpadding:0;\r\n\tmargin:0;\r\n}\r\n\r\n.timeOptions {\r\n\tcolor:#fff;\r\n\tbackground:url(\"images/dpYearBg.png\") top left repeat-x;\r\n\r\n}\r\n\r\n.selectedItem {\r\n\tbackground-color:#fff;\r\n\tcolor:#6782a8 !important;\r\n}\r\n\r\n.timeOptions .selectedItem {\r\n\tcolor:#fff !important;\r\n\tbackground-color:#9ec3fb !important;\r\n}\r\n\r\n.anyTimeContainer {\r\n\ttext-align:center;\r\n\tfont-weight:bold;\r\n\tfont-size:0.7em;\r\n\tpadding:0.1em;\r\n\tcursor:pointer;\r\n\tcursor:hand;\r\n\tcolor:#fff !important;\r\n}\r\n\r\n.amPmContainer {\r\n\twidth:100%;\r\n}\r\n\r\n.amPmContainer td {\r\n\ttext-align:center;\r\n\tfont-size:0.7em;\r\n\tfont-weight:bold;\r\n\tcursor:pointer;\r\n\tcursor:hand;\r\n\tcolor:#fff;\r\n}\r\n\r\n\r\n\r\n/*.timePickerContainer {\r\n\tmargin:1.75em 0 0.5em 0;\r\n\twidth:10em;\r\n\tfloat:left;\r\n}\r\n\r\n.timeContainer {\r\n\tborder-collapse:collapse;\r\n\tborder-spacing:0;\r\n}\r\n\r\n.timeContainer thead td{\r\n\tborder-bottom:1px solid #e6e6e6;\r\n\tpadding:0 0.4em 0.2em 0.4em;\r\n}\r\n\r\n.timeContainer td {\r\n\tfont-size:0.9em;\r\n\tpadding:0 0.25em 0 0.25em;\r\n\ttext-align:left;\r\n\tcursor:pointer;cursor:hand;\r\n}\r\n\r\n.timeContainer td.minutesHeading {\r\n\tborder-left:1px solid #e6e6e6;\r\n\tborder-right:1px solid #e6e6e6;\t\r\n}\r\n\r\n.timeContainer .minutes {\r\n\tborder-left:1px solid #e6e6e6;\r\n\tborder-right:1px solid #e6e6e6;\r\n}\r\n\r\n.selectedItem {\r\n\tbackground-color:#3a3a3a;\r\n\tcolor:#ffffff;\r\n}*/\r\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/TimePicker.css"),postMixInProperties:function(_dba,frag){ -dojo.widget.TimePicker.superclass.postMixInProperties.apply(this,arguments); -this.calendar=dojo.i18n.getLocalization("dojo.i18n.calendar","gregorian",this.lang); -this.widgetStrings=dojo.i18n.getLocalization("dojo.widget","TimePicker",this.lang); -},fillInTemplate:function(args,frag){ -var _dbe=this.getFragNodeRef(frag); -dojo.html.copyStyle(this.domNode,_dbe); -if(args.value){ -if(args.value instanceof Date){ -this.storedTime=dojo.date.toRfc3339(args.value); -}else{ -this.storedTime=args.value; -} -} -this.initData(); -this.initUI(); -},initData:function(){ -if(this.storedTime.indexOf("T")!=-1&&this.storedTime.split("T")[1]&&this.storedTime!=" "&&this.storedTime.split("T")[1]!="any"){ -this.time=dojo.widget.TimePicker.util.fromRfcDateTime(this.storedTime,this.useDefaultMinutes,this.selectedTime.anyTime); -}else{ -if(this.useDefaultTime){ -this.time=dojo.widget.TimePicker.util.fromRfcDateTime("",this.useDefaultMinutes,this.selectedTime.anyTime); -}else{ -this.selectedTime.anyTime=true; -this.time=dojo.widget.TimePicker.util.fromRfcDateTime("",0,1); -} -} -},initUI:function(){ -if(!this.selectedTime.anyTime&&this.time){ -var _dbf=dojo.widget.TimePicker.util.toAmPmHour(this.time.getHours()); -var hour=_dbf[0]; -var isAm=_dbf[1]; -var _dc2=this.time.getMinutes(); -var _dc3=parseInt(_dc2/5); -this.onSetSelectedHour(this.hourIndexMap[hour]); -this.onSetSelectedMinute(this.minuteIndexMap[_dc3]); -this.onSetSelectedAmPm(isAm); -}else{ -this.onSetSelectedAnyTime(); -} -},setTime:function(date){ -if(date){ -this.selectedTime.anyTime=false; -this.setDateTime(dojo.date.toRfc3339(date)); -}else{ -this.selectedTime.anyTime=true; -} -this.initData(); -this.initUI(); -},setDateTime:function(_dc5){ -this.storedTime=_dc5; -},onClearSelectedHour:function(evt){ -this.clearSelectedHour(); -},onClearSelectedMinute:function(evt){ -this.clearSelectedMinute(); -},onClearSelectedAmPm:function(evt){ -this.clearSelectedAmPm(); -},onClearSelectedAnyTime:function(evt){ -this.clearSelectedAnyTime(); -if(this.selectedTime.anyTime){ -this.selectedTime.anyTime=false; -this.time=dojo.widget.TimePicker.util.fromRfcDateTime("",this.useDefaultMinutes); -this.initUI(); -} -},clearSelectedHour:function(){ -var _dca=this.hourContainerNode.getElementsByTagName("td"); -for(var i=0;i<_dca.length;i++){ -dojo.html.setClass(_dca.item(i),""); -} -},clearSelectedMinute:function(){ -var _dcc=this.minuteContainerNode.getElementsByTagName("td"); -for(var i=0;i<_dcc.length;i++){ -dojo.html.setClass(_dcc.item(i),""); -} -},clearSelectedAmPm:function(){ -var _dce=this.amPmContainerNode.getElementsByTagName("td"); -for(var i=0;i<_dce.length;i++){ -dojo.html.setClass(_dce.item(i),""); -} -},clearSelectedAnyTime:function(){ -dojo.html.setClass(this.anyTimeContainerNode,"anyTimeContainer"); -},onSetSelectedHour:function(evt){ -this.onClearSelectedAnyTime(); -this.onClearSelectedHour(); -this.setSelectedHour(evt); -this.onSetTime(); -},setSelectedHour:function(evt){ -if(evt&&evt.target){ -if(evt.target.nodeType==dojo.dom.ELEMENT_NODE){ -var _dd2=evt.target; -}else{ -var _dd2=evt.target.parentNode; -} -dojo.event.browser.stopEvent(evt); -dojo.html.setClass(_dd2,this.classNames.selectedTime); -this.selectedTime["hour"]=_dd2.innerHTML; -}else{ -if(!isNaN(evt)){ -var _dd3=this.hourContainerNode.getElementsByTagName("td"); -if(_dd3.item(evt)){ -dojo.html.setClass(_dd3.item(evt),this.classNames.selectedTime); -this.selectedTime["hour"]=_dd3.item(evt).innerHTML; -} -} -} -this.selectedTime.anyTime=false; -},onSetSelectedMinute:function(evt){ -this.onClearSelectedAnyTime(); -this.onClearSelectedMinute(); -this.setSelectedMinute(evt); -this.selectedTime.anyTime=false; -this.onSetTime(); -},setSelectedMinute:function(evt){ -if(evt&&evt.target){ -if(evt.target.nodeType==dojo.dom.ELEMENT_NODE){ -var _dd6=evt.target; -}else{ -var _dd6=evt.target.parentNode; -} -dojo.event.browser.stopEvent(evt); -dojo.html.setClass(_dd6,this.classNames.selectedTime); -this.selectedTime["minute"]=_dd6.innerHTML; -}else{ -if(!isNaN(evt)){ -var _dd7=this.minuteContainerNode.getElementsByTagName("td"); -if(_dd7.item(evt)){ -dojo.html.setClass(_dd7.item(evt),this.classNames.selectedTime); -this.selectedTime["minute"]=_dd7.item(evt).innerHTML; -} -} -} -},onSetSelectedAmPm:function(evt){ -this.onClearSelectedAnyTime(); -this.onClearSelectedAmPm(); -this.setSelectedAmPm(evt); -this.selectedTime.anyTime=false; -this.onSetTime(); -},setSelectedAmPm:function(evt){ -var _dda=evt.target; -if(evt&&_dda){ -if(_dda.nodeType!=dojo.dom.ELEMENT_NODE){ -_dda=_dda.parentNode; -} -dojo.event.browser.stopEvent(evt); -this.selectedTime.amPm=_dda.id; -dojo.html.setClass(_dda,this.classNames.selectedTime); -}else{ -evt=evt?0:1; -var _ddb=this.amPmContainerNode.getElementsByTagName("td"); -if(_ddb.item(evt)){ -this.selectedTime.amPm=_ddb.item(evt).id; -dojo.html.setClass(_ddb.item(evt),this.classNames.selectedTime); -} -} -},onSetSelectedAnyTime:function(evt){ -this.onClearSelectedHour(); -this.onClearSelectedMinute(); -this.onClearSelectedAmPm(); -this.setSelectedAnyTime(); -this.onSetTime(); -},setSelectedAnyTime:function(evt){ -this.selectedTime.anyTime=true; -dojo.html.setClass(this.anyTimeContainerNode,this.classNames.selectedTime+" "+"anyTimeContainer"); -},onClick:function(evt){ -dojo.event.browser.stopEvent(evt); -},onSetTime:function(){ -if(this.selectedTime.anyTime){ -this.time=new Date(); -var _ddf=dojo.widget.TimePicker.util.toRfcDateTime(this.time); -this.setDateTime(_ddf.split("T")[0]); -}else{ -var hour=12; -var _de1=0; -var isAm=false; -if(this.selectedTime["hour"]){ -hour=parseInt(this.selectedTime["hour"],10); -} -if(this.selectedTime["minute"]){ -_de1=parseInt(this.selectedTime["minute"],10); -} -if(this.selectedTime["amPm"]){ -isAm=(this.selectedTime["amPm"].toLowerCase()=="am"); -} -this.time=new Date(); -this.time.setHours(dojo.widget.TimePicker.util.fromAmPmHour(hour,isAm)); -this.time.setMinutes(_de1); -this.setDateTime(dojo.widget.TimePicker.util.toRfcDateTime(this.time)); -} -this.onValueChanged(this.time); -},onValueChanged:function(date){ -}}); -dojo.widget.TimePicker.util=new function(){ -this.toRfcDateTime=function(_de4){ -if(!_de4){ -_de4=new Date(); -} -_de4.setSeconds(0); -return dojo.date.strftime(_de4,"%Y-%m-%dT%H:%M:00%z"); -}; -this.fromRfcDateTime=function(_de5,_de6,_de7){ -var _de8=new Date(); -if(!_de5||_de5.indexOf("T")==-1){ -if(_de6){ -_de8.setMinutes(Math.floor(_de8.getMinutes()/5)*5); -}else{ -_de8.setMinutes(0); -} -}else{ -var _de9=_de5.split("T")[1].split(":"); -var _de8=new Date(); -_de8.setHours(_de9[0]); -_de8.setMinutes(_de9[1]); -} -return _de8; -}; -this.toAmPmHour=function(hour){ -var _deb=hour; -var isAm=true; -if(_deb==0){ -_deb=12; -}else{ -if(_deb>12){ -_deb=_deb-12; -isAm=false; -}else{ -if(_deb==12){ -isAm=false; -} -} -} -return [_deb,isAm]; -}; -this.fromAmPmHour=function(_ded,isAm){ -var hour=parseInt(_ded,10); -if(isAm&&hour==12){ -hour=0; -}else{ -if(!isAm&&hour<12){ -hour=hour+12; -} -} -return hour; -}; -}; -dojo.provide("dojo.widget.DropdownTimePicker"); -dojo.widget.defineWidget("dojo.widget.DropdownTimePicker",dojo.widget.DropdownContainer,{iconURL:dojo.uri.moduleUri("dojo.widget","templates/images/timeIcon.gif"),formatLength:"short",displayFormat:"",timeFormat:"",saveFormat:"",value:"",name:"",postMixInProperties:function(){ -dojo.widget.DropdownTimePicker.superclass.postMixInProperties.apply(this,arguments); -var _df0=dojo.i18n.getLocalization("dojo.widget","DropdownTimePicker",this.lang); -this.iconAlt=_df0.selectTime; -if(typeof (this.value)=="string"&&this.value.toLowerCase()=="today"){ -this.value=new Date(); -} -if(this.value&&isNaN(this.value)){ -var orig=this.value; -this.value=dojo.date.fromRfc3339(this.value); -if(!this.value){ -var d=dojo.date.format(new Date(),{selector:"dateOnly",datePattern:"yyyy-MM-dd"}); -var c=orig.split(":"); -for(var i=0;i\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\"↑\"\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t

    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t

    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\r\n",templateCssString:".datePickerContainer {\r\n\twidth:164px; /* needed for proper user styling */\r\n}\r\n\r\n.calendarContainer {\r\n/*\tborder:1px solid #566f8f;*/\r\n}\r\n\r\n.calendarBodyContainer {\r\n\twidth:100%; /* needed for the explode effect (explain?) */\r\n\tbackground: #7591bc url(\"images/dpBg.gif\") top left repeat-x;\r\n}\r\n\r\n.calendarBodyContainer thead tr td {\r\n\tcolor:#293a4b;\r\n\tfont:bold 0.75em Helvetica, Arial, Verdana, sans-serif;\r\n\ttext-align:center;\r\n\tpadding:0.25em;\r\n\tbackground: url(\"images/dpHorizLine.gif\") bottom left repeat-x;\r\n}\r\n\r\n.calendarBodyContainer tbody tr td {\r\n\tcolor:#fff;\r\n\tfont:bold 0.7em Helvetica, Arial, Verdana, sans-serif;\r\n\ttext-align:center;\r\n\tpadding:0.4em;\r\n\tbackground: url(\"images/dpVertLine.gif\") top right repeat-y;\r\n\tcursor:pointer;\r\n\tcursor:hand;\r\n}\r\n\r\n\r\n.monthWrapper {\r\n\tpadding-bottom:2px;\r\n\tbackground: url(\"images/dpHorizLine.gif\") bottom left repeat-x;\r\n}\r\n\r\n.monthContainer {\r\n\twidth:100%;\r\n}\r\n\r\n.monthLabelContainer {\r\n\ttext-align:center;\r\n\tfont:bold 0.75em Helvetica, Arial, Verdana, sans-serif;\r\n\tbackground: url(\"images/dpMonthBg.png\") repeat-x top left !important;\r\n\tcolor:#293a4b;\r\n\tpadding:0.25em;\r\n}\r\n\r\n.monthCurve {\r\n\twidth:12px;\r\n}\r\n\r\n.monthCurveTL {\r\n\tbackground: url(\"images/dpCurveTL.png\") no-repeat top left !important;\r\n}\r\n\r\n.monthCurveTR {\r\n\t\tbackground: url(\"images/dpCurveTR.png\") no-repeat top right !important;\r\n}\r\n\r\n\r\n.yearWrapper {\r\n\tbackground: url(\"images/dpHorizLineFoot.gif\") top left repeat-x;\r\n\tpadding-top:2px;\r\n}\r\n\r\n.yearContainer {\r\n\twidth:100%;\r\n}\r\n\r\n.yearContainer td {\r\n\tbackground:url(\"images/dpYearBg.png\") top left repeat-x;\r\n}\r\n\r\n.yearContainer .yearLabel {\r\n\tmargin:0;\r\n\tpadding:0.45em 0 0.45em 0;\r\n\tcolor:#fff;\r\n\tfont:bold 0.75em Helvetica, Arial, Verdana, sans-serif;\r\n\ttext-align:center;\r\n}\r\n\r\n.curveBL {\r\n\tbackground: url(\"images/dpCurveBL.png\") bottom left no-repeat !important;\r\n\twidth:9px !important;\r\n\tpadding:0;\r\n\tmargin:0;\r\n}\r\n\r\n.curveBR {\r\n\tbackground: url(\"images/dpCurveBR.png\") bottom right no-repeat !important;\r\n\twidth:9px !important;\r\n\tpadding:0;\r\n\tmargin:0;\r\n}\r\n\r\n\r\n.previousMonth {\r\n\tbackground-color:#6782a8 !important;\r\n}\r\n\r\n.previousMonthDisabled {\r\n\tbackground-color:#a4a5a6 !important;\r\n\tcursor:default !important\r\n}\r\n.currentMonth {\r\n}\r\n\r\n.currentMonthDisabled {\r\n\tbackground-color:#bbbbbc !important;\r\n\tcursor:default !important\r\n}\r\n.nextMonth {\r\n\tbackground-color:#6782a8 !important;\r\n}\r\n.nextMonthDisabled {\r\n\tbackground-color:#a4a5a6 !important;\r\n\tcursor:default !important;\r\n}\r\n\r\n.currentDate {\r\n\ttext-decoration:underline;\r\n\tfont-style:italic;\r\n}\r\n\r\n.selectedDate {\r\n\tbackground-color:#fff !important;\r\n\tcolor:#6782a8 !important;\r\n}\r\n\r\n.yearLabel .selectedYear {\r\n\tpadding:0.2em;\r\n\tbackground-color:#9ec3fb !important;\r\n}\r\n\r\n.nextYear, .previousYear {\r\n\tcursor:pointer;cursor:hand;\r\n\tpadding:0;\r\n}\r\n\r\n.nextYear {\r\n\tmargin:0 0 0 0.55em;\r\n}\r\n\r\n.previousYear {\r\n\tmargin:0 0.55em 0 0;\r\n}\r\n\r\n.incrementControl {\r\n\tcursor:pointer;cursor:hand;\r\n\twidth:1em;\r\n}\r\n\r\n.increase {\r\n\tfloat:right;\r\n}\r\n\r\n.decrease {\r\n\tfloat:left;\r\n}\r\n\r\n.lastColumn {\r\n\tbackground-image:none !important;\r\n}\r\n\r\n\r\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/DatePicker.css"),postMixInProperties:function(){ -dojo.widget.DatePicker.superclass.postMixInProperties.apply(this,arguments); -if(!this.weekStartsOn){ -this.weekStartsOn=dojo.date.getFirstDayOfWeek(this.lang); -} -this.today=new Date(); -this.today.setHours(0,0,0,0); -if(typeof (this.value)=="string"&&this.value.toLowerCase()=="today"){ -this.value=new Date(); -}else{ -if(this.value&&(typeof this.value=="string")&&(this.value.split("-").length>2)){ -this.value=dojo.date.fromRfc3339(this.value); -this.value.setHours(0,0,0,0); -} -} -},fillInTemplate:function(args,frag){ -dojo.widget.DatePicker.superclass.fillInTemplate.apply(this,arguments); -var _e0e=this.getFragNodeRef(frag); -dojo.html.copyStyle(this.domNode,_e0e); -this.weekTemplate=dojo.dom.removeNode(this.calendarWeekTemplate); -this._preInitUI(this.value?this.value:this.today,false,true); -var _e0f=dojo.lang.unnest(dojo.date.getNames("days",this.dayWidth,"standAlone",this.lang)); -if(this.weekStartsOn>0){ -for(var i=0;ithis.endDate){ -_e14=new Date((_e14days){ -this._preInitUI(this.startDate,true,false); -_e17=new Date(this.firstDay); -} -this.curMonth=new Date(_e17); -this.curMonth.setDate(_e17.getDate()+6); -this.curMonth.setDate(1); -var _e1a=(_e17.getMonth()==this.curMonth.getMonth())?"current":"previous"; -} -if(_e16){ -this._initUI(days); -} -},_initUI:function(days){ -dojo.dom.removeChildren(this.calendarDatesContainerNode); -for(var i=0;ithis.endDate){ -_e27=_e29=_e2b=false; -} -if(_e28&&add(d,DAY,-1)this.endDate){ -_e29=_e2b=false; -} -if(_e2a&&add(d2,YEAR,-1)this.endDate){ -_e2b=false; -} -} -function enableControl(node,_e2e){ -dojo.html.setVisibility(node,_e2e?"":"hidden"); -} -enableControl(this.decreaseWeekNode,_e26); -enableControl(this.increaseWeekNode,_e27); -enableControl(this.decreaseMonthNode,_e28); -enableControl(this.increaseMonthNode,_e29); -enableControl(this.previousYearLabelNode,_e2a); -enableControl(this.nextYearLabelNode,_e2b); -},_incrementWeek:function(evt){ -var d=new Date(this.firstDay); -switch(evt.target){ -case this.increaseWeekNode.getElementsByTagName("img").item(0): -case this.increaseWeekNode: -var _e31=dojo.date.add(d,dojo.date.dateParts.WEEK,1); -if(_e31=this.startDate){ -d=dojo.date.add(d,dojo.date.dateParts.WEEK,-1); -} -break; -} -this._preInitUI(d,true,true); -},_incrementMonth:function(evt){ -var d=new Date(this.curMonth); -var _e34=new Date(this.firstDay); -switch(evt.currentTarget){ -case this.increaseMonthNode.getElementsByTagName("img").item(0): -case this.increaseMonthNode: -_e34=dojo.date.add(_e34,dojo.date.dateParts.DAY,this.displayWeeks*7); -if(_e34this.startDate){ -d=dojo.date.add(d,dojo.date.dateParts.MONTH,-1); -}else{ -var _e36=true; -} -break; -} -if(_e36){ -d=new Date(this.startDate); -}else{ -if(_e35){ -d=new Date(this.endDate); -} -} -this._preInitUI(d,false,true); -},_incrementYear:function(evt){ -var year=this.curMonth.getFullYear(); -var _e39=new Date(this.firstDay); -switch(evt.target){ -case this.nextYearLabelNode: -_e39=dojo.date.add(_e39,dojo.date.dateParts.YEAR,1); -if(_e39this.startDate){ -year--; -}else{ -var _e3b=true; -} -break; -} -var d; -if(_e3b){ -d=new Date(this.startDate); -}else{ -if(_e3a){ -d=new Date(this.endDate); -}else{ -d=new Date(year,this.curMonth.getMonth(),1); -} -} -this._preInitUI(d,false,true); -},onIncrementWeek:function(evt){ -evt.stopPropagation(); -if(!this.staticDisplay){ -this._incrementWeek(evt); -} -},onIncrementMonth:function(evt){ -evt.stopPropagation(); -if(!this.staticDisplay){ -this._incrementMonth(evt); -} -},onIncrementYear:function(evt){ -evt.stopPropagation(); -if(!this.staticDisplay){ -this._incrementYear(evt); -} -},_setMonthLabel:function(_e40){ -this.monthLabelNode.innerHTML=dojo.date.getNames("months","wide","standAlone",this.lang)[_e40]; -},_setYearLabels:function(year){ -var y=year-1; -var that=this; -function f(n){ -that[n+"YearLabelNode"].innerHTML=dojo.date.format(new Date(y++,0),{formatLength:"yearOnly",locale:that.lang}); -} -f("previous"); -f("current"); -f("next"); -},_getDateClassName:function(date,_e46){ -var _e47=this.classNames[_e46]; -if((!this.selectedIsUsed&&this.value)&&(Number(date)==Number(this.value))){ -_e47=this.classNames.selectedDate+" "+_e47; -this.selectedIsUsed=true; -} -if((!this.currentIsUsed)&&(Number(date)==Number(this.today))){ -_e47=_e47+" "+this.classNames.currentDate; -this.currentIsUsed=true; -} -return _e47; -},onClick:function(evt){ -dojo.event.browser.stopEvent(evt); -},_handleUiClick:function(evt){ -var _e4a=evt.target; -if(_e4a.nodeType!=dojo.dom.ELEMENT_NODE){ -_e4a=_e4a.parentNode; -} -dojo.event.browser.stopEvent(evt); -this.selectedIsUsed=this.todayIsUsed=false; -if(dojo.html.hasClass(_e4a,this.classNames["disabledPrevious"])||dojo.html.hasClass(_e4a,this.classNames["disabledCurrent"])||dojo.html.hasClass(_e4a,this.classNames["disabledNext"])){ -return; -} -this.clickedNode=_e4a; -this.setDate(new Date(Number(dojo.html.getAttribute(_e4a,"djDateValue")))); -},onValueChanged:function(date){ -},_isDisabledDate:function(_e4c){ -if(_e4cthis.endDate){ -return true; -} -return this.isDisabledDate(_e4c,this.lang); -},isDisabledDate:function(_e4d,_e4e){ -return false; -},_initFirstDay:function(_e4f,adj){ -var d=new Date(_e4f); -if(!adj){ -d.setDate(1); -} -d.setDate(d.getDate()-this._getAdjustedDay(d,this.weekStartsOn)); -d.setHours(0,0,0,0); -return d; -},_getAdjustedDay:function(_e52){ -var days=[0,1,2,3,4,5,6]; -if(this.weekStartsOn>0){ -for(var i=0;ithis.datePicker.endDate){ -this.inputNode.value=""; -} -this._syncValueNode(); -this.onValueChanged(this.getDate()); -this.hideContainer(); -},onValueChanged:function(_e5e){ -},onInputChange:function(){ -var _e5f=dojo.string.trim(this.inputNode.value); -if(_e5f){ -var _e60=dojo.date.parse(_e5f,{formatLength:this.formatLength,datePattern:this.displayFormat,selector:"dateOnly",locale:this.lang}); -if(!this.datePicker._isDisabledDate(_e60)){ -this.setDate(_e60); -} -}else{ -if(_e5f==""){ -this.datePicker.setDate(""); -} -this.valueNode.value=_e5f; -} -if(_e5f){ -this._updateText(); -} -},_syncValueNode:function(){ -var date=this.datePicker.value; -var _e62=""; -switch(this.saveFormat.toLowerCase()){ -case "rfc": -case "iso": -case "": -_e62=dojo.date.toRfc3339(date,"dateOnly"); -break; -case "posix": -case "unix": -_e62=Number(date); -break; -default: -if(date){ -_e62=dojo.date.format(date,{datePattern:this.saveFormat,selector:"dateOnly",locale:this.lang}); -} -} -this.valueNode.value=_e62; -},destroy:function(_e63){ -this.datePicker.destroy(_e63); -dojo.widget.DropdownDatePicker.superclass.destroy.apply(this,arguments); -}}); -dojo.provide("struts.widget.StrutsDatePicker"); -dojo.widget.defineWidget("struts.widget.StrutsDatePicker",dojo.widget.DropdownDatePicker,{widgetType:"StrutsDatePicker",valueNotifyTopics:"",valueNotifyTopicsArray:null,postCreate:function(){ -struts.widget.StrutsDatePicker.superclass.postCreate.apply(this,arguments); -if(this.extraArgs["class"]){ -dojo.html.setClass(this.inputNode,this.extraArgs["class"]); -} -if(this.extraArgs.style){ -dojo.html.setStyleText(this.inputNode,this.extraArgs.style); -} -if(!dojo.string.isBlank(this.valueNotifyTopics)){ -this.valueNotifyTopicsArray=this.valueNotifyTopics.split(","); -} -},_syncValueNode:function(){ -var date=this.datePicker.value; -var _e65=""; -switch(this.saveFormat.toLowerCase()){ -case "rfc": -case "iso": -case "": -_e65=dojo.date.toRfc3339(date); -break; -case "posix": -case "unix": -_e65=Number(date); -break; -default: -if(date){ -_e65=dojo.date.format(date,{datePattern:this.saveFormat,selector:"dateOnly",locale:this.lang}); -} -} -this.valueNode.value=_e65; -},_updateText:function(){ -struts.widget.StrutsDatePicker.superclass._updateText.apply(this,arguments); -if(this.valueNotifyTopicsArray!=null){ -for(var i=0;i",selectedChild:"",fillInTemplate:function(args,frag){ -var _e8d=this.getFragNodeRef(frag); -dojo.html.copyStyle(this.domNode,_e8d); -dojo.widget.PageContainer.superclass.fillInTemplate.apply(this,arguments); -},postCreate:function(args,frag){ -if(this.children.length){ -dojo.lang.forEach(this.children,this._setupChild,this); -var _e90; -if(this.selectedChild){ -this.selectChild(this.selectedChild); -}else{ -for(var i=0;i0){ -this.selectChild(this.children[0],true); -} -} -},selectChild:function(page,_e96){ -page=dojo.widget.byId(page); -this.correspondingPageButton=_e96; -if(this.selectedChildWidget){ -this._hideChild(this.selectedChildWidget); -} -this.selectedChildWidget=page; -this.selectedChild=page.widgetId; -this._showChild(page); -page.isFirstChild=(page==this.children[0]); -page.isLastChild=(page==this.children[this.children.length-1]); -dojo.event.topic.publish(this.widgetId+"-selectChild",page); -},forward:function(){ -var _e97=dojo.lang.find(this.children,this.selectedChildWidget); -this.selectChild(this.children[_e97+1]); -},back:function(){ -var _e98=dojo.lang.find(this.children,this.selectedChildWidget); -this.selectChild(this.children[_e98-1]); -},onResized:function(){ -if(this.doLayout&&this.selectedChildWidget){ -with(this.selectedChildWidget.domNode.style){ -top=dojo.html.getPixelValue(this.containerNode,"padding-top",true); -left=dojo.html.getPixelValue(this.containerNode,"padding-left",true); -} -var _e99=dojo.html.getContentBox(this.containerNode); -this.selectedChildWidget.resizeTo(_e99.width,_e99.height); -} -},_showChild:function(page){ -if(this.doLayout){ -var _e9b=dojo.html.getContentBox(this.containerNode); -page.resizeTo(_e9b.width,_e9b.height); -} -page.selected=true; -page.show(); -},_hideChild:function(page){ -page.selected=false; -page.hide(); -},closeChild:function(page){ -var _e9e=page.onClose(this,page); -if(_e9e){ -this.removeChild(page); -page.destroy(); -} -},destroy:function(){ -this._beingDestroyed=true; -dojo.event.topic.destroy(this.widgetId+"-addChild"); -dojo.event.topic.destroy(this.widgetId+"-removeChild"); -dojo.event.topic.destroy(this.widgetId+"-selectChild"); -dojo.widget.PageContainer.superclass.destroy.apply(this,arguments); -}}); -dojo.widget.defineWidget("dojo.widget.PageController",dojo.widget.HtmlWidget,{templateString:"",isContainer:true,containerId:"",buttonWidget:"PageButton","class":"dojoPageController",fillInTemplate:function(){ -dojo.html.addClass(this.domNode,this["class"]); -dojo.widget.wai.setAttr(this.domNode,"waiRole","role","tablist"); -},postCreate:function(){ -this.pane2button={}; -var _e9f=dojo.widget.byId(this.containerId); -if(_e9f){ -dojo.lang.forEach(_e9f.children,this.onAddChild,this); -} -dojo.event.topic.subscribe(this.containerId+"-addChild",this,"onAddChild"); -dojo.event.topic.subscribe(this.containerId+"-removeChild",this,"onRemoveChild"); -dojo.event.topic.subscribe(this.containerId+"-selectChild",this,"onSelectChild"); -},destroy:function(){ -dojo.event.topic.unsubscribe(this.containerId+"-addChild",this,"onAddChild"); -dojo.event.topic.unsubscribe(this.containerId+"-removeChild",this,"onRemoveChild"); -dojo.event.topic.unsubscribe(this.containerId+"-selectChild",this,"onSelectChild"); -dojo.widget.PageController.superclass.destroy.apply(this,arguments); -},onAddChild:function(page){ -var _ea1=dojo.widget.createWidget(this.buttonWidget,{label:page.label,closeButton:page.closable}); -this.addChild(_ea1); -this.domNode.appendChild(_ea1.domNode); -this.pane2button[page]=_ea1; -page.controlButton=_ea1; -var _ea2=this; -dojo.event.connect(_ea1,"onClick",function(){ -_ea2.onButtonClick(page); -}); -dojo.event.connect(_ea1,"onCloseButtonClick",function(){ -_ea2.onCloseButtonClick(page); -}); -},onRemoveChild:function(page){ -if(this._currentChild==page){ -this._currentChild=null; -} -var _ea4=this.pane2button[page]; -if(_ea4){ -_ea4.destroy(); -} -this.pane2button[page]=null; -},onSelectChild:function(page){ -if(this._currentChild){ -var _ea6=this.pane2button[this._currentChild]; -_ea6.clearSelected(); -} -var _ea7=this.pane2button[page]; -_ea7.setSelected(); -this._currentChild=page; -},onButtonClick:function(page){ -var _ea9=dojo.widget.byId(this.containerId); -_ea9.selectChild(page,false,this); -},onCloseButtonClick:function(page){ -var _eab=dojo.widget.byId(this.containerId); -_eab.closeChild(page); -},onKey:function(evt){ -if((evt.keyCode==evt.KEY_RIGHT_ARROW)||(evt.keyCode==evt.KEY_LEFT_ARROW)){ -var _ead=0; -var next=null; -var _ead=dojo.lang.find(this.children,this.pane2button[this._currentChild]); -if(evt.keyCode==evt.KEY_RIGHT_ARROW){ -next=this.children[(_ead+1)%this.children.length]; -}else{ -next=this.children[(_ead+(this.children.length-1))%this.children.length]; -} -dojo.event.browser.stopEvent(evt); -next.onClick(); -} -}}); -dojo.widget.defineWidget("dojo.widget.PageButton",dojo.widget.HtmlWidget,{templateString:""+"${this.label}"+"[X]"+"",label:"foo",closeButton:false,onClick:function(){ -this.focus(); -},onCloseButtonMouseOver:function(){ -dojo.html.addClass(this.closeButtonNode,"closeHover"); -},onCloseButtonMouseOut:function(){ -dojo.html.removeClass(this.closeButtonNode,"closeHover"); -},onCloseButtonClick:function(evt){ -},setSelected:function(){ -dojo.html.addClass(this.domNode,"current"); -this.titleNode.setAttribute("tabIndex","0"); -},clearSelected:function(){ -dojo.html.removeClass(this.domNode,"current"); -this.titleNode.setAttribute("tabIndex","-1"); -},focus:function(){ -if(this.titleNode.focus){ -this.titleNode.focus(); -} -}}); -dojo.lang.extend(dojo.widget.Widget,{label:"",selected:false,closable:false,onClose:function(){ -return true; -}}); -dojo.provide("dojo.widget.TabContainer"); -dojo.widget.defineWidget("dojo.widget.TabContainer",dojo.widget.PageContainer,{labelPosition:"top",closeButton:"none",templateString:null,templateString:"
    \r\n\t
    \r\n\t
    \r\n
    \r\n",templateCssString:".dojoTabContainer {\r\n\tposition : relative;\r\n}\r\n\r\n.dojoTabPaneWrapper {\r\n\tborder : 1px solid #6290d2;\r\n\t_zoom: 1; /* force IE6 layout mode so top border doesnt disappear */\r\n\tdisplay: block;\r\n\tclear: both;\r\n\toverflow: hidden;\r\n}\r\n\r\n.dojoTabLabels-top {\r\n\tposition : relative;\r\n\ttop : 0px;\r\n\tleft : 0px;\r\n\toverflow : visible;\r\n\tmargin-bottom : -1px;\r\n\twidth : 100%;\r\n\tz-index: 2;\t/* so the bottom of the tab label will cover up the border of dojoTabPaneWrapper */\r\n}\r\n\r\n.dojoTabNoLayout.dojoTabLabels-top .dojoTab {\r\n\tmargin-bottom: -1px;\r\n\t_margin-bottom: 0px; /* IE filter so top border lines up correctly */\r\n}\r\n\r\n.dojoTab {\r\n\tposition : relative;\r\n\tfloat : left;\r\n\tpadding-left : 9px;\r\n\tborder-bottom : 1px solid #6290d2;\r\n\tbackground : url(images/tab_left.gif) no-repeat left top;\r\n\tcursor: pointer;\r\n\twhite-space: nowrap;\r\n\tz-index: 3;\r\n}\r\n\r\n.dojoTab div {\r\n\tdisplay : block;\r\n\tpadding : 4px 15px 4px 6px;\r\n\tbackground : url(images/tab_top_right.gif) no-repeat right top;\r\n\tcolor : #333;\r\n\tfont-size : 90%;\r\n}\r\n\r\n.dojoTab .close {\r\n\tdisplay : inline-block;\r\n\theight : 12px;\r\n\twidth : 12px;\r\n\tpadding : 0 12px 0 0;\r\n\tmargin : 0 -10px 0 10px;\r\n\tcursor : default;\r\n\tfont-size: small;\r\n}\r\n\r\n.dojoTab .closeImage {\r\n\tbackground : url(images/tab_close.gif) no-repeat right top;\r\n}\r\n\r\n.dojoTab .closeHover {\r\n\tbackground-image : url(images/tab_close_h.gif);\r\n}\r\n\r\n.dojoTab.current {\r\n\tpadding-bottom : 1px;\r\n\tborder-bottom : 0;\r\n\tbackground-position : 0 -150px;\r\n}\r\n\r\n.dojoTab.current div {\r\n\tpadding-bottom : 5px;\r\n\tmargin-bottom : -1px;\r\n\tbackground-position : 100% -150px;\r\n}\r\n\r\n/* bottom tabs */\r\n\r\n.dojoTabLabels-bottom {\r\n\tposition : relative;\r\n\tbottom : 0px;\r\n\tleft : 0px;\r\n\toverflow : visible;\r\n\tmargin-top : -1px;\r\n\twidth : 100%;\r\n\tz-index: 2;\r\n}\r\n\r\n.dojoTabNoLayout.dojoTabLabels-bottom {\r\n\tposition : relative;\r\n}\r\n\r\n.dojoTabLabels-bottom .dojoTab {\r\n\tborder-top : 1px solid #6290d2;\r\n\tborder-bottom : 0;\r\n\tbackground : url(images/tab_bot_left.gif) no-repeat left bottom;\r\n}\r\n\r\n.dojoTabLabels-bottom .dojoTab div {\r\n\tbackground : url(images/tab_bot_right.gif) no-repeat right bottom;\r\n}\r\n\r\n.dojoTabLabels-bottom .dojoTab.current {\r\n\tborder-top : 0;\r\n\tbackground : url(images/tab_bot_left_curr.gif) no-repeat left bottom;\r\n}\r\n\r\n.dojoTabLabels-bottom .dojoTab.current div {\r\n\tpadding-top : 4px;\r\n\tbackground : url(images/tab_bot_right_curr.gif) no-repeat right bottom;\r\n}\r\n\r\n/* right-h tabs */\r\n\r\n.dojoTabLabels-right-h {\r\n\toverflow : visible;\r\n\tmargin-left : -1px;\r\n\tz-index: 2;\r\n}\r\n\r\n.dojoTabLabels-right-h .dojoTab {\r\n\tpadding-left : 0;\r\n\tborder-left : 1px solid #6290d2;\r\n\tborder-bottom : 0;\r\n\tbackground : url(images/tab_bot_right.gif) no-repeat right bottom;\r\n\tfloat : none;\r\n}\r\n\r\n.dojoTabLabels-right-h .dojoTab div {\r\n\tpadding : 4px 15px 4px 15px;\r\n}\r\n\r\n.dojoTabLabels-right-h .dojoTab.current {\r\n\tborder-left : 0;\r\n\tborder-bottom : 1px solid #6290d2;\r\n}\r\n\r\n/* left-h tabs */\r\n\r\n.dojoTabLabels-left-h {\r\n\toverflow : visible;\r\n\tmargin-right : -1px;\r\n\tz-index: 2;\r\n}\r\n\r\n.dojoTabLabels-left-h .dojoTab {\r\n\tborder-right : 1px solid #6290d2;\r\n\tborder-bottom : 0;\r\n\tfloat : none;\r\n\tbackground : url(images/tab_top_left.gif) no-repeat left top;\r\n}\r\n\r\n.dojoTabLabels-left-h .dojoTab.current {\r\n\tborder-right : 0;\r\n\tborder-bottom : 1px solid #6290d2;\r\n\tpadding-bottom : 0;\r\n\tbackground : url(images/tab_top_left.gif) no-repeat 0 -150px;\r\n}\r\n\r\n.dojoTabLabels-left-h .dojoTab div {\r\n\tbackground : 0;\r\n\tborder-bottom : 1px solid #6290d2;\r\n}\r\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/TabContainer.css"),selectedTab:"",postMixInProperties:function(){ -if(this.selectedTab){ -dojo.deprecated("selectedTab deprecated, use selectedChild instead, will be removed in","0.5"); -this.selectedChild=this.selectedTab; -} -if(this.closeButton!="none"){ -dojo.deprecated("closeButton deprecated, use closable='true' on each child instead, will be removed in","0.5"); -} -dojo.widget.TabContainer.superclass.postMixInProperties.apply(this,arguments); -},fillInTemplate:function(){ -this.tablist=dojo.widget.createWidget("TabController",{id:this.widgetId+"_tablist",labelPosition:this.labelPosition,doLayout:this.doLayout,containerId:this.widgetId},this.tablistNode); -dojo.widget.TabContainer.superclass.fillInTemplate.apply(this,arguments); -},postCreate:function(args,frag){ -dojo.widget.TabContainer.superclass.postCreate.apply(this,arguments); -this.onResized(); -},_setupChild:function(tab){ -if(this.closeButton=="tab"||this.closeButton=="pane"){ -tab.closable=true; -} -dojo.html.addClass(tab.domNode,"dojoTabPane"); -dojo.widget.TabContainer.superclass._setupChild.apply(this,arguments); -},onResized:function(){ -if(!this.doLayout){ -return; -} -var _eb3=this.labelPosition.replace(/-h/,""); -var _eb4=[{domNode:this.tablist.domNode,layoutAlign:_eb3},{domNode:this.containerNode,layoutAlign:"client"}]; -dojo.widget.html.layout(this.domNode,_eb4); -if(this.selectedChildWidget){ -var _eb5=dojo.html.getContentBox(this.containerNode); -this.selectedChildWidget.resizeTo(_eb5.width,_eb5.height); -} -},selectTab:function(tab,_eb7){ -dojo.deprecated("use selectChild() rather than selectTab(), selectTab() will be removed in","0.5"); -this.selectChild(tab,_eb7); -},onKey:function(e){ -if(e.keyCode==e.KEY_UP_ARROW&&e.ctrlKey){ -var _eb9=this.correspondingTabButton||this.selectedTabWidget.tabButton; -_eb9.focus(); -dojo.event.browser.stopEvent(e); -}else{ -if(e.keyCode==e.KEY_DELETE&&e.altKey){ -if(this.selectedChildWidget.closable){ -this.closeChild(this.selectedChildWidget); -dojo.event.browser.stopEvent(e); -} -} -} -},destroy:function(){ -this.tablist.destroy(); -dojo.widget.TabContainer.superclass.destroy.apply(this,arguments); -}}); -dojo.widget.defineWidget("dojo.widget.TabController",dojo.widget.PageController,{templateString:"
    ",labelPosition:"top",doLayout:true,"class":"",buttonWidget:"TabButton",postMixInProperties:function(){ -if(!this["class"]){ -this["class"]="dojoTabLabels-"+this.labelPosition+(this.doLayout?"":" dojoTabNoLayout"); -} -dojo.widget.TabController.superclass.postMixInProperties.apply(this,arguments); -}}); -dojo.widget.defineWidget("dojo.widget.TabButton",dojo.widget.PageButton,{templateString:"
    "+"
    "+"${this.label}"+""+"
    "+"
    ",postMixInProperties:function(){ -this.closeButtonStyle=this.closeButton?"":"display: none"; -dojo.widget.TabButton.superclass.postMixInProperties.apply(this,arguments); -},fillInTemplate:function(){ -dojo.html.disableSelection(this.titleNode); -dojo.widget.TabButton.superclass.fillInTemplate.apply(this,arguments); -},onCloseButtonClick:function(evt){ -evt.stopPropagation(); -dojo.widget.TabButton.superclass.onCloseButtonClick.apply(this,arguments); -}}); -dojo.widget.defineWidget("dojo.widget.a11y.TabButton",dojo.widget.TabButton,{imgPath:dojo.uri.moduleUri("dojo.widget","templates/images/tab_close.gif"),templateString:"
    "+"
    "+"${this.label}"+"[x]"+"
    "+"
    "}); -dojo.provide("struts.widget.StrutsTabContainer"); -dojo.widget.defineWidget("struts.widget.StrutsTabContainer",dojo.widget.TabContainer,{widgetType:"StrutsTabContainer",afterSelectTabNotifyTopics:"",afterSelectTabNotifyTopicsArray:null,beforeSelectTabNotifyTopics:"",beforeSelectTabNotifyTopicsArray:null,disabledTabCssClass:"strutsDisabledTab",postCreate:function(){ -struts.widget.StrutsTabContainer.superclass.postCreate.apply(this); -if(!dojo.string.isBlank(this.beforeSelectTabNotifyTopics)){ -this.beforeSelectTabNotifyTopicsArray=this.beforeSelectTabNotifyTopics.split(","); -} -if(!dojo.string.isBlank(this.afterSelectTabNotifyTopics)){ -this.afterSelectTabNotifyTopicsArray=this.afterSelectTabNotifyTopics.split(","); -} -if(this.disabledTabCssClass){ -dojo.lang.forEach(this.children,function(div){ -if(div.disabled){ -this.disableTab(div); -} -}); -} -},selectChild:function(tab,_ebd){ -if(!tab.disabled){ -var _ebe={"cancel":false}; -if(this.beforeSelectTabNotifyTopicsArray){ -var self=this; -dojo.lang.forEach(this.beforeSelectTabNotifyTopicsArray,function(_ec0){ -try{ -dojo.event.topic.publish(_ec0,_ebe,tab,self); -} -catch(ex){ -dojo.debug(ex); -} -}); -} -if(!_ebe.cancel){ -struts.widget.StrutsTabContainer.superclass.selectChild.apply(this,[tab,_ebd]); -if(this.afterSelectTabNotifyTopicsArray){ -var self=this; -dojo.lang.forEach(this.afterSelectTabNotifyTopicsArray,function(_ec1){ -try{ -dojo.event.topic.publish(_ec1,tab,self); -} -catch(ex){ -dojo.debug(ex); -} -}); -} -} -} -},disableTab:function(t){ -var _ec3=this.getTabWidget(t); -_ec3.disabled=true; -dojo.html.addClass(_ec3.controlButton.domNode,this.disabledTabCssClass); -},enableTab:function(t){ -var _ec5=this.getTabWidget(t); -_ec5.disabled=false; -dojo.html.removeClass(_ec5.controlButton.domNode,this.disabledTabCssClass); -},getTabWidget:function(t){ -if(dojo.lang.isNumber(t)){ -return this.children[t]; -}else{ -if(dojo.lang.isString(t)){ -return dojo.widget.byId(t); -}else{ -return t; -} -} -}}); -dojo.provide("dojo.widget.TreeNode"); -dojo.widget.defineWidget("dojo.widget.TreeNode",dojo.widget.HtmlWidget,function(){ -this.actionsDisabled=[]; -},{widgetType:"TreeNode",loadStates:{UNCHECKED:"UNCHECKED",LOADING:"LOADING",LOADED:"LOADED"},actions:{MOVE:"MOVE",REMOVE:"REMOVE",EDIT:"EDIT",ADDCHILD:"ADDCHILD"},isContainer:true,lockLevel:0,templateString:("
    "+" "+"\t\t${this.title} "+" "+"${this.afterLabel} "+"
    "+"
    ").replace(/(>|<)\s+/g,"$1"),childIconSrc:"",childIconFolderSrc:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/closed.gif"),childIconDocumentSrc:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/document.gif"),childIcon:null,isTreeNode:true,objectId:"",afterLabel:"",afterLabelNode:null,expandIcon:null,title:"",object:"",isFolder:false,labelNode:null,titleNode:null,imgs:null,expandLevel:"",tree:null,depth:0,isExpanded:false,state:null,domNodeInitialized:false,isFirstChild:function(){ -return this.getParentIndex()==0?true:false; -},isLastChild:function(){ -return this.getParentIndex()==this.parent.children.length-1?true:false; -},lock:function(){ -return this.tree.lock.apply(this,arguments); -},unlock:function(){ -return this.tree.unlock.apply(this,arguments); -},isLocked:function(){ -return this.tree.isLocked.apply(this,arguments); -},cleanLock:function(){ -return this.tree.cleanLock.apply(this,arguments); -},actionIsDisabled:function(_ec7){ -var _ec8=this; -var _ec9=false; -if(this.tree.strictFolders&&_ec7==this.actions.ADDCHILD&&!this.isFolder){ -_ec9=true; -} -if(dojo.lang.inArray(_ec8.actionsDisabled,_ec7)){ -_ec9=true; -} -if(this.isLocked()){ -_ec9=true; -} -return _ec9; -},getInfo:function(){ -var info={widgetId:this.widgetId,objectId:this.objectId,index:this.getParentIndex(),isFolder:this.isFolder}; -return info; -},initialize:function(args,frag){ -this.state=this.loadStates.UNCHECKED; -for(var i=0;i0){ -for(var i=0;i<_ece;i++){ -var img=this.tree.makeBlankImg(); -this.imgs.unshift(img); -dojo.html.insertBefore(this.imgs[0],this.domNode.firstChild); -} -} -if(_ece<0){ -for(var i=0;i<-_ece;i++){ -this.imgs.shift(); -dojo.html.removeNode(this.domNode.firstChild); -} -} -},markLoading:function(){ -this._markLoadingSavedIcon=this.expandIcon.src; -this.expandIcon.src=this.tree.expandIconSrcLoading; -},unMarkLoading:function(){ -if(!this._markLoadingSavedIcon){ -return; -} -var im=new Image(); -im.src=this.tree.expandIconSrcLoading; -if(this.expandIcon.src==im.src){ -this.expandIcon.src=this._markLoadingSavedIcon; -} -this._markLoadingSavedIcon=null; -},setFolder:function(){ -dojo.event.connect(this.expandIcon,"onclick",this,"onTreeClick"); -this.expandIcon.src=this.isExpanded?this.tree.expandIconSrcMinus:this.tree.expandIconSrcPlus; -this.isFolder=true; -},createDOMNode:function(tree,_ed3){ -this.tree=tree; -this.depth=_ed3; -this.imgs=[]; -for(var i=0;i-1?"&":"?")+"nodeId="+this.widgetId; -var self=this; -this.markLoading(); -dojo.io.bind({url:_ee8,useCache:false,preventCache:true,handler:function(type,data,e){ -if(type=="load"){ -if(data){ -dojo.lang.forEach(data,function(_eed){ -var _eee=dojo.widget.createWidget("struts:StrutsTreeNode",{title:_eed.label,isFolder:_eed.hasChildren,widgetId:_eed.id}); -self.addChild(_eee); -}); -} -} -self.unMarkLoading(); -},mimetype:"text/json"}); -} -}}); -dojo.provide("dojo.json"); -dojo.json={jsonRegistry:new dojo.AdapterRegistry(),register:function(name,_ef0,wrap,_ef2){ -dojo.json.jsonRegistry.register(name,_ef0,wrap,_ef2); -},evalJson:function(json){ -try{ -return eval("("+json+")"); -} -catch(e){ -dojo.debug(e); -return json; -} -},serialize:function(o){ -var _ef5=typeof (o); -if(_ef5=="undefined"){ -return "undefined"; -}else{ -if((_ef5=="number")||(_ef5=="boolean")){ -return o+""; -}else{ -if(o===null){ -return "null"; -} -} -} -if(_ef5=="string"){ -return dojo.string.escapeString(o); -} -var me=arguments.callee; -var _ef7; -if(typeof (o.__json__)=="function"){ -_ef7=o.__json__(); -if(o!==_ef7){ -return me(_ef7); -} -} -if(typeof (o.json)=="function"){ -_ef7=o.json(); -if(o!==_ef7){ -return me(_ef7); -} -} -if(_ef5!="function"&&typeof (o.length)=="number"){ -var res=[]; -for(var i=0;i_f29.getParentIndex()){ -_f2b--; -} -return _f2b; -},onDrop:function(e){ -var _f2d=this.position; -this.onDragOut(e); -var _f2e=e.dragObject.treeNode; -if(!dojo.lang.isObject(_f2e)){ -dojo.raise("TreeNode not found in dragObject"); -} -if(_f2d=="onto"){ -return this.controller.move(_f2e,this.treeNode,0); -}else{ -var _f2f=this.getTargetParentIndex(_f2e,_f2d); -return this.controller.move(_f2e,this.treeNode.parent,_f2f); -} -}}); -dojo.dnd.TreeDNDController=function(_f30){ -this.treeController=_f30; -this.dragSources={}; -this.dropTargets={}; -}; -dojo.lang.extend(dojo.dnd.TreeDNDController,{listenTree:function(tree){ -dojo.event.topic.subscribe(tree.eventNames.createDOMNode,this,"onCreateDOMNode"); -dojo.event.topic.subscribe(tree.eventNames.moveFrom,this,"onMoveFrom"); -dojo.event.topic.subscribe(tree.eventNames.moveTo,this,"onMoveTo"); -dojo.event.topic.subscribe(tree.eventNames.addChild,this,"onAddChild"); -dojo.event.topic.subscribe(tree.eventNames.removeNode,this,"onRemoveNode"); -dojo.event.topic.subscribe(tree.eventNames.treeDestroy,this,"onTreeDestroy"); -},unlistenTree:function(tree){ -dojo.event.topic.unsubscribe(tree.eventNames.createDOMNode,this,"onCreateDOMNode"); -dojo.event.topic.unsubscribe(tree.eventNames.moveFrom,this,"onMoveFrom"); -dojo.event.topic.unsubscribe(tree.eventNames.moveTo,this,"onMoveTo"); -dojo.event.topic.unsubscribe(tree.eventNames.addChild,this,"onAddChild"); -dojo.event.topic.unsubscribe(tree.eventNames.removeNode,this,"onRemoveNode"); -dojo.event.topic.unsubscribe(tree.eventNames.treeDestroy,this,"onTreeDestroy"); -},onTreeDestroy:function(_f33){ -this.unlistenTree(_f33.source); -},onCreateDOMNode:function(_f34){ -this.registerDNDNode(_f34.source); -},onAddChild:function(_f35){ -this.registerDNDNode(_f35.child); -},onMoveFrom:function(_f36){ -var _f37=this; -dojo.lang.forEach(_f36.child.getDescendants(),function(node){ -_f37.unregisterDNDNode(node); -}); -},onMoveTo:function(_f39){ -var _f3a=this; -dojo.lang.forEach(_f39.child.getDescendants(),function(node){ -_f3a.registerDNDNode(node); -}); -},registerDNDNode:function(node){ -if(!node.tree.DNDMode){ -return; -} -var _f3d=null; -var _f3e=null; -if(!node.actionIsDisabled(node.actions.MOVE)){ -var _f3d=new dojo.dnd.TreeDragSource(node.labelNode,this,node.tree.widgetId,node); -this.dragSources[node.widgetId]=_f3d; -} -var _f3e=new dojo.dnd.TreeDropTarget(node.labelNode,this.treeController,node.tree.DNDAcceptTypes,node); -this.dropTargets[node.widgetId]=_f3e; -},unregisterDNDNode:function(node){ -if(this.dragSources[node.widgetId]){ -dojo.dnd.dragManager.unregisterDragSource(this.dragSources[node.widgetId]); -delete this.dragSources[node.widgetId]; -} -if(this.dropTargets[node.widgetId]){ -dojo.dnd.dragManager.unregisterDropTarget(this.dropTargets[node.widgetId]); -delete this.dropTargets[node.widgetId]; -} -}}); -dojo.provide("dojo.widget.TreeBasicController"); -dojo.widget.defineWidget("dojo.widget.TreeBasicController",dojo.widget.HtmlWidget,{widgetType:"TreeBasicController",DNDController:"",dieWithTree:false,initialize:function(args,frag){ -if(this.DNDController=="create"){ -this.DNDController=new dojo.dnd.TreeDNDController(this); -} -},listenTree:function(tree){ -dojo.event.topic.subscribe(tree.eventNames.createDOMNode,this,"onCreateDOMNode"); -dojo.event.topic.subscribe(tree.eventNames.treeClick,this,"onTreeClick"); -dojo.event.topic.subscribe(tree.eventNames.treeCreate,this,"onTreeCreate"); -dojo.event.topic.subscribe(tree.eventNames.treeDestroy,this,"onTreeDestroy"); -if(this.DNDController){ -this.DNDController.listenTree(tree); -} -},unlistenTree:function(tree){ -dojo.event.topic.unsubscribe(tree.eventNames.createDOMNode,this,"onCreateDOMNode"); -dojo.event.topic.unsubscribe(tree.eventNames.treeClick,this,"onTreeClick"); -dojo.event.topic.unsubscribe(tree.eventNames.treeCreate,this,"onTreeCreate"); -dojo.event.topic.unsubscribe(tree.eventNames.treeDestroy,this,"onTreeDestroy"); -},onTreeDestroy:function(_f44){ -var tree=_f44.source; -this.unlistenTree(tree); -if(this.dieWithTree){ -this.destroy(); -} -},onCreateDOMNode:function(_f46){ -var node=_f46.source; -if(node.expandLevel>0){ -this.expandToLevel(node,node.expandLevel); -} -},onTreeCreate:function(_f48){ -var tree=_f48.source; -var _f4a=this; -if(tree.expandLevel){ -dojo.lang.forEach(tree.children,function(_f4b){ -_f4a.expandToLevel(_f4b,tree.expandLevel-1); -}); -} -},expandToLevel:function(node,_f4d){ -if(_f4d==0){ -return; -} -var _f4e=node.children; -var _f4f=this; -var _f50=function(node,_f52){ -this.node=node; -this.expandLevel=_f52; -this.process=function(){ -for(var i=0;i",isExpanded:true,isTree:true,objectId:"",controller:"",selector:"",menu:"",expandLevel:"",blankIconSrc:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_blank.gif"),gridIconSrcT:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_grid_t.gif"),gridIconSrcL:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_grid_l.gif"),gridIconSrcV:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_grid_v.gif"),gridIconSrcP:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_grid_p.gif"),gridIconSrcC:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_grid_c.gif"),gridIconSrcX:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_grid_x.gif"),gridIconSrcY:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_grid_y.gif"),gridIconSrcZ:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_grid_z.gif"),expandIconSrcPlus:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_expand_plus.gif"),expandIconSrcMinus:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_expand_minus.gif"),expandIconSrcLoading:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_loading.gif"),iconWidth:18,iconHeight:18,showGrid:true,showRootGrid:true,actionIsDisabled:function(_f7d){ -var _f7e=this; -return dojo.lang.inArray(_f7e.actionsDisabled,_f7d); -},actions:{ADDCHILD:"ADDCHILD"},getInfo:function(){ -var info={widgetId:this.widgetId,objectId:this.objectId}; -return info; -},initializeController:function(){ -if(this.controller!="off"){ -if(this.controller){ -this.controller=dojo.widget.byId(this.controller); -}else{ -this.controller=dojo.widget.createWidget("TreeBasicController",{DNDController:(this.DNDMode?"create":""),dieWithTree:true}); -} -this.controller.listenTree(this); -}else{ -this.controller=null; -} -},initializeSelector:function(){ -if(this.selector!="off"){ -if(this.selector){ -this.selector=dojo.widget.byId(this.selector); -}else{ -this.selector=dojo.widget.createWidget("TreeSelector",{dieWithTree:true}); -} -this.selector.listenTree(this); -}else{ -this.selector=null; -} -},initialize:function(args,frag){ -var _f82=this; -for(name in this.eventNamesDefault){ -if(dojo.lang.isUndefined(this.eventNames[name])){ -this.eventNames[name]=this.widgetId+"/"+this.eventNamesDefault[name]; -} -} -for(var i=0;i0){ -_fa1[_fa2-1].updateExpandGridColumn(); -} -if(_fa0 instanceof dojo.widget.Tree&&_fa2==0&&_fa1.length>0){ -_fa1[0].updateExpandGrid(); -} -_f9f.parent=_f9f.tree=null; -return _f9f; -},markLoading:function(){ -},unMarkLoading:function(){ -},lock:function(){ -!this.lockLevel&&this.markLoading(); -this.lockLevel++; -},unlock:function(){ -if(!this.lockLevel){ -dojo.raise("unlock: not locked"); -} -this.lockLevel--; -!this.lockLevel&&this.unMarkLoading(); -},isLocked:function(){ -var node=this; -while(true){ -if(node.lockLevel){ -return true; -} -if(node instanceof dojo.widget.Tree){ -break; -} -node=node.parent; -} -return false; -},flushLock:function(){ -this.lockLevel=0; -this.unMarkLoading(); -}}); -dojo.provide("struts.widget.StrutsTree"); -dojo.widget.defineWidget("struts.widget.StrutsTree",dojo.widget.Tree,{widgetType:"StrutsTree",href:"",errorNotifyTopics:"",errorNotifyTopicsArray:null,postCreate:function(){ -struts.widget.StrutsTree.superclass.postCreate.apply(this); -if(!dojo.string.isBlank(this.errorNotifyTopics)){ -this.errorNotifyTopicsArray=this.errorNotifyTopics.split(","); -} -var self=this; -if(!dojo.string.isBlank(this.href)){ -dojo.io.bind({url:this.href,useCache:false,preventCache:true,handler:function(type,data,e){ -if(type=="load"){ -if(data){ -dojo.lang.forEach(data,function(_fa8){ -var _fa9=dojo.widget.createWidget("struts:StrutsTreeNode",{title:_fa8.label,isFolder:_fa8.hasChildren,widgetId:_fa8.id}); -self.addChild(_fa9); -}); -} -}else{ -if(self.errorNotifyTopicsArray){ -dojo.lang.forEach(self.errorNotifyTopicsArray,function(_faa){ -try{ -dojo.event.topic.publish(_faa,data,e,self); -} -catch(ex){ -dojo.debug(ex); -} -}); -} -} -},mimetype:"text/json"}); -} -}}); -dojo.kwCompoundRequire({common:["struts.widget.Bind","struts.widget.BindDiv","struts.widget.BindAnchor","struts.widget.ComboBox","struts.widget.StrutsTimePicker","struts.widget.StrutsDatePicker","struts.widget.BindEvent","struts.widget.StrutsTreeSelector","struts.widget.StrutsTabContainer","struts.widget.StrutsTreeNode","struts.widget.StrutsTree"]}); -dojo.provide("struts.widget.*"); - +/* + Copyright (c) 2004-2006, The Dojo Foundation + All Rights Reserved. + + Licensed under the Academic Free License version 2.1 or above OR the + modified BSD license. For more information on Dojo licensing, see: + + http://dojotoolkit.org/community/licensing.shtml +*/ + +/* + This is a compiled version of Dojo, built for deployment and not for + development. To get an editable version, please visit: + + http://dojotoolkit.org + + for documentation and information on getting the source. +*/ + +if(typeof dojo=="undefined"){ +var dj_global=this; +var dj_currentContext=this; +function dj_undef(_1,_2){ +return (typeof (_2||dj_currentContext)[_1]=="undefined"); +} +if(dj_undef("djConfig",this)){ +var djConfig={}; +} +if(dj_undef("dojo",this)){ +var dojo={}; +} +dojo.global=function(){ +return dj_currentContext; +}; +dojo.locale=djConfig.locale; +dojo.version={major:0,minor:4,patch:3,flag:"",revision:Number("$Rev$".match(/[0-9]+/)[0]),toString:function(){ +with(dojo.version){ +return major+"."+minor+"."+patch+flag+" ("+revision+")"; +} +}}; +dojo.evalProp=function(_3,_4,_5){ +if((!_4)||(!_3)){ +return undefined; +} +if(!dj_undef(_3,_4)){ +return _4[_3]; +} +return (_5?(_4[_3]={}):undefined); +}; +dojo.parseObjPath=function(_6,_7,_8){ +var _9=(_7||dojo.global()); +var _a=_6.split("."); +var _b=_a.pop(); +for(var i=0,l=_a.length;i1){ +dh.modulesLoadedListeners.push(function(){ +obj[_3d](); +}); +} +} +if(dh.post_load_&&dh.inFlightCount==0&&!dh.loadNotifying){ +dh.callLoaded(); +} +}; +dojo.addOnUnload=function(obj,_40){ +var dh=dojo.hostenv; +if(arguments.length==1){ +dh.unloadListeners.push(obj); +}else{ +if(arguments.length>1){ +dh.unloadListeners.push(function(){ +obj[_40](); +}); +} +} +}; +dojo.hostenv.modulesLoaded=function(){ +if(this.post_load_){ +return; +} +if(this.loadUriStack.length==0&&this.getTextStack.length==0){ +if(this.inFlightCount>0){ +dojo.debug("files still in flight!"); +return; +} +dojo.hostenv.callLoaded(); +} +}; +dojo.hostenv.callLoaded=function(){ +if(typeof setTimeout=="object"||(djConfig["useXDomain"]&&dojo.render.html.opera)){ +setTimeout("dojo.hostenv.loaded();",0); +}else{ +dojo.hostenv.loaded(); +} +}; +dojo.hostenv.getModuleSymbols=function(_42){ +var _43=_42.split("."); +for(var i=_43.length;i>0;i--){ +var _45=_43.slice(0,i).join("."); +if((i==1)&&!this.moduleHasPrefix(_45)){ +_43[0]="../"+_43[0]; +}else{ +var _46=this.getModulePrefix(_45); +if(_46!=_45){ +_43.splice(0,i,_46); +break; +} +} +} +return _43; +}; +dojo.hostenv._global_omit_module_check=false; +dojo.hostenv.loadModule=function(_47,_48,_49){ +if(!_47){ +return; +} +_49=this._global_omit_module_check||_49; +var _4a=this.findModule(_47,false); +if(_4a){ +return _4a; +} +if(dj_undef(_47,this.loading_modules_)){ +this.addedToLoadingCount.push(_47); +} +this.loading_modules_[_47]=1; +var _4b=_47.replace(/\./g,"/")+".js"; +var _4c=_47.split("."); +var _4d=this.getModuleSymbols(_47); +var _4e=((_4d[0].charAt(0)!="/")&&!_4d[0].match(/^\w+:/)); +var _4f=_4d[_4d.length-1]; +var ok; +if(_4f=="*"){ +_47=_4c.slice(0,-1).join("."); +while(_4d.length){ +_4d.pop(); +_4d.push(this.pkgFileName); +_4b=_4d.join("/")+".js"; +if(_4e&&_4b.charAt(0)=="/"){ +_4b=_4b.slice(1); +} +ok=this.loadPath(_4b,!_49?_47:null); +if(ok){ +break; +} +_4d.pop(); +} +}else{ +_4b=_4d.join("/")+".js"; +_47=_4c.join("."); +var _51=!_49?_47:null; +ok=this.loadPath(_4b,_51); +if(!ok&&!_48){ +_4d.pop(); +while(_4d.length){ +_4b=_4d.join("/")+".js"; +ok=this.loadPath(_4b,_51); +if(ok){ +break; +} +_4d.pop(); +_4b=_4d.join("/")+"/"+this.pkgFileName+".js"; +if(_4e&&_4b.charAt(0)=="/"){ +_4b=_4b.slice(1); +} +ok=this.loadPath(_4b,_51); +if(ok){ +break; +} +} +} +if(!ok&&!_49){ +dojo.raise("Could not load '"+_47+"'; last tried '"+_4b+"'"); +} +} +if(!_49&&!this["isXDomain"]){ +_4a=this.findModule(_47,false); +if(!_4a){ +dojo.raise("symbol '"+_47+"' is not defined after loading '"+_4b+"'"); +} +} +return _4a; +}; +dojo.hostenv.startPackage=function(_52){ +var _53=String(_52); +var _54=_53; +var _55=_52.split(/\./); +if(_55[_55.length-1]=="*"){ +_55.pop(); +_54=_55.join("."); +} +var _56=dojo.evalObjPath(_54,true); +this.loaded_modules_[_53]=_56; +this.loaded_modules_[_54]=_56; +return _56; +}; +dojo.hostenv.findModule=function(_57,_58){ +var lmn=String(_57); +if(this.loaded_modules_[lmn]){ +return this.loaded_modules_[lmn]; +} +if(_58){ +dojo.raise("no loaded module named '"+_57+"'"); +} +return null; +}; +dojo.kwCompoundRequire=function(_5a){ +var _5b=_5a["common"]||[]; +var _5c=_5a[dojo.hostenv.name_]?_5b.concat(_5a[dojo.hostenv.name_]||[]):_5b.concat(_5a["default"]||[]); +for(var x=0;x<_5c.length;x++){ +var _5e=_5c[x]; +if(_5e.constructor==Array){ +dojo.hostenv.loadModule.apply(dojo.hostenv,_5e); +}else{ +dojo.hostenv.loadModule(_5e); +} +} +}; +dojo.require=function(_5f){ +dojo.hostenv.loadModule.apply(dojo.hostenv,arguments); +}; +dojo.requireIf=function(_60,_61){ +var _62=arguments[0]; +if((_62===true)||(_62=="common")||(_62&&dojo.render[_62].capable)){ +var _63=[]; +for(var i=1;i0;i--){ +_74.push(_73.slice(0,i).join("-")); +} +_74.push(false); +if(_71){ +_74.reverse(); +} +for(var j=_74.length-1;j>=0;j--){ +var loc=_74[j]||"ROOT"; +var _78=_72(loc); +if(_78){ +break; +} +} +}; +dojo.hostenv.localesGenerated=["ROOT","es-es","es","it-it","pt-br","de","fr-fr","zh-cn","pt","en-us","zh","fr","zh-tw","it","en-gb","xx","de-de","ko-kr","ja-jp","ko","en","ja"]; +dojo.hostenv.registerNlsPrefix=function(){ +dojo.registerModulePath("nls","nls"); +}; +dojo.hostenv.preloadLocalizations=function(){ +if(dojo.hostenv.localesGenerated){ +dojo.hostenv.registerNlsPrefix(); +function preload(_79){ +_79=dojo.hostenv.normalizeLocale(_79); +dojo.hostenv.searchLocalePath(_79,true,function(loc){ +for(var i=0;i_84.length){ +_84=_85[i]; +} +} +} +if(!_84){ +_84="ROOT"; +} +} +var _87=_81?_84:_82; +var _88=dojo.hostenv.findModule(_83); +var _89=null; +if(_88){ +if(djConfig.localizationComplete&&_88._built){ +return; +} +var _8a=_87.replace("-","_"); +var _8b=_83+"."+_8a; +_89=dojo.hostenv.findModule(_8b); +} +if(!_89){ +_88=dojo.hostenv.startPackage(_83); +var _8c=dojo.hostenv.getModuleSymbols(_7e); +var _8d=_8c.concat("nls").join("/"); +var _8e; +dojo.hostenv.searchLocalePath(_87,_81,function(loc){ +var _90=loc.replace("-","_"); +var _91=_83+"."+_90; +var _92=false; +if(!dojo.hostenv.findModule(_91)){ +dojo.hostenv.startPackage(_91); +var _93=[_8d]; +if(loc!="ROOT"){ +_93.push(loc); +} +_93.push(_7f); +var _94=_93.join("/")+".js"; +_92=dojo.hostenv.loadPath(_94,null,function(_95){ +var _96=function(){ +}; +_96.prototype=_8e; +_88[_90]=new _96(); +for(var j in _95){ +_88[_90][j]=_95[j]; +} +}); +}else{ +_92=true; +} +if(_92&&_88[_90]){ +_8e=_88[_90]; +}else{ +_88[_90]=_8e; +} +if(_81){ +return true; +} +}); +} +if(_81&&_82!=_84){ +_88[_82.replace("-","_")]=_88[_84.replace("-","_")]; +} +}; +(function(){ +var _98=djConfig.extraLocale; +if(_98){ +if(!_98 instanceof Array){ +_98=[_98]; +} +var req=dojo.requireLocalization; +dojo.requireLocalization=function(m,b,_9c,_9d){ +req(m,b,_9c,_9d); +if(_9c){ +return; +} +for(var i=0;i<_98.length;i++){ +req(m,b,_98[i],_9d); +} +}; +} +})(); +} +if(typeof window!="undefined"){ +(function(){ +if(djConfig.allowQueryConfig){ +var _9f=document.location.toString(); +var _a0=_9f.split("?",2); +if(_a0.length>1){ +var _a1=_a0[1]; +var _a2=_a1.split("&"); +for(var x in _a2){ +var sp=_a2[x].split("="); +if((sp[0].length>9)&&(sp[0].substr(0,9)=="djConfig.")){ +var opt=sp[0].substr(9); +try{ +djConfig[opt]=eval(sp[1]); +} +catch(e){ +djConfig[opt]=sp[1]; +} +} +} +} +} +if(((djConfig["baseScriptUri"]=="")||(djConfig["baseRelativePath"]==""))&&(document&&document.getElementsByTagName)){ +var _a6=document.getElementsByTagName("script"); +var _a7=/(__package__|dojo|bootstrap1)\.js([\?\.]|$)/i; +for(var i=0;i<_a6.length;i++){ +var src=_a6[i].getAttribute("src"); +if(!src){ +continue; +} +var m=src.match(_a7); +if(m){ +var _ab=src.substring(0,m.index); +if(src.indexOf("bootstrap1")>-1){ +_ab+="../"; +} +if(!this["djConfig"]){ +djConfig={}; +} +if(djConfig["baseScriptUri"]==""){ +djConfig["baseScriptUri"]=_ab; +} +if(djConfig["baseRelativePath"]==""){ +djConfig["baseRelativePath"]=_ab; +} +break; +} +} +} +var dr=dojo.render; +var drh=dojo.render.html; +var drs=dojo.render.svg; +var dua=(drh.UA=navigator.userAgent); +var dav=(drh.AV=navigator.appVersion); +var t=true; +var f=false; +drh.capable=t; +drh.support.builtin=t; +dr.ver=parseFloat(drh.AV); +dr.os.mac=dav.indexOf("Macintosh")>=0; +dr.os.win=dav.indexOf("Windows")>=0; +dr.os.linux=dav.indexOf("X11")>=0; +drh.opera=dua.indexOf("Opera")>=0; +drh.khtml=(dav.indexOf("Konqueror")>=0)||(dav.indexOf("Safari")>=0); +drh.safari=dav.indexOf("Safari")>=0; +var _b3=dua.indexOf("Gecko"); +drh.mozilla=drh.moz=(_b3>=0)&&(!drh.khtml); +if(drh.mozilla){ +drh.geckoVersion=dua.substring(_b3+6,_b3+14); +} +drh.ie=(document.all)&&(!drh.opera); +drh.ie50=drh.ie&&dav.indexOf("MSIE 5.0")>=0; +drh.ie55=drh.ie&&dav.indexOf("MSIE 5.5")>=0; +drh.ie60=drh.ie&&dav.indexOf("MSIE 6.0")>=0; +drh.ie70=drh.ie&&dav.indexOf("MSIE 7.0")>=0; +var cm=document["compatMode"]; +drh.quirks=(cm=="BackCompat")||(cm=="QuirksMode")||drh.ie55||drh.ie50; +dojo.locale=dojo.locale||(drh.ie?navigator.userLanguage:navigator.language).toLowerCase(); +dr.vml.capable=drh.ie; +drs.capable=f; +drs.support.plugin=f; +drs.support.builtin=f; +var _b5=window["document"]; +var tdi=_b5["implementation"]; +if((tdi)&&(tdi["hasFeature"])&&(tdi.hasFeature("org.w3c.dom.svg","1.0"))){ +drs.capable=t; +drs.support.builtin=t; +drs.support.plugin=f; +} +if(drh.safari){ +var tmp=dua.split("AppleWebKit/")[1]; +var ver=parseFloat(tmp.split(" ")[0]); +if(ver>=420){ +drs.capable=t; +drs.support.builtin=t; +drs.support.plugin=f; +} +}else{ +} +})(); +dojo.hostenv.startPackage("dojo.hostenv"); +dojo.render.name=dojo.hostenv.name_="browser"; +dojo.hostenv.searchIds=[]; +dojo.hostenv._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"]; +dojo.hostenv.getXmlhttpObject=function(){ +var _b9=null; +var _ba=null; +try{ +_b9=new XMLHttpRequest(); +} +catch(e){ +} +if(!_b9){ +for(var i=0;i<3;++i){ +var _bc=dojo.hostenv._XMLHTTP_PROGIDS[i]; +try{ +_b9=new ActiveXObject(_bc); +} +catch(e){ +_ba=e; +} +if(_b9){ +dojo.hostenv._XMLHTTP_PROGIDS=[_bc]; +break; +} +} +} +if(!_b9){ +return dojo.raise("XMLHTTP not available",_ba); +} +return _b9; +}; +dojo.hostenv._blockAsync=false; +dojo.hostenv.getText=function(uri,_be,_bf){ +if(!_be){ +this._blockAsync=true; +} +var _c0=this.getXmlhttpObject(); +function isDocumentOk(_c1){ +var _c2=_c1["status"]; +return Boolean((!_c2)||((200<=_c2)&&(300>_c2))||(_c2==304)); +} +if(_be){ +var _c3=this,_c4=null,gbl=dojo.global(); +var xhr=dojo.evalObjPath("dojo.io.XMLHTTPTransport"); +_c0.onreadystatechange=function(){ +if(_c4){ +gbl.clearTimeout(_c4); +_c4=null; +} +if(_c3._blockAsync||(xhr&&xhr._blockAsync)){ +_c4=gbl.setTimeout(function(){ +_c0.onreadystatechange.apply(this); +},10); +}else{ +if(4==_c0.readyState){ +if(isDocumentOk(_c0)){ +_be(_c0.responseText); +} +} +} +}; +} +_c0.open("GET",uri,_be?true:false); +try{ +_c0.send(null); +if(_be){ +return null; +} +if(!isDocumentOk(_c0)){ +var err=Error("Unable to load "+uri+" status:"+_c0.status); +err.status=_c0.status; +err.responseText=_c0.responseText; +throw err; +} +} +catch(e){ +this._blockAsync=false; +if((_bf)&&(!_be)){ +return null; +}else{ +throw e; +} +} +this._blockAsync=false; +return _c0.responseText; +}; +dojo.hostenv.defaultDebugContainerId="dojoDebug"; +dojo.hostenv._println_buffer=[]; +dojo.hostenv._println_safe=false; +dojo.hostenv.println=function(_c8){ +if(!dojo.hostenv._println_safe){ +dojo.hostenv._println_buffer.push(_c8); +}else{ +try{ +var _c9=document.getElementById(djConfig.debugContainerId?djConfig.debugContainerId:dojo.hostenv.defaultDebugContainerId); +if(!_c9){ +_c9=dojo.body(); +} +var div=document.createElement("div"); +div.appendChild(document.createTextNode(_c8)); +_c9.appendChild(div); +} +catch(e){ +try{ +document.write("
    "+_c8+"
    "); +} +catch(e2){ +window.status=_c8; +} +} +} +}; +dojo.addOnLoad(function(){ +dojo.hostenv._println_safe=true; +while(dojo.hostenv._println_buffer.length>0){ +dojo.hostenv.println(dojo.hostenv._println_buffer.shift()); +} +}); +function dj_addNodeEvtHdlr(_cb,_cc,fp){ +var _ce=_cb["on"+_cc]||function(){ +}; +_cb["on"+_cc]=function(){ +fp.apply(_cb,arguments); +_ce.apply(_cb,arguments); +}; +return true; +} +dojo.hostenv._djInitFired=false; +function dj_load_init(e){ +dojo.hostenv._djInitFired=true; +var _d0=(e&&e.type)?e.type.toLowerCase():"load"; +if(arguments.callee.initialized||(_d0!="domcontentloaded"&&_d0!="load")){ +return; +} +arguments.callee.initialized=true; +if(typeof (_timer)!="undefined"){ +clearInterval(_timer); +delete _timer; +} +var _d1=function(){ +if(dojo.render.html.ie){ +dojo.hostenv.makeWidgets(); +} +}; +if(dojo.hostenv.inFlightCount==0){ +_d1(); +dojo.hostenv.modulesLoaded(); +}else{ +dojo.hostenv.modulesLoadedListeners.unshift(_d1); +} +} +if(document.addEventListener){ +if(dojo.render.html.opera||(dojo.render.html.moz&&(djConfig["enableMozDomContentLoaded"]===true))){ +document.addEventListener("DOMContentLoaded",dj_load_init,null); +} +window.addEventListener("load",dj_load_init,null); +} +if(dojo.render.html.ie&&dojo.render.os.win){ +document.attachEvent("onreadystatechange",function(e){ +if(document.readyState=="complete"){ +dj_load_init(); +} +}); +} +if(/(WebKit|khtml)/i.test(navigator.userAgent)){ +var _timer=setInterval(function(){ +if(/loaded|complete/.test(document.readyState)){ +dj_load_init(); +} +},10); +} +if(dojo.render.html.ie){ +dj_addNodeEvtHdlr(window,"beforeunload",function(){ +dojo.hostenv._unloading=true; +window.setTimeout(function(){ +dojo.hostenv._unloading=false; +},0); +}); +} +dj_addNodeEvtHdlr(window,"unload",function(){ +dojo.hostenv.unloaded(); +if((!dojo.render.html.ie)||(dojo.render.html.ie&&dojo.hostenv._unloading)){ +dojo.hostenv.unloaded(); +} +}); +dojo.hostenv.makeWidgets=function(){ +var _d3=[]; +if(djConfig.searchIds&&djConfig.searchIds.length>0){ +_d3=_d3.concat(djConfig.searchIds); +} +if(dojo.hostenv.searchIds&&dojo.hostenv.searchIds.length>0){ +_d3=_d3.concat(dojo.hostenv.searchIds); +} +if((djConfig.parseWidgets)||(_d3.length>0)){ +if(dojo.evalObjPath("dojo.widget.Parse")){ +var _d4=new dojo.xml.Parse(); +if(_d3.length>0){ +for(var x=0;x<_d3.length;x++){ +var _d6=document.getElementById(_d3[x]); +if(!_d6){ +continue; +} +var _d7=_d4.parseElement(_d6,null,true); +dojo.widget.getParser().createComponents(_d7); +} +}else{ +if(djConfig.parseWidgets){ +var _d7=_d4.parseElement(dojo.body(),null,true); +dojo.widget.getParser().createComponents(_d7); +} +} +} +} +}; +dojo.addOnLoad(function(){ +if(!dojo.render.html.ie){ +dojo.hostenv.makeWidgets(); +} +}); +try{ +if(dojo.render.html.ie){ +document.namespaces.add("v","urn:schemas-microsoft-com:vml"); +document.createStyleSheet().addRule("v\\:*","behavior:url(#default#VML)"); +} +} +catch(e){ +} +dojo.hostenv.writeIncludes=function(){ +}; +if(!dj_undef("document",this)){ +dj_currentDocument=this.document; +} +dojo.doc=function(){ +return dj_currentDocument; +}; +dojo.body=function(){ +return dojo.doc().body||dojo.doc().getElementsByTagName("body")[0]; +}; +dojo.byId=function(id,doc){ +if((id)&&((typeof id=="string")||(id instanceof String))){ +if(!doc){ +doc=dj_currentDocument; +} +var ele=doc.getElementById(id); +if(ele&&(ele.id!=id)&&doc.all){ +ele=null; +eles=doc.all[id]; +if(eles){ +if(eles.length){ +for(var i=0;i0)?(/^\s+/):(wh<0)?(/\s+$/):(/^\s+|\s+$/g); +return str.replace(re,""); +}; +dojo.string.trimStart=function(str){ +return dojo.string.trim(str,1); +}; +dojo.string.trimEnd=function(str){ +return dojo.string.trim(str,-1); +}; +dojo.string.repeat=function(str,_f4,_f5){ +var out=""; +for(var i=0;i<_f4;i++){ +out+=str; +if(_f5&&i<_f4-1){ +out+=_f5; +} +} +return out; +}; +dojo.string.pad=function(str,len,c,dir){ +var out=String(str); +if(!c){ +c="0"; +} +if(!dir){ +dir=1; +} +while(out.length0){ +out=c+out; +}else{ +out+=c; +} +} +return out; +}; +dojo.string.padLeft=function(str,len,c){ +return dojo.string.pad(str,len,c,1); +}; +dojo.string.padRight=function(str,len,c){ +return dojo.string.pad(str,len,c,-1); +}; +dojo.provide("dojo.string"); +dojo.provide("dojo.lang.common"); +dojo.lang.inherits=function(_103,_104){ +if(!dojo.lang.isFunction(_104)){ +dojo.raise("dojo.inherits: superclass argument ["+_104+"] must be a function (subclass: ["+_103+"']"); +} +_103.prototype=new _104(); +_103.prototype.constructor=_103; +_103.superclass=_104.prototype; +_103["super"]=_104.prototype; +}; +dojo.lang._mixin=function(obj,_106){ +var tobj={}; +for(var x in _106){ +if((typeof tobj[x]=="undefined")||(tobj[x]!=_106[x])){ +obj[x]=_106[x]; +} +} +if(dojo.render.html.ie&&(typeof (_106["toString"])=="function")&&(_106["toString"]!=obj["toString"])&&(_106["toString"]!=tobj["toString"])){ +obj.toString=_106.toString; +} +return obj; +}; +dojo.lang.mixin=function(obj,_10a){ +for(var i=1,l=arguments.length;i-1; +}; +dojo.lang.isObject=function(it){ +if(typeof it=="undefined"){ +return false; +} +return (typeof it=="object"||it===null||dojo.lang.isArray(it)||dojo.lang.isFunction(it)); +}; +dojo.lang.isArray=function(it){ +return (it&&it instanceof Array||typeof it=="array"); +}; +dojo.lang.isArrayLike=function(it){ +if((!it)||(dojo.lang.isUndefined(it))){ +return false; +} +if(dojo.lang.isString(it)){ +return false; +} +if(dojo.lang.isFunction(it)){ +return false; +} +if(dojo.lang.isArray(it)){ +return true; +} +if((it.tagName)&&(it.tagName.toLowerCase()=="form")){ +return false; +} +if(dojo.lang.isNumber(it.length)&&isFinite(it.length)){ +return true; +} +return false; +}; +dojo.lang.isFunction=function(it){ +return (it instanceof Function||typeof it=="function"); +}; +(function(){ +if((dojo.render.html.capable)&&(dojo.render.html["safari"])){ +dojo.lang.isFunction=function(it){ +if((typeof (it)=="function")&&(it=="[object NodeList]")){ +return false; +} +return (it instanceof Function||typeof it=="function"); +}; +} +})(); +dojo.lang.isString=function(it){ +return (typeof it=="string"||it instanceof String); +}; +dojo.lang.isAlien=function(it){ +if(!it){ +return false; +} +return !dojo.lang.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it)); +}; +dojo.lang.isBoolean=function(it){ +return (it instanceof Boolean||typeof it=="boolean"); +}; +dojo.lang.isNumber=function(it){ +return (it instanceof Number||typeof it=="number"); +}; +dojo.lang.isUndefined=function(it){ +return ((typeof (it)=="undefined")&&(it==undefined)); +}; +dojo.provide("dojo.lang.extras"); +dojo.lang.setTimeout=function(func,_12a){ +var _12b=window,_12c=2; +if(!dojo.lang.isFunction(func)){ +_12b=func; +func=_12a; +_12a=arguments[2]; +_12c++; +} +if(dojo.lang.isString(func)){ +func=_12b[func]; +} +var args=[]; +for(var i=_12c;i0){ +dojo.io.bind(dojo.io._bindQueue.shift()); +}else{ +dojo.io._queueBindInFlight=false; +} +} +}; +dojo.io._bindQueue=[]; +dojo.io._queueBindInFlight=false; +dojo.io.argsFromMap=function(map,_16b,last){ +var enc=/utf/i.test(_16b||"")?encodeURIComponent:dojo.string.encodeAscii; +var _16e=[]; +var _16f=new Object(); +for(var name in map){ +var _171=function(elt){ +var val=enc(name)+"="+enc(elt); +_16e[(last==name)?"push":"unshift"](val); +}; +if(!_16f[name]){ +var _174=map[name]; +if(dojo.lang.isArray(_174)){ +dojo.lang.forEach(_174,_171); +}else{ +_171(_174); +} +} +} +return _16e.join("&"); +}; +dojo.io.setIFrameSrc=function(_175,src,_177){ +try{ +var r=dojo.render.html; +if(!_177){ +if(r.safari){ +_175.location=src; +}else{ +frames[_175.name].location=src; +} +}else{ +var idoc; +if(r.ie){ +idoc=_175.contentWindow.document; +}else{ +if(r.safari){ +idoc=_175.document; +}else{ +idoc=_175.contentWindow; +} +} +if(!idoc){ +_175.location=src; +return; +}else{ +idoc.location.replace(src); +} +} +} +catch(e){ +dojo.debug(e); +dojo.debug("setIFrameSrc: "+e); +} +}; +dojo.provide("dojo.lang.array"); +dojo.lang.mixin(dojo.lang,{has:function(obj,name){ +try{ +return typeof obj[name]!="undefined"; +} +catch(e){ +return false; +} +},isEmpty:function(obj){ +if(dojo.lang.isObject(obj)){ +var tmp={}; +var _17e=0; +for(var x in obj){ +if(obj[x]&&(!tmp[x])){ +_17e++; +break; +} +} +return _17e==0; +}else{ +if(dojo.lang.isArrayLike(obj)||dojo.lang.isString(obj)){ +return obj.length==0; +} +} +},map:function(arr,obj,_182){ +var _183=dojo.lang.isString(arr); +if(_183){ +arr=arr.split(""); +} +if(dojo.lang.isFunction(obj)&&(!_182)){ +_182=obj; +obj=dj_global; +}else{ +if(dojo.lang.isFunction(obj)&&_182){ +var _184=obj; +obj=_182; +_182=_184; +} +} +if(Array.map){ +var _185=Array.map(arr,_182,obj); +}else{ +var _185=[]; +for(var i=0;i=3){ +dojo.raise("thisObject doesn't exist!"); +} +_1a3=dj_global; +} +_1a5=[]; +for(var i=0;i/gm,">").replace(/"/gm,"""); +if(!_1e8){ +str=str.replace(/'/gm,"'"); +} +return str; +}; +dojo.string.escapeSql=function(str){ +return str.replace(/'/gm,"''"); +}; +dojo.string.escapeRegExp=function(str){ +return str.replace(/\\/gm,"\\\\").replace(/([\f\b\n\t\r[\^$|?*+(){}])/gm,"\\$1"); +}; +dojo.string.escapeJavaScript=function(str){ +return str.replace(/(["'\f\b\n\t\r])/gm,"\\$1"); +}; +dojo.string.escapeString=function(str){ +return ("\""+str.replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r"); +}; +dojo.string.summary=function(str,len){ +if(!len||str.length<=len){ +return str; +} +return str.substring(0,len).replace(/\.+$/,"")+"..."; +}; +dojo.string.endsWith=function(str,end,_1f1){ +if(_1f1){ +str=str.toLowerCase(); +end=end.toLowerCase(); +} +if((str.length-end.length)<0){ +return false; +} +return str.lastIndexOf(end)==str.length-end.length; +}; +dojo.string.endsWithAny=function(str){ +for(var i=1;i-1){ +return true; +} +} +return false; +}; +dojo.string.normalizeNewlines=function(text,_1fc){ +if(_1fc=="\n"){ +text=text.replace(/\r\n/g,"\n"); +text=text.replace(/\r/g,"\n"); +}else{ +if(_1fc=="\r"){ +text=text.replace(/\r\n/g,"\r"); +text=text.replace(/\n/g,"\r"); +}else{ +text=text.replace(/([^\r])\n/g,"$1\r\n").replace(/\r([^\n])/g,"\r\n$1"); +} +} +return text; +}; +dojo.string.splitEscaped=function(str,_1fe){ +var _1ff=[]; +for(var i=0,_201=0;i0){ +return _224[0]; +} +node=node.parentNode; +} +if(_223){ +return null; +} +return _224; +}; +dojo.dom.getAncestorsByTag=function(node,tag,_228){ +tag=tag.toLowerCase(); +return dojo.dom.getAncestors(node,function(el){ +return ((el.tagName)&&(el.tagName.toLowerCase()==tag)); +},_228); +}; +dojo.dom.getFirstAncestorByTag=function(node,tag){ +return dojo.dom.getAncestorsByTag(node,tag,true); +}; +dojo.dom.isDescendantOf=function(node,_22d,_22e){ +if(_22e&&node){ +node=node.parentNode; +} +while(node){ +if(node==_22d){ +return true; +} +node=node.parentNode; +} +return false; +}; +dojo.dom.innerXML=function(node){ +if(node.innerXML){ +return node.innerXML; +}else{ +if(node.xml){ +return node.xml; +}else{ +if(typeof XMLSerializer!="undefined"){ +return (new XMLSerializer()).serializeToString(node); +} +} +} +}; +dojo.dom.createDocument=function(){ +var doc=null; +var _231=dojo.doc(); +if(!dj_undef("ActiveXObject")){ +var _232=["MSXML2","Microsoft","MSXML","MSXML3"]; +for(var i=0;i<_232.length;i++){ +try{ +doc=new ActiveXObject(_232[i]+".XMLDOM"); +} +catch(e){ +} +if(doc){ +break; +} +} +}else{ +if((_231.implementation)&&(_231.implementation.createDocument)){ +doc=_231.implementation.createDocument("","",null); +} +} +return doc; +}; +dojo.dom.createDocumentFromText=function(str,_235){ +if(!_235){ +_235="text/xml"; +} +if(!dj_undef("DOMParser")){ +var _236=new DOMParser(); +return _236.parseFromString(str,_235); +}else{ +if(!dj_undef("ActiveXObject")){ +var _237=dojo.dom.createDocument(); +if(_237){ +_237.async=false; +_237.loadXML(str); +return _237; +}else{ +dojo.debug("toXml didn't work?"); +} +}else{ +var _238=dojo.doc(); +if(_238.createElement){ +var tmp=_238.createElement("xml"); +tmp.innerHTML=str; +if(_238.implementation&&_238.implementation.createDocument){ +var _23a=_238.implementation.createDocument("foo","",null); +for(var i=0;i1){ +var _24f=dojo.doc(); +dojo.dom.replaceChildren(node,_24f.createTextNode(text)); +return text; +}else{ +if(node.textContent!=undefined){ +return node.textContent; +} +var _250=""; +if(node==null){ +return _250; +} +for(var i=0;i"); +} +} +catch(e){ +} +if(dojo.render.html.opera){ +dojo.debug("Opera is not supported with dojo.undo.browser, so back/forward detection will not work."); +} +dojo.undo.browser={initialHref:(!dj_undef("window"))?window.location.href:"",initialHash:(!dj_undef("window"))?window.location.hash:"",moveForward:false,historyStack:[],forwardStack:[],historyIframe:null,bookmarkAnchor:null,locationTimer:null,setInitialState:function(args){ +this.initialState=this._createState(this.initialHref,args,this.initialHash); +},addToHistory:function(args){ +this.forwardStack=[]; +var hash=null; +var url=null; +if(!this.historyIframe){ +if(djConfig["useXDomain"]&&!djConfig["dojoIframeHistoryUrl"]){ +dojo.debug("dojo.undo.browser: When using cross-domain Dojo builds,"+" please save iframe_history.html to your domain and set djConfig.dojoIframeHistoryUrl"+" to the path on your domain to iframe_history.html"); +} +this.historyIframe=window.frames["djhistory"]; +} +if(!this.bookmarkAnchor){ +this.bookmarkAnchor=document.createElement("a"); +dojo.body().appendChild(this.bookmarkAnchor); +this.bookmarkAnchor.style.display="none"; +} +if(args["changeUrl"]){ +hash="#"+((args["changeUrl"]!==true)?args["changeUrl"]:(new Date()).getTime()); +if(this.historyStack.length==0&&this.initialState.urlHash==hash){ +this.initialState=this._createState(url,args,hash); +return; +}else{ +if(this.historyStack.length>0&&this.historyStack[this.historyStack.length-1].urlHash==hash){ +this.historyStack[this.historyStack.length-1]=this._createState(url,args,hash); +return; +} +} +this.changingUrl=true; +setTimeout("window.location.href = '"+hash+"'; dojo.undo.browser.changingUrl = false;",1); +this.bookmarkAnchor.href=hash; +if(dojo.render.html.ie){ +url=this._loadIframeHistory(); +var _25f=args["back"]||args["backButton"]||args["handle"]; +var tcb=function(_261){ +if(window.location.hash!=""){ +setTimeout("window.location.href = '"+hash+"';",1); +} +_25f.apply(this,[_261]); +}; +if(args["back"]){ +args.back=tcb; +}else{ +if(args["backButton"]){ +args.backButton=tcb; +}else{ +if(args["handle"]){ +args.handle=tcb; +} +} +} +var _262=args["forward"]||args["forwardButton"]||args["handle"]; +var tfw=function(_264){ +if(window.location.hash!=""){ +window.location.href=hash; +} +if(_262){ +_262.apply(this,[_264]); +} +}; +if(args["forward"]){ +args.forward=tfw; +}else{ +if(args["forwardButton"]){ +args.forwardButton=tfw; +}else{ +if(args["handle"]){ +args.handle=tfw; +} +} +} +}else{ +if(dojo.render.html.moz){ +if(!this.locationTimer){ +this.locationTimer=setInterval("dojo.undo.browser.checkLocation();",200); +} +} +} +}else{ +url=this._loadIframeHistory(); +} +this.historyStack.push(this._createState(url,args,hash)); +},checkLocation:function(){ +if(!this.changingUrl){ +var hsl=this.historyStack.length; +if((window.location.hash==this.initialHash||window.location.href==this.initialHref)&&(hsl==1)){ +this.handleBackButton(); +return; +} +if(this.forwardStack.length>0){ +if(this.forwardStack[this.forwardStack.length-1].urlHash==window.location.hash){ +this.handleForwardButton(); +return; +} +} +if((hsl>=2)&&(this.historyStack[hsl-2])){ +if(this.historyStack[hsl-2].urlHash==window.location.hash){ +this.handleBackButton(); +return; +} +} +} +},iframeLoaded:function(evt,_267){ +if(!dojo.render.html.opera){ +var _268=this._getUrlQuery(_267.href); +if(_268==null){ +if(this.historyStack.length==1){ +this.handleBackButton(); +} +return; +} +if(this.moveForward){ +this.moveForward=false; +return; +} +if(this.historyStack.length>=2&&_268==this._getUrlQuery(this.historyStack[this.historyStack.length-2].url)){ +this.handleBackButton(); +}else{ +if(this.forwardStack.length>0&&_268==this._getUrlQuery(this.forwardStack[this.forwardStack.length-1].url)){ +this.handleForwardButton(); +} +} +} +},handleBackButton:function(){ +var _269=this.historyStack.pop(); +if(!_269){ +return; +} +var last=this.historyStack[this.historyStack.length-1]; +if(!last&&this.historyStack.length==0){ +last=this.initialState; +} +if(last){ +if(last.kwArgs["back"]){ +last.kwArgs["back"](); +}else{ +if(last.kwArgs["backButton"]){ +last.kwArgs["backButton"](); +}else{ +if(last.kwArgs["handle"]){ +last.kwArgs.handle("back"); +} +} +} +} +this.forwardStack.push(_269); +},handleForwardButton:function(){ +var last=this.forwardStack.pop(); +if(!last){ +return; +} +if(last.kwArgs["forward"]){ +last.kwArgs.forward(); +}else{ +if(last.kwArgs["forwardButton"]){ +last.kwArgs.forwardButton(); +}else{ +if(last.kwArgs["handle"]){ +last.kwArgs.handle("forward"); +} +} +} +this.historyStack.push(last); +},_createState:function(url,args,hash){ +return {"url":url,"kwArgs":args,"urlHash":hash}; +},_getUrlQuery:function(url){ +var _270=url.split("?"); +if(_270.length<2){ +return null; +}else{ +return _270[1]; +} +},_loadIframeHistory:function(){ +var url=(djConfig["dojoIframeHistoryUrl"]||dojo.hostenv.getBaseScriptUri()+"iframe_history.html")+"?"+(new Date()).getTime(); +this.moveForward=true; +dojo.io.setIFrameSrc(this.historyIframe,url,false); +return url; +}}; +dojo.provide("dojo.io.BrowserIO"); +if(!dj_undef("window")){ +dojo.io.checkChildrenForFile=function(node){ +var _273=false; +var _274=node.getElementsByTagName("input"); +dojo.lang.forEach(_274,function(_275){ +if(_273){ +return; +} +if(_275.getAttribute("type")=="file"){ +_273=true; +} +}); +return _273; +}; +dojo.io.formHasFile=function(_276){ +return dojo.io.checkChildrenForFile(_276); +}; +dojo.io.updateNode=function(node,_278){ +node=dojo.byId(node); +var args=_278; +if(dojo.lang.isString(_278)){ +args={url:_278}; +} +args.mimetype="text/html"; +args.load=function(t,d,e){ +while(node.firstChild){ +dojo.dom.destroyNode(node.firstChild); +} +node.innerHTML=d; +}; +dojo.io.bind(args); +}; +dojo.io.formFilter=function(node){ +var type=(node.type||"").toLowerCase(); +return !node.disabled&&node.name&&!dojo.lang.inArray(["file","submit","image","reset","button"],type); +}; +dojo.io.encodeForm=function(_27f,_280,_281){ +if((!_27f)||(!_27f.tagName)||(!_27f.tagName.toLowerCase()=="form")){ +dojo.raise("Attempted to encode a non-form element."); +} +if(!_281){ +_281=dojo.io.formFilter; +} +var enc=/utf/i.test(_280||"")?encodeURIComponent:dojo.string.encodeAscii; +var _283=[]; +for(var i=0;i<_27f.elements.length;i++){ +var elm=_27f.elements[i]; +if(!elm||elm.tagName.toLowerCase()=="fieldset"||!_281(elm)){ +continue; +} +var name=enc(elm.name); +var type=elm.type.toLowerCase(); +if(type=="select-multiple"){ +for(var j=0;j=200)&&(http.status<300))||(http.status==304)||(http.status==1223)||(location.protocol=="file:"&&(http.status==0||http.status==undefined))||(location.protocol=="chrome:"&&(http.status==0||http.status==undefined))){ +var ret; +if(_2aa.method.toLowerCase()=="head"){ +var _2b0=http.getAllResponseHeaders(); +ret={}; +ret.toString=function(){ +return _2b0; +}; +var _2b1=_2b0.split(/[\r\n]+/g); +for(var i=0;i<_2b1.length;i++){ +var pair=_2b1[i].match(/^([^:]+)\s*:\s*(.+)$/i); +if(pair){ +ret[pair[1]]=pair[2]; +} +} +}else{ +if(_2aa.mimetype=="text/javascript"){ +try{ +ret=dj_eval(http.responseText); +} +catch(e){ +dojo.debug(e); +dojo.debug(http.responseText); +ret=null; +} +}else{ +if(_2aa.mimetype.substr(0,9)=="text/json"||_2aa.mimetype.substr(0,16)=="application/json"){ +try{ +ret=dj_eval("("+_2aa.jsonFilter(http.responseText)+")"); +} +catch(e){ +dojo.debug(e); +dojo.debug(http.responseText); +ret=false; +} +}else{ +if((_2aa.mimetype=="application/xml")||(_2aa.mimetype=="text/xml")){ +ret=http.responseXML; +if(!ret||typeof ret=="string"||!http.getResponseHeader("Content-Type")){ +ret=dojo.dom.createDocumentFromText(http.responseText); +} +}else{ +ret=http.responseText; +} +} +} +} +if(_2ae){ +addToCache(url,_2ad,_2aa.method,http); +} +_2aa[(typeof _2aa.load=="function")?"load":"handle"]("load",ret,http,_2aa); +}else{ +var _2b4=new dojo.io.Error("XMLHttpTransport Error: "+http.status+" "+http.statusText); +_2aa[(typeof _2aa.error=="function")?"error":"handle"]("error",_2b4,http,_2aa); +} +} +function setHeaders(http,_2b6){ +if(_2b6["headers"]){ +for(var _2b7 in _2b6["headers"]){ +if(_2b7.toLowerCase()=="content-type"&&!_2b6["contentType"]){ +_2b6["contentType"]=_2b6["headers"][_2b7]; +}else{ +http.setRequestHeader(_2b7,_2b6["headers"][_2b7]); +} +} +} +} +this.inFlight=[]; +this.inFlightTimer=null; +this.startWatchingInFlight=function(){ +if(!this.inFlightTimer){ +this.inFlightTimer=setTimeout("dojo.io.XMLHTTPTransport.watchInFlight();",10); +} +}; +this.watchInFlight=function(){ +var now=null; +if(!dojo.hostenv._blockAsync&&!_29e._blockAsync){ +for(var x=this.inFlight.length-1;x>=0;x--){ +try{ +var tif=this.inFlight[x]; +if(!tif||tif.http._aborted||!tif.http.readyState){ +this.inFlight.splice(x,1); +continue; +} +if(4==tif.http.readyState){ +this.inFlight.splice(x,1); +doLoad(tif.req,tif.http,tif.url,tif.query,tif.useCache); +}else{ +if(tif.startTime){ +if(!now){ +now=(new Date()).getTime(); +} +if(tif.startTime+(tif.req.timeoutSeconds*1000)-1){ +dojo.debug("Warning: dojo.io.bind: stripping hash values from url:",url); +url=url.split("#")[0]; +} +if(_2bf["file"]){ +_2bf.method="post"; +} +if(!_2bf["method"]){ +_2bf.method="get"; +} +if(_2bf.method.toLowerCase()=="get"){ +_2bf.multipart=false; +}else{ +if(_2bf["file"]){ +_2bf.multipart=true; +}else{ +if(!_2bf["multipart"]){ +_2bf.multipart=false; +} +} +} +if(_2bf["backButton"]||_2bf["back"]||_2bf["changeUrl"]){ +dojo.undo.browser.addToHistory(_2bf); +} +var _2c4=_2bf["content"]||{}; +if(_2bf.sendTransport){ +_2c4["dojo.transport"]="xmlhttp"; +} +do{ +if(_2bf.postContent){ +_2c1=_2bf.postContent; +break; +} +if(_2c4){ +_2c1+=dojo.io.argsFromMap(_2c4,_2bf.encoding); +} +if(_2bf.method.toLowerCase()=="get"||!_2bf.multipart){ +break; +} +var t=[]; +if(_2c1.length){ +var q=_2c1.split("&"); +for(var i=0;i-1?"&":"?")+_2c1; +} +if(_2cb){ +_2d1+=(dojo.string.endsWithAny(_2d1,"?","&")?"":(_2d1.indexOf("?")>-1?"&":"?"))+"dojo.preventCache="+new Date().valueOf(); +} +if(!_2bf.user){ +http.open(_2bf.method.toUpperCase(),_2d1,_2ca); +}else{ +http.open(_2bf.method.toUpperCase(),_2d1,_2ca,_2bf.user,_2bf.password); +} +setHeaders(http,_2bf); +try{ +http.send(null); +} +catch(e){ +if(typeof http.abort=="function"){ +http.abort(); +} +doLoad(_2bf,{status:404},url,_2c1,_2cc); +} +} +if(!_2ca){ +doLoad(_2bf,http,url,_2c1,_2cc); +_29e._blockAsync=false; +} +_2bf.abort=function(){ +try{ +http._aborted=true; +} +catch(e){ +} +return http.abort(); +}; +return; +}; +dojo.io.transports.addTransport("XMLHTTPTransport"); +}; +} +dojo.provide("dojo.io.cookie"); +dojo.io.cookie.setCookie=function(name,_2d3,days,path,_2d6,_2d7){ +var _2d8=-1; +if((typeof days=="number")&&(days>=0)){ +var d=new Date(); +d.setTime(d.getTime()+(days*24*60*60*1000)); +_2d8=d.toGMTString(); +} +_2d3=escape(_2d3); +document.cookie=name+"="+_2d3+";"+(_2d8!=-1?" expires="+_2d8+";":"")+(path?"path="+path:"")+(_2d6?"; domain="+_2d6:"")+(_2d7?"; secure":""); +}; +dojo.io.cookie.set=dojo.io.cookie.setCookie; +dojo.io.cookie.getCookie=function(name){ +var idx=document.cookie.lastIndexOf(name+"="); +if(idx==-1){ +return null; +} +var _2dc=document.cookie.substring(idx+name.length+1); +var end=_2dc.indexOf(";"); +if(end==-1){ +end=_2dc.length; +} +_2dc=_2dc.substring(0,end); +_2dc=unescape(_2dc); +return _2dc; +}; +dojo.io.cookie.get=dojo.io.cookie.getCookie; +dojo.io.cookie.deleteCookie=function(name){ +dojo.io.cookie.setCookie(name,"-",0); +}; +dojo.io.cookie.setObjectCookie=function(name,obj,days,path,_2e3,_2e4,_2e5){ +if(arguments.length==5){ +_2e5=_2e3; +_2e3=null; +_2e4=null; +} +var _2e6=[],_2e7,_2e8=""; +if(!_2e5){ +_2e7=dojo.io.cookie.getObjectCookie(name); +} +if(days>=0){ +if(!_2e7){ +_2e7={}; +} +for(var prop in obj){ +if(obj[prop]==null){ +delete _2e7[prop]; +}else{ +if((typeof obj[prop]=="string")||(typeof obj[prop]=="number")){ +_2e7[prop]=obj[prop]; +} +} +} +prop=null; +for(var prop in _2e7){ +_2e6.push(escape(prop)+"="+escape(_2e7[prop])); +} +_2e8=_2e6.join("&"); +} +dojo.io.cookie.setCookie(name,_2e8,days,path,_2e3,_2e4); +}; +dojo.io.cookie.getObjectCookie=function(name){ +var _2eb=null,_2ec=dojo.io.cookie.getCookie(name); +if(_2ec){ +_2eb={}; +var _2ed=_2ec.split("&"); +for(var i=0;i<_2ed.length;i++){ +var pair=_2ed[i].split("="); +var _2f0=pair[1]; +if(isNaN(_2f0)){ +_2f0=unescape(pair[1]); +} +_2eb[unescape(pair[0])]=_2f0; +} +} +return _2eb; +}; +dojo.io.cookie.isSupported=function(){ +if(typeof navigator.cookieEnabled!="boolean"){ +dojo.io.cookie.setCookie("__TestingYourBrowserForCookieSupport__","CookiesAllowed",90,null); +var _2f1=dojo.io.cookie.getCookie("__TestingYourBrowserForCookieSupport__"); +navigator.cookieEnabled=(_2f1=="CookiesAllowed"); +if(navigator.cookieEnabled){ +this.deleteCookie("__TestingYourBrowserForCookieSupport__"); +} +} +return navigator.cookieEnabled; +}; +if(!dojo.io.cookies){ +dojo.io.cookies=dojo.io.cookie; +} +dojo.kwCompoundRequire({common:["dojo.io.common"],rhino:["dojo.io.RhinoIO"],browser:["dojo.io.BrowserIO","dojo.io.cookie"],dashboard:["dojo.io.BrowserIO","dojo.io.cookie"]}); +dojo.provide("dojo.io.*"); +dojo.provide("dojo.event.common"); +dojo.event=new function(){ +this._canTimeout=dojo.lang.isFunction(dj_global["setTimeout"])||dojo.lang.isAlien(dj_global["setTimeout"]); +function interpolateArgs(args,_2f3){ +var dl=dojo.lang; +var ao={srcObj:dj_global,srcFunc:null,adviceObj:dj_global,adviceFunc:null,aroundObj:null,aroundFunc:null,adviceType:(args.length>2)?args[0]:"after",precedence:"last",once:false,delay:null,rate:0,adviceMsg:false,maxCalls:-1}; +switch(args.length){ +case 0: +return; +case 1: +return; +case 2: +ao.srcFunc=args[0]; +ao.adviceFunc=args[1]; +break; +case 3: +if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isString(args[2]))){ +ao.adviceType="after"; +ao.srcObj=args[0]; +ao.srcFunc=args[1]; +ao.adviceFunc=args[2]; +}else{ +if((dl.isString(args[1]))&&(dl.isString(args[2]))){ +ao.srcFunc=args[1]; +ao.adviceFunc=args[2]; +}else{ +if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isFunction(args[2]))){ +ao.adviceType="after"; +ao.srcObj=args[0]; +ao.srcFunc=args[1]; +var _2f6=dl.nameAnonFunc(args[2],ao.adviceObj,_2f3); +ao.adviceFunc=_2f6; +}else{ +if((dl.isFunction(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))){ +ao.adviceType="after"; +ao.srcObj=dj_global; +var _2f6=dl.nameAnonFunc(args[0],ao.srcObj,_2f3); +ao.srcFunc=_2f6; +ao.adviceObj=args[1]; +ao.adviceFunc=args[2]; +} +} +} +} +break; +case 4: +if((dl.isObject(args[0]))&&(dl.isObject(args[2]))){ +ao.adviceType="after"; +ao.srcObj=args[0]; +ao.srcFunc=args[1]; +ao.adviceObj=args[2]; +ao.adviceFunc=args[3]; +}else{ +if((dl.isString(args[0]))&&(dl.isString(args[1]))&&(dl.isObject(args[2]))){ +ao.adviceType=args[0]; +ao.srcObj=dj_global; +ao.srcFunc=args[1]; +ao.adviceObj=args[2]; +ao.adviceFunc=args[3]; +}else{ +if((dl.isString(args[0]))&&(dl.isFunction(args[1]))&&(dl.isObject(args[2]))){ +ao.adviceType=args[0]; +ao.srcObj=dj_global; +var _2f6=dl.nameAnonFunc(args[1],dj_global,_2f3); +ao.srcFunc=_2f6; +ao.adviceObj=args[2]; +ao.adviceFunc=args[3]; +}else{ +if((dl.isString(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))&&(dl.isFunction(args[3]))){ +ao.srcObj=args[1]; +ao.srcFunc=args[2]; +var _2f6=dl.nameAnonFunc(args[3],dj_global,_2f3); +ao.adviceObj=dj_global; +ao.adviceFunc=_2f6; +}else{ +if(dl.isObject(args[1])){ +ao.srcObj=args[1]; +ao.srcFunc=args[2]; +ao.adviceObj=dj_global; +ao.adviceFunc=args[3]; +}else{ +if(dl.isObject(args[2])){ +ao.srcObj=dj_global; +ao.srcFunc=args[1]; +ao.adviceObj=args[2]; +ao.adviceFunc=args[3]; +}else{ +ao.srcObj=ao.adviceObj=ao.aroundObj=dj_global; +ao.srcFunc=args[1]; +ao.adviceFunc=args[2]; +ao.aroundFunc=args[3]; +} +} +} +} +} +} +break; +case 6: +ao.srcObj=args[1]; +ao.srcFunc=args[2]; +ao.adviceObj=args[3]; +ao.adviceFunc=args[4]; +ao.aroundFunc=args[5]; +ao.aroundObj=dj_global; +break; +default: +ao.srcObj=args[1]; +ao.srcFunc=args[2]; +ao.adviceObj=args[3]; +ao.adviceFunc=args[4]; +ao.aroundObj=args[5]; +ao.aroundFunc=args[6]; +ao.once=args[7]; +ao.delay=args[8]; +ao.rate=args[9]; +ao.adviceMsg=args[10]; +ao.maxCalls=(!isNaN(parseInt(args[11])))?args[11]:-1; +break; +} +if(dl.isFunction(ao.aroundFunc)){ +var _2f6=dl.nameAnonFunc(ao.aroundFunc,ao.aroundObj,_2f3); +ao.aroundFunc=_2f6; +} +if(dl.isFunction(ao.srcFunc)){ +ao.srcFunc=dl.getNameInObj(ao.srcObj,ao.srcFunc); +} +if(dl.isFunction(ao.adviceFunc)){ +ao.adviceFunc=dl.getNameInObj(ao.adviceObj,ao.adviceFunc); +} +if((ao.aroundObj)&&(dl.isFunction(ao.aroundFunc))){ +ao.aroundFunc=dl.getNameInObj(ao.aroundObj,ao.aroundFunc); +} +if(!ao.srcObj){ +dojo.raise("bad srcObj for srcFunc: "+ao.srcFunc); +} +if(!ao.adviceObj){ +dojo.raise("bad adviceObj for adviceFunc: "+ao.adviceFunc); +} +if(!ao.adviceFunc){ +dojo.debug("bad adviceFunc for srcFunc: "+ao.srcFunc); +dojo.debugShallow(ao); +} +return ao; +} +this.connect=function(){ +if(arguments.length==1){ +var ao=arguments[0]; +}else{ +var ao=interpolateArgs(arguments,true); +} +if(dojo.lang.isString(ao.srcFunc)&&(ao.srcFunc.toLowerCase()=="onkey")){ +if(dojo.render.html.ie){ +ao.srcFunc="onkeydown"; +this.connect(ao); +} +ao.srcFunc="onkeypress"; +} +if(dojo.lang.isArray(ao.srcObj)&&ao.srcObj!=""){ +var _2f8={}; +for(var x in ao){ +_2f8[x]=ao[x]; +} +var mjps=[]; +dojo.lang.forEach(ao.srcObj,function(src){ +if((dojo.render.html.capable)&&(dojo.lang.isString(src))){ +src=dojo.byId(src); +} +_2f8.srcObj=src; +mjps.push(dojo.event.connect.call(dojo.event,_2f8)); +}); +return mjps; +} +var mjp=dojo.event.MethodJoinPoint.getForMethod(ao.srcObj,ao.srcFunc); +if(ao.adviceFunc){ +var mjp2=dojo.event.MethodJoinPoint.getForMethod(ao.adviceObj,ao.adviceFunc); +} +mjp.kwAddAdvice(ao); +return mjp; +}; +this.log=function(a1,a2){ +var _300; +if((arguments.length==1)&&(typeof a1=="object")){ +_300=a1; +}else{ +_300={srcObj:a1,srcFunc:a2}; +} +_300.adviceFunc=function(){ +var _301=[]; +for(var x=0;x=this.jp_.around.length){ +return this.jp_.object[this.jp_.methodname].apply(this.jp_.object,this.args); +}else{ +var ti=this.jp_.around[this.around_index]; +var mobj=ti[0]||dj_global; +var meth=ti[1]; +return mobj[meth].call(mobj,this); +} +}; +dojo.event.MethodJoinPoint=function(obj,_319){ +this.object=obj||dj_global; +this.methodname=_319; +this.methodfunc=this.object[_319]; +this.squelch=false; +}; +dojo.event.MethodJoinPoint.getForMethod=function(obj,_31b){ +if(!obj){ +obj=dj_global; +} +var ofn=obj[_31b]; +if(!ofn){ +ofn=obj[_31b]=function(){ +}; +if(!obj[_31b]){ +dojo.raise("Cannot set do-nothing method on that object "+_31b); +} +}else{ +if((typeof ofn!="function")&&(!dojo.lang.isFunction(ofn))&&(!dojo.lang.isAlien(ofn))){ +return null; +} +} +var _31d=_31b+"$joinpoint"; +var _31e=_31b+"$joinpoint$method"; +var _31f=obj[_31d]; +if(!_31f){ +var _320=false; +if(dojo.event["browser"]){ +if((obj["attachEvent"])||(obj["nodeType"])||(obj["addEventListener"])){ +_320=true; +dojo.event.browser.addClobberNodeAttrs(obj,[_31d,_31e,_31b]); +} +} +var _321=ofn.length; +obj[_31e]=ofn; +_31f=obj[_31d]=new dojo.event.MethodJoinPoint(obj,_31e); +if(!_320){ +obj[_31b]=function(){ +return _31f.run.apply(_31f,arguments); +}; +}else{ +obj[_31b]=function(){ +var args=[]; +if(!arguments.length){ +var evt=null; +try{ +if(obj.ownerDocument){ +evt=obj.ownerDocument.parentWindow.event; +}else{ +if(obj.documentElement){ +evt=obj.documentElement.ownerDocument.parentWindow.event; +}else{ +if(obj.event){ +evt=obj.event; +}else{ +evt=window.event; +} +} +} +} +catch(e){ +evt=window.event; +} +if(evt){ +args.push(dojo.event.browser.fixEvent(evt,this)); +} +}else{ +for(var x=0;x-1){ +if(_330==0){ +return; +} +marr[7]--; +} +var _331; +var to={args:[],jp_:this,object:obj,proceed:function(){ +return _32b[_32c].apply(_32b,to.args); +}}; +to.args=_327; +var _333=parseInt(marr[4]); +var _334=((!isNaN(_333))&&(marr[4]!==null)&&(typeof marr[4]!="undefined")); +if(marr[5]){ +var rate=parseInt(marr[5]); +var cur=new Date(); +var _337=false; +if((marr["last"])&&((cur-marr.last)<=rate)){ +if(dojo.event._canTimeout){ +if(marr["delayTimer"]){ +clearTimeout(marr.delayTimer); +} +var tod=parseInt(rate*2); +var mcpy=dojo.lang.shallowCopy(marr); +marr.delayTimer=setTimeout(function(){ +mcpy[5]=0; +_329(mcpy); +},tod); +} +return; +}else{ +marr.last=cur; +} +} +if(_32e){ +_32d[_32e].call(_32d,to); +}else{ +if((_334)&&((dojo.render.html)||(dojo.render.svg))){ +dj_global["setTimeout"](function(){ +if(msg){ +_32b[_32c].call(_32b,to); +}else{ +_32b[_32c].apply(_32b,args); +} +},_333); +}else{ +if(msg){ +_32b[_32c].call(_32b,to); +}else{ +_32b[_32c].apply(_32b,args); +} +} +} +}; +var _33a=function(){ +if(this.squelch){ +try{ +return _329.apply(this,arguments); +} +catch(e){ +dojo.debug(e); +} +}else{ +return _329.apply(this,arguments); +} +}; +if((this["before"])&&(this.before.length>0)){ +dojo.lang.forEach(this.before.concat(new Array()),_33a); +} +var _33b; +try{ +if((this["around"])&&(this.around.length>0)){ +var mi=new dojo.event.MethodInvocation(this,obj,args); +_33b=mi.proceed(); +}else{ +if(this.methodfunc){ +_33b=this.object[this.methodname].apply(this.object,args); +} +} +} +catch(e){ +if(!this.squelch){ +dojo.debug(e,"when calling",this.methodname,"on",this.object,"with arguments",args); +dojo.raise(e); +} +} +if((this["after"])&&(this.after.length>0)){ +dojo.lang.forEach(this.after.concat(new Array()),_33a); +} +return (this.methodfunc)?_33b:null; +},getArr:function(kind){ +var type="after"; +if((typeof kind=="string")&&(kind.indexOf("before")!=-1)){ +type="before"; +}else{ +if(kind=="around"){ +type="around"; +} +} +if(!this[type]){ +this[type]=[]; +} +return this[type]; +},kwAddAdvice:function(args){ +this.addAdvice(args["adviceObj"],args["adviceFunc"],args["aroundObj"],args["aroundFunc"],args["adviceType"],args["precedence"],args["once"],args["delay"],args["rate"],args["adviceMsg"],args["maxCalls"]); +},addAdvice:function(_340,_341,_342,_343,_344,_345,once,_347,rate,_349,_34a){ +var arr=this.getArr(_344); +if(!arr){ +dojo.raise("bad this: "+this); +} +var ao=[_340,_341,_342,_343,_347,rate,_349,_34a]; +if(once){ +if(this.hasAdvice(_340,_341,_344,arr)>=0){ +return; +} +} +if(_345=="first"){ +arr.unshift(ao); +}else{ +arr.push(ao); +} +},hasAdvice:function(_34d,_34e,_34f,arr){ +if(!arr){ +arr=this.getArr(_34f); +} +var ind=-1; +for(var x=0;x=0;i=i-1){ +var el=na[i]; +try{ +if(el&&el["__clobberAttrs__"]){ +for(var j=0;j=65&&_3a1<=90&&evt.shiftKey==false){ +_3a1+=32; +} +if(_3a1>=1&&_3a1<=26&&evt.ctrlKey){ +_3a1+=96; +} +evt.key=String.fromCharCode(_3a1); +} +} +}else{ +if(evt["type"]=="keypress"){ +if(dojo.render.html.opera){ +if(evt.which==0){ +evt.key=evt.keyCode; +}else{ +if(evt.which>0){ +switch(evt.which){ +case evt.KEY_SHIFT: +case evt.KEY_CTRL: +case evt.KEY_ALT: +case evt.KEY_CAPS_LOCK: +case evt.KEY_NUM_LOCK: +case evt.KEY_SCROLL_LOCK: +break; +case evt.KEY_PAUSE: +case evt.KEY_TAB: +case evt.KEY_BACKSPACE: +case evt.KEY_ENTER: +case evt.KEY_ESCAPE: +evt.key=evt.which; +break; +default: +var _3a1=evt.which; +if((evt.ctrlKey||evt.altKey||evt.metaKey)&&(evt.which>=65&&evt.which<=90&&evt.shiftKey==false)){ +_3a1+=32; +} +evt.key=String.fromCharCode(_3a1); +} +} +} +}else{ +if(dojo.render.html.ie){ +if(!evt.ctrlKey&&!evt.altKey&&evt.keyCode>=evt.KEY_SPACE){ +evt.key=String.fromCharCode(evt.keyCode); +} +}else{ +if(dojo.render.html.safari){ +switch(evt.keyCode){ +case 25: +evt.key=evt.KEY_TAB; +evt.shift=true; +break; +case 63232: +evt.key=evt.KEY_UP_ARROW; +break; +case 63233: +evt.key=evt.KEY_DOWN_ARROW; +break; +case 63234: +evt.key=evt.KEY_LEFT_ARROW; +break; +case 63235: +evt.key=evt.KEY_RIGHT_ARROW; +break; +case 63236: +evt.key=evt.KEY_F1; +break; +case 63237: +evt.key=evt.KEY_F2; +break; +case 63238: +evt.key=evt.KEY_F3; +break; +case 63239: +evt.key=evt.KEY_F4; +break; +case 63240: +evt.key=evt.KEY_F5; +break; +case 63241: +evt.key=evt.KEY_F6; +break; +case 63242: +evt.key=evt.KEY_F7; +break; +case 63243: +evt.key=evt.KEY_F8; +break; +case 63244: +evt.key=evt.KEY_F9; +break; +case 63245: +evt.key=evt.KEY_F10; +break; +case 63246: +evt.key=evt.KEY_F11; +break; +case 63247: +evt.key=evt.KEY_F12; +break; +case 63250: +evt.key=evt.KEY_PAUSE; +break; +case 63272: +evt.key=evt.KEY_DELETE; +break; +case 63273: +evt.key=evt.KEY_HOME; +break; +case 63275: +evt.key=evt.KEY_END; +break; +case 63276: +evt.key=evt.KEY_PAGE_UP; +break; +case 63277: +evt.key=evt.KEY_PAGE_DOWN; +break; +case 63302: +evt.key=evt.KEY_INSERT; +break; +case 63248: +case 63249: +case 63289: +break; +default: +evt.key=evt.charCode>=evt.KEY_SPACE?String.fromCharCode(evt.charCode):evt.keyCode; +} +}else{ +evt.key=evt.charCode>0?String.fromCharCode(evt.charCode):evt.keyCode; +} +} +} +} +} +} +if(dojo.render.html.ie){ +if(!evt.target){ +evt.target=evt.srcElement; +} +if(!evt.currentTarget){ +evt.currentTarget=(_39f?_39f:evt.srcElement); +} +if(!evt.layerX){ +evt.layerX=evt.offsetX; +} +if(!evt.layerY){ +evt.layerY=evt.offsetY; +} +var doc=(evt.srcElement&&evt.srcElement.ownerDocument)?evt.srcElement.ownerDocument:document; +var _3a3=((dojo.render.html.ie55)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement; +if(!evt.pageX){ +evt.pageX=evt.clientX+(_3a3.scrollLeft||0); +} +if(!evt.pageY){ +evt.pageY=evt.clientY+(_3a3.scrollTop||0); +} +if(evt.type=="mouseover"){ +evt.relatedTarget=evt.fromElement; +} +if(evt.type=="mouseout"){ +evt.relatedTarget=evt.toElement; +} +this.currentEvent=evt; +evt.callListener=this.callListener; +evt.stopPropagation=this._stopPropagation; +evt.preventDefault=this._preventDefault; +} +return evt; +}; +this.stopEvent=function(evt){ +if(window.event){ +evt.cancelBubble=true; +evt.returnValue=false; +}else{ +evt.preventDefault(); +evt.stopPropagation(); +} +}; +}; +dojo.kwCompoundRequire({common:["dojo.event.common","dojo.event.topic"],browser:["dojo.event.browser"],dashboard:["dojo.event.browser"]}); +dojo.provide("dojo.event.*"); +dojo.provide("dojo.gfx.color"); +dojo.gfx.color.Color=function(r,g,b,a){ +if(dojo.lang.isArray(r)){ +this.r=r[0]; +this.g=r[1]; +this.b=r[2]; +this.a=r[3]||1; +}else{ +if(dojo.lang.isString(r)){ +var rgb=dojo.gfx.color.extractRGB(r); +this.r=rgb[0]; +this.g=rgb[1]; +this.b=rgb[2]; +this.a=g||1; +}else{ +if(r instanceof dojo.gfx.color.Color){ +this.r=r.r; +this.b=r.b; +this.g=r.g; +this.a=r.a; +}else{ +this.r=r; +this.g=g; +this.b=b; +this.a=a; +} +} +} +}; +dojo.gfx.color.Color.fromArray=function(arr){ +return new dojo.gfx.color.Color(arr[0],arr[1],arr[2],arr[3]); +}; +dojo.extend(dojo.gfx.color.Color,{toRgb:function(_3ab){ +if(_3ab){ +return this.toRgba(); +}else{ +return [this.r,this.g,this.b]; +} +},toRgba:function(){ +return [this.r,this.g,this.b,this.a]; +},toHex:function(){ +return dojo.gfx.color.rgb2hex(this.toRgb()); +},toCss:function(){ +return "rgb("+this.toRgb().join()+")"; +},toString:function(){ +return this.toHex(); +},blend:function(_3ac,_3ad){ +var rgb=null; +if(dojo.lang.isArray(_3ac)){ +rgb=_3ac; +}else{ +if(_3ac instanceof dojo.gfx.color.Color){ +rgb=_3ac.toRgb(); +}else{ +rgb=new dojo.gfx.color.Color(_3ac).toRgb(); +} +} +return dojo.gfx.color.blend(this.toRgb(),rgb,_3ad); +}}); +dojo.gfx.color.named={white:[255,255,255],black:[0,0,0],red:[255,0,0],green:[0,255,0],lime:[0,255,0],blue:[0,0,255],navy:[0,0,128],gray:[128,128,128],silver:[192,192,192]}; +dojo.gfx.color.blend=function(a,b,_3b1){ +if(typeof a=="string"){ +return dojo.gfx.color.blendHex(a,b,_3b1); +} +if(!_3b1){ +_3b1=0; +} +_3b1=Math.min(Math.max(-1,_3b1),1); +_3b1=((_3b1+1)/2); +var c=[]; +for(var x=0;x<3;x++){ +c[x]=parseInt(b[x]+((a[x]-b[x])*_3b1)); +} +return c; +}; +dojo.gfx.color.blendHex=function(a,b,_3b6){ +return dojo.gfx.color.rgb2hex(dojo.gfx.color.blend(dojo.gfx.color.hex2rgb(a),dojo.gfx.color.hex2rgb(b),_3b6)); +}; +dojo.gfx.color.extractRGB=function(_3b7){ +var hex="0123456789abcdef"; +_3b7=_3b7.toLowerCase(); +if(_3b7.indexOf("rgb")==0){ +var _3b9=_3b7.match(/rgba*\((\d+), *(\d+), *(\d+)/i); +var ret=_3b9.splice(1,3); +return ret; +}else{ +var _3bb=dojo.gfx.color.hex2rgb(_3b7); +if(_3bb){ +return _3bb; +}else{ +return dojo.gfx.color.named[_3b7]||[255,255,255]; +} +} +}; +dojo.gfx.color.hex2rgb=function(hex){ +var _3bd="0123456789ABCDEF"; +var rgb=new Array(3); +if(hex.indexOf("#")==0){ +hex=hex.substring(1); +} +hex=hex.toUpperCase(); +if(hex.replace(new RegExp("["+_3bd+"]","g"),"")!=""){ +return null; +} +if(hex.length==3){ +rgb[0]=hex.charAt(0)+hex.charAt(0); +rgb[1]=hex.charAt(1)+hex.charAt(1); +rgb[2]=hex.charAt(2)+hex.charAt(2); +}else{ +rgb[0]=hex.substring(0,2); +rgb[1]=hex.substring(2,4); +rgb[2]=hex.substring(4); +} +for(var i=0;i0){ +this.duration=_3de; +} +if(_3e1){ +this.repeatCount=_3e1; +} +if(rate){ +this.rate=rate; +} +if(_3dd){ +dojo.lang.forEach(["handler","beforeBegin","onBegin","onEnd","onPlay","onStop","onAnimate"],function(item){ +if(_3dd[item]){ +this.connect(item,_3dd[item]); +} +},this); +} +if(_3e0&&dojo.lang.isFunction(_3e0)){ +this.easing=_3e0; +} +}; +dojo.inherits(dojo.lfx.Animation,dojo.lfx.IAnimation); +dojo.lang.extend(dojo.lfx.Animation,{_startTime:null,_endTime:null,_timer:null,_percent:0,_startRepeatCount:0,play:function(_3e4,_3e5){ +if(_3e5){ +clearTimeout(this._timer); +this._active=false; +this._paused=false; +this._percent=0; +}else{ +if(this._active&&!this._paused){ +return this; +} +} +this.fire("handler",["beforeBegin"]); +this.fire("beforeBegin"); +if(_3e4>0){ +setTimeout(dojo.lang.hitch(this,function(){ +this.play(null,_3e5); +}),_3e4); +return this; +} +this._startTime=new Date().valueOf(); +if(this._paused){ +this._startTime-=(this.duration*this._percent/100); +} +this._endTime=this._startTime+this.duration; +this._active=true; +this._paused=false; +var step=this._percent/100; +var _3e7=this.curve.getValue(step); +if(this._percent==0){ +if(!this._startRepeatCount){ +this._startRepeatCount=this.repeatCount; +} +this.fire("handler",["begin",_3e7]); +this.fire("onBegin",[_3e7]); +} +this.fire("handler",["play",_3e7]); +this.fire("onPlay",[_3e7]); +this._cycle(); +return this; +},pause:function(){ +clearTimeout(this._timer); +if(!this._active){ +return this; +} +this._paused=true; +var _3e8=this.curve.getValue(this._percent/100); +this.fire("handler",["pause",_3e8]); +this.fire("onPause",[_3e8]); +return this; +},gotoPercent:function(pct,_3ea){ +clearTimeout(this._timer); +this._active=true; +this._paused=true; +this._percent=pct; +if(_3ea){ +this.play(); +} +return this; +},stop:function(_3eb){ +clearTimeout(this._timer); +var step=this._percent/100; +if(_3eb){ +step=1; +} +var _3ed=this.curve.getValue(step); +this.fire("handler",["stop",_3ed]); +this.fire("onStop",[_3ed]); +this._active=false; +this._paused=false; +return this; +},status:function(){ +if(this._active){ +return this._paused?"paused":"playing"; +}else{ +return "stopped"; +} +return this; +},_cycle:function(){ +clearTimeout(this._timer); +if(this._active){ +var curr=new Date().valueOf(); +var step=(curr-this._startTime)/(this._endTime-this._startTime); +if(step>=1){ +step=1; +this._percent=100; +}else{ +this._percent=step*100; +} +if((this.easing)&&(dojo.lang.isFunction(this.easing))){ +step=this.easing(step); +} +var _3f0=this.curve.getValue(step); +this.fire("handler",["animate",_3f0]); +this.fire("onAnimate",[_3f0]); +if(step<1){ +this._timer=setTimeout(dojo.lang.hitch(this,"_cycle"),this.rate); +}else{ +this._active=false; +this.fire("handler",["end"]); +this.fire("onEnd"); +if(this.repeatCount>0){ +this.repeatCount--; +this.play(null,true); +}else{ +if(this.repeatCount==-1){ +this.play(null,true); +}else{ +if(this._startRepeatCount){ +this.repeatCount=this._startRepeatCount; +this._startRepeatCount=0; +} +} +} +} +} +return this; +}}); +dojo.lfx.Combine=function(_3f1){ +dojo.lfx.IAnimation.call(this); +this._anims=[]; +this._animsEnded=0; +var _3f2=arguments; +if(_3f2.length==1&&(dojo.lang.isArray(_3f2[0])||dojo.lang.isArrayLike(_3f2[0]))){ +_3f2=_3f2[0]; +} +dojo.lang.forEach(_3f2,function(anim){ +this._anims.push(anim); +anim.connect("onEnd",dojo.lang.hitch(this,"_onAnimsEnded")); +},this); +}; +dojo.inherits(dojo.lfx.Combine,dojo.lfx.IAnimation); +dojo.lang.extend(dojo.lfx.Combine,{_animsEnded:0,play:function(_3f4,_3f5){ +if(!this._anims.length){ +return this; +} +this.fire("beforeBegin"); +if(_3f4>0){ +setTimeout(dojo.lang.hitch(this,function(){ +this.play(null,_3f5); +}),_3f4); +return this; +} +if(_3f5||this._anims[0].percent==0){ +this.fire("onBegin"); +} +this.fire("onPlay"); +this._animsCall("play",null,_3f5); +return this; +},pause:function(){ +this.fire("onPause"); +this._animsCall("pause"); +return this; +},stop:function(_3f6){ +this.fire("onStop"); +this._animsCall("stop",_3f6); +return this; +},_onAnimsEnded:function(){ +this._animsEnded++; +if(this._animsEnded>=this._anims.length){ +this.fire("onEnd"); +} +return this; +},_animsCall:function(_3f7){ +var args=[]; +if(arguments.length>1){ +for(var i=1;i0){ +setTimeout(dojo.lang.hitch(this,function(){ +this.play(null,_403); +}),_402); +return this; +} +if(_404){ +if(this._currAnim==0){ +this.fire("handler",["begin",this._currAnim]); +this.fire("onBegin",[this._currAnim]); +} +this.fire("onPlay",[this._currAnim]); +_404.play(null,_403); +} +return this; +},pause:function(){ +if(this._anims[this._currAnim]){ +this._anims[this._currAnim].pause(); +this.fire("onPause",[this._currAnim]); +} +return this; +},playPause:function(){ +if(this._anims.length==0){ +return this; +} +if(this._currAnim==-1){ +this._currAnim=0; +} +var _405=this._anims[this._currAnim]; +if(_405){ +if(!_405._active||_405._paused){ +this.play(); +}else{ +this.pause(); +} +} +return this; +},stop:function(){ +var _406=this._anims[this._currAnim]; +if(_406){ +_406.stop(); +this.fire("onStop",[this._currAnim]); +} +return _406; +},_playNext:function(){ +if(this._currAnim==-1||this._anims.length==0){ +return this; +} +this._currAnim++; +if(this._anims[this._currAnim]){ +this._anims[this._currAnim].play(null,true); +} +return this; +}}); +dojo.lfx.combine=function(_407){ +var _408=arguments; +if(dojo.lang.isArray(arguments[0])){ +_408=arguments[0]; +} +if(_408.length==1){ +return _408[0]; +} +return new dojo.lfx.Combine(_408); +}; +dojo.lfx.chain=function(_409){ +var _40a=arguments; +if(dojo.lang.isArray(arguments[0])){ +_40a=arguments[0]; +} +if(_40a.length==1){ +return _40a[0]; +} +return new dojo.lfx.Chain(_40a); +}; +dojo.provide("dojo.html.common"); +dojo.lang.mixin(dojo.html,dojo.dom); +dojo.html.body=function(){ +dojo.deprecated("dojo.html.body() moved to dojo.body()","0.5"); +return dojo.body(); +}; +dojo.html.getEventTarget=function(evt){ +if(!evt){ +evt=dojo.global().event||{}; +} +var t=(evt.srcElement?evt.srcElement:(evt.target?evt.target:null)); +while((t)&&(t.nodeType!=1)){ +t=t.parentNode; +} +return t; +}; +dojo.html.getViewport=function(){ +var _40d=dojo.global(); +var _40e=dojo.doc(); +var w=0; +var h=0; +if(dojo.render.html.mozilla){ +w=_40e.documentElement.clientWidth; +h=_40d.innerHeight; +}else{ +if(!dojo.render.html.opera&&_40d.innerWidth){ +w=_40d.innerWidth; +h=_40d.innerHeight; +}else{ +if(!dojo.render.html.opera&&dojo.exists(_40e,"documentElement.clientWidth")){ +var w2=_40e.documentElement.clientWidth; +if(!w||w2&&w2_436)){ +loc=dojo.hostenv.getBaseScriptUri()+loc; +} +return new dojo.uri.Uri(loc,uri); +}; +this.Uri=function(){ +var uri=arguments[0]; +for(var i=1;i0&&!(j==1&&segs[0]=="")&&segs[j]==".."&&segs[j-1]!=".."){ +if(j==segs.length-1){ +segs.splice(j,1); +segs[j-1]=""; +}else{ +segs.splice(j-1,2); +j-=2; +} +} +} +} +_439.path=segs.join("/"); +} +} +} +} +uri=""; +if(_439.scheme!=null){ +uri+=_439.scheme+":"; +} +if(_439.authority!=null){ +uri+="//"+_439.authority; +} +uri+=_439.path; +if(_439.query!=null){ +uri+="?"+_439.query; +} +if(_439.fragment!=null){ +uri+="#"+_439.fragment; +} +} +this.uri=uri.toString(); +var _43e="^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"; +var r=this.uri.match(new RegExp(_43e)); +this.scheme=r[2]||(r[1]?"":null); +this.authority=r[4]||(r[3]?"":null); +this.path=r[5]; +this.query=r[7]||(r[6]?"":null); +this.fragment=r[9]||(r[8]?"":null); +if(this.authority!=null){ +_43e="^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$"; +r=this.authority.match(new RegExp(_43e)); +this.user=r[3]||null; +this.password=r[4]||null; +this.host=r[5]; +this.port=r[7]||null; +} +this.toString=function(){ +return this.uri; +}; +}; +}; +dojo.provide("dojo.html.style"); +dojo.html.getClass=function(node){ +node=dojo.byId(node); +if(!node){ +return ""; +} +var cs=""; +if(node.className){ +cs=node.className; +}else{ +if(dojo.html.hasAttribute(node,"class")){ +cs=dojo.html.getAttribute(node,"class"); +} +} +return cs.replace(/^\s+|\s+$/g,""); +}; +dojo.html.getClasses=function(node){ +var c=dojo.html.getClass(node); +return (c=="")?[]:c.split(/\s+/g); +}; +dojo.html.hasClass=function(node,_445){ +return (new RegExp("(^|\\s+)"+_445+"(\\s+|$)")).test(dojo.html.getClass(node)); +}; +dojo.html.prependClass=function(node,_447){ +_447+=" "+dojo.html.getClass(node); +return dojo.html.setClass(node,_447); +}; +dojo.html.addClass=function(node,_449){ +if(dojo.html.hasClass(node,_449)){ +return false; +} +_449=(dojo.html.getClass(node)+" "+_449).replace(/^\s+|\s+$/g,""); +return dojo.html.setClass(node,_449); +}; +dojo.html.setClass=function(node,_44b){ +node=dojo.byId(node); +var cs=new String(_44b); +try{ +if(typeof node.className=="string"){ +node.className=cs; +}else{ +if(node.setAttribute){ +node.setAttribute("class",_44b); +node.className=cs; +}else{ +return false; +} +} +} +catch(e){ +dojo.debug("dojo.html.setClass() failed",e); +} +return true; +}; +dojo.html.removeClass=function(node,_44e,_44f){ +try{ +if(!_44f){ +var _450=dojo.html.getClass(node).replace(new RegExp("(^|\\s+)"+_44e+"(\\s+|$)"),"$1$2"); +}else{ +var _450=dojo.html.getClass(node).replace(_44e,""); +} +dojo.html.setClass(node,_450); +} +catch(e){ +dojo.debug("dojo.html.removeClass() failed",e); +} +return true; +}; +dojo.html.replaceClass=function(node,_452,_453){ +dojo.html.removeClass(node,_453); +dojo.html.addClass(node,_452); +}; +dojo.html.classMatchType={ContainsAll:0,ContainsAny:1,IsOnly:2}; +dojo.html.getElementsByClass=function(_454,_455,_456,_457,_458){ +_458=false; +var _459=dojo.doc(); +_455=dojo.byId(_455)||_459; +var _45a=_454.split(/\s+/g); +var _45b=[]; +if(_457!=1&&_457!=2){ +_457=0; +} +var _45c=new RegExp("(\\s|^)(("+_45a.join(")|(")+"))(\\s|$)"); +var _45d=_45a.join(" ").length; +var _45e=[]; +if(!_458&&_459.evaluate){ +var _45f=".//"+(_456||"*")+"[contains("; +if(_457!=dojo.html.classMatchType.ContainsAny){ +_45f+="concat(' ',@class,' '), ' "+_45a.join(" ') and contains(concat(' ',@class,' '), ' ")+" ')"; +if(_457==2){ +_45f+=" and string-length(@class)="+_45d+"]"; +}else{ +_45f+="]"; +} +}else{ +_45f+="concat(' ',@class,' '), ' "+_45a.join(" ') or contains(concat(' ',@class,' '), ' ")+" ')]"; +} +var _460=_459.evaluate(_45f,_455,null,XPathResult.ANY_TYPE,null); +var _461=_460.iterateNext(); +while(_461){ +try{ +_45e.push(_461); +_461=_460.iterateNext(); +} +catch(e){ +break; +} +} +return _45e; +}else{ +if(!_456){ +_456="*"; +} +_45e=_455.getElementsByTagName(_456); +var node,i=0; +outer: +while(node=_45e[i++]){ +var _464=dojo.html.getClasses(node); +if(_464.length==0){ +continue outer; +} +var _465=0; +for(var j=0;j<_464.length;j++){ +if(_45c.test(_464[j])){ +if(_457==dojo.html.classMatchType.ContainsAny){ +_45b.push(node); +continue outer; +}else{ +_465++; +} +}else{ +if(_457==dojo.html.classMatchType.IsOnly){ +continue outer; +} +} +} +if(_465==_45a.length){ +if((_457==dojo.html.classMatchType.IsOnly)&&(_465==_464.length)){ +_45b.push(node); +}else{ +if(_457==dojo.html.classMatchType.ContainsAll){ +_45b.push(node); +} +} +} +} +return _45b; +} +}; +dojo.html.getElementsByClassName=dojo.html.getElementsByClass; +dojo.html.toCamelCase=function(_467){ +var arr=_467.split("-"),cc=arr[0]; +for(var i=1;i=1){ +if(h.ie){ +dojo.html.clearOpacity(node); +return; +}else{ +_4d7=0.999999; +} +}else{ +if(_4d7<0){ +_4d7=0; +} +} +} +if(h.ie){ +if(node.nodeName.toLowerCase()=="tr"){ +var tds=node.getElementsByTagName("td"); +for(var x=0;x=0.999999?1:Number(opac); +}; +dojo.provide("dojo.html.color"); +dojo.html.getBackgroundColor=function(node){ +node=dojo.byId(node); +var _4e3; +do{ +_4e3=dojo.html.getStyle(node,"background-color"); +if(_4e3.toLowerCase()=="rgba(0, 0, 0, 0)"){ +_4e3="transparent"; +} +if(node==document.getElementsByTagName("body")[0]){ +node=null; +break; +} +node=node.parentNode; +}while(node&&dojo.lang.inArray(["transparent",""],_4e3)); +if(_4e3=="transparent"){ +_4e3=[255,255,255,0]; +}else{ +_4e3=dojo.gfx.color.extractRGB(_4e3); +} +return _4e3; +}; +dojo.provide("dojo.html.layout"); +dojo.html.sumAncestorProperties=function(node,prop){ +node=dojo.byId(node); +if(!node){ +return 0; +} +var _4e6=0; +while(node){ +if(dojo.html.getComputedStyle(node,"position")=="fixed"){ +return 0; +} +var val=node[prop]; +if(val){ +_4e6+=val-0; +if(node==dojo.body()){ +break; +} +} +node=node.parentNode; +} +return _4e6; +}; +dojo.html.setStyleAttributes=function(node,_4e9){ +node=dojo.byId(node); +var _4ea=_4e9.replace(/(;)?\s*$/,"").split(";"); +for(var i=0;i<_4ea.length;i++){ +var _4ec=_4ea[i].split(":"); +var name=_4ec[0].replace(/\s*$/,"").replace(/^\s*/,"").toLowerCase(); +var _4ee=_4ec[1].replace(/\s*$/,"").replace(/^\s*/,""); +switch(name){ +case "opacity": +dojo.html.setOpacity(node,_4ee); +break; +case "content-height": +dojo.html.setContentBox(node,{height:_4ee}); +break; +case "content-width": +dojo.html.setContentBox(node,{width:_4ee}); +break; +case "outer-height": +dojo.html.setMarginBox(node,{height:_4ee}); +break; +case "outer-width": +dojo.html.setMarginBox(node,{width:_4ee}); +break; +default: +node.style[dojo.html.toCamelCase(name)]=_4ee; +} +} +}; +dojo.html.boxSizing={MARGIN_BOX:"margin-box",BORDER_BOX:"border-box",PADDING_BOX:"padding-box",CONTENT_BOX:"content-box"}; +dojo.html.getAbsolutePosition=dojo.html.abs=function(node,_4f0,_4f1){ +node=dojo.byId(node,node.ownerDocument); +var ret={x:0,y:0}; +var bs=dojo.html.boxSizing; +if(!_4f1){ +_4f1=bs.CONTENT_BOX; +} +var _4f4=2; +var _4f5; +switch(_4f1){ +case bs.MARGIN_BOX: +_4f5=3; +break; +case bs.BORDER_BOX: +_4f5=2; +break; +case bs.PADDING_BOX: +default: +_4f5=1; +break; +case bs.CONTENT_BOX: +_4f5=0; +break; +} +var h=dojo.render.html; +var db=document["body"]||document["documentElement"]; +if(h.ie){ +with(node.getBoundingClientRect()){ +ret.x=left-2; +ret.y=top-2; +} +}else{ +if(document.getBoxObjectFor){ +_4f4=1; +try{ +var bo=document.getBoxObjectFor(node); +ret.x=bo.x-dojo.html.sumAncestorProperties(node,"scrollLeft"); +ret.y=bo.y-dojo.html.sumAncestorProperties(node,"scrollTop"); +} +catch(e){ +} +}else{ +if(node["offsetParent"]){ +var _4f9; +if((h.safari)&&(node.style.getPropertyValue("position")=="absolute")&&(node.parentNode==db)){ +_4f9=db; +}else{ +_4f9=db.parentNode; +} +if(node.parentNode!=db){ +var nd=node; +if(dojo.render.html.opera){ +nd=db; +} +ret.x-=dojo.html.sumAncestorProperties(nd,"scrollLeft"); +ret.y-=dojo.html.sumAncestorProperties(nd,"scrollTop"); +} +var _4fb=node; +do{ +var n=_4fb["offsetLeft"]; +if(!h.opera||n>0){ +ret.x+=isNaN(n)?0:n; +} +var m=_4fb["offsetTop"]; +ret.y+=isNaN(m)?0:m; +_4fb=_4fb.offsetParent; +}while((_4fb!=_4f9)&&(_4fb!=null)); +}else{ +if(node["x"]&&node["y"]){ +ret.x+=isNaN(node.x)?0:node.x; +ret.y+=isNaN(node.y)?0:node.y; +} +} +} +} +if(_4f0){ +var _4fe=dojo.html.getScroll(); +ret.y+=_4fe.top; +ret.x+=_4fe.left; +} +var _4ff=[dojo.html.getPaddingExtent,dojo.html.getBorderExtent,dojo.html.getMarginExtent]; +if(_4f4>_4f5){ +for(var i=_4f5;i<_4f4;++i){ +ret.y+=_4ff[i](node,"top"); +ret.x+=_4ff[i](node,"left"); +} +}else{ +if(_4f4<_4f5){ +for(var i=_4f5;i>_4f4;--i){ +ret.y-=_4ff[i-1](node,"top"); +ret.x-=_4ff[i-1](node,"left"); +} +} +} +ret.top=ret.y; +ret.left=ret.x; +return ret; +}; +dojo.html.isPositionAbsolute=function(node){ +return (dojo.html.getComputedStyle(node,"position")=="absolute"); +}; +dojo.html._sumPixelValues=function(node,_503,_504){ +var _505=0; +for(var x=0;x<_503.length;x++){ +_505+=dojo.html.getPixelValue(node,_503[x],_504); +} +return _505; +}; +dojo.html.getMargin=function(node){ +return {width:dojo.html._sumPixelValues(node,["margin-left","margin-right"],(dojo.html.getComputedStyle(node,"position")=="absolute")),height:dojo.html._sumPixelValues(node,["margin-top","margin-bottom"],(dojo.html.getComputedStyle(node,"position")=="absolute"))}; +}; +dojo.html.getBorder=function(node){ +return {width:dojo.html.getBorderExtent(node,"left")+dojo.html.getBorderExtent(node,"right"),height:dojo.html.getBorderExtent(node,"top")+dojo.html.getBorderExtent(node,"bottom")}; +}; +dojo.html.getBorderExtent=function(node,side){ +return (dojo.html.getStyle(node,"border-"+side+"-style")=="none"?0:dojo.html.getPixelValue(node,"border-"+side+"-width")); +}; +dojo.html.getMarginExtent=function(node,side){ +return dojo.html._sumPixelValues(node,["margin-"+side],dojo.html.isPositionAbsolute(node)); +}; +dojo.html.getPaddingExtent=function(node,side){ +return dojo.html._sumPixelValues(node,["padding-"+side],true); +}; +dojo.html.getPadding=function(node){ +return {width:dojo.html._sumPixelValues(node,["padding-left","padding-right"],true),height:dojo.html._sumPixelValues(node,["padding-top","padding-bottom"],true)}; +}; +dojo.html.getPadBorder=function(node){ +var pad=dojo.html.getPadding(node); +var _512=dojo.html.getBorder(node); +return {width:pad.width+_512.width,height:pad.height+_512.height}; +}; +dojo.html.getBoxSizing=function(node){ +var h=dojo.render.html; +var bs=dojo.html.boxSizing; +if(((h.ie)||(h.opera))&&node.nodeName.toLowerCase()!="img"){ +var cm=document["compatMode"]; +if((cm=="BackCompat")||(cm=="QuirksMode")){ +return bs.BORDER_BOX; +}else{ +return bs.CONTENT_BOX; +} +}else{ +if(arguments.length==0){ +node=document.documentElement; +} +var _517; +if(!h.ie){ +_517=dojo.html.getStyle(node,"-moz-box-sizing"); +if(!_517){ +_517=dojo.html.getStyle(node,"box-sizing"); +} +} +return (_517?_517:bs.CONTENT_BOX); +} +}; +dojo.html.isBorderBox=function(node){ +return (dojo.html.getBoxSizing(node)==dojo.html.boxSizing.BORDER_BOX); +}; +dojo.html.getBorderBox=function(node){ +node=dojo.byId(node); +return {width:node.offsetWidth,height:node.offsetHeight}; +}; +dojo.html.getPaddingBox=function(node){ +var box=dojo.html.getBorderBox(node); +var _51c=dojo.html.getBorder(node); +return {width:box.width-_51c.width,height:box.height-_51c.height}; +}; +dojo.html.getContentBox=function(node){ +node=dojo.byId(node); +var _51e=dojo.html.getPadBorder(node); +return {width:node.offsetWidth-_51e.width,height:node.offsetHeight-_51e.height}; +}; +dojo.html.setContentBox=function(node,args){ +node=dojo.byId(node); +var _521=0; +var _522=0; +var isbb=dojo.html.isBorderBox(node); +var _524=(isbb?dojo.html.getPadBorder(node):{width:0,height:0}); +var ret={}; +if(typeof args.width!="undefined"){ +_521=args.width+_524.width; +ret.width=dojo.html.setPositivePixelValue(node,"width",_521); +} +if(typeof args.height!="undefined"){ +_522=args.height+_524.height; +ret.height=dojo.html.setPositivePixelValue(node,"height",_522); +} +return ret; +}; +dojo.html.getMarginBox=function(node){ +var _527=dojo.html.getBorderBox(node); +var _528=dojo.html.getMargin(node); +return {width:_527.width+_528.width,height:_527.height+_528.height}; +}; +dojo.html.setMarginBox=function(node,args){ +node=dojo.byId(node); +var _52b=0; +var _52c=0; +var isbb=dojo.html.isBorderBox(node); +var _52e=(!isbb?dojo.html.getPadBorder(node):{width:0,height:0}); +var _52f=dojo.html.getMargin(node); +var ret={}; +if(typeof args.width!="undefined"){ +_52b=args.width-_52e.width; +_52b-=_52f.width; +ret.width=dojo.html.setPositivePixelValue(node,"width",_52b); +} +if(typeof args.height!="undefined"){ +_52c=args.height-_52e.height; +_52c-=_52f.height; +ret.height=dojo.html.setPositivePixelValue(node,"height",_52c); +} +return ret; +}; +dojo.html.getElementBox=function(node,type){ +var bs=dojo.html.boxSizing; +switch(type){ +case bs.MARGIN_BOX: +return dojo.html.getMarginBox(node); +case bs.BORDER_BOX: +return dojo.html.getBorderBox(node); +case bs.PADDING_BOX: +return dojo.html.getPaddingBox(node); +case bs.CONTENT_BOX: +default: +return dojo.html.getContentBox(node); +} +}; +dojo.html.toCoordinateObject=dojo.html.toCoordinateArray=function(_534,_535,_536){ +if(_534 instanceof Array||typeof _534=="array"){ +dojo.deprecated("dojo.html.toCoordinateArray","use dojo.html.toCoordinateObject({left: , top: , width: , height: }) instead","0.5"); +while(_534.length<4){ +_534.push(0); +} +while(_534.length>4){ +_534.pop(); +} +var ret={left:_534[0],top:_534[1],width:_534[2],height:_534[3]}; +}else{ +if(!_534.nodeType&&!(_534 instanceof String||typeof _534=="string")&&("width" in _534||"height" in _534||"left" in _534||"x" in _534||"top" in _534||"y" in _534)){ +var ret={left:_534.left||_534.x||0,top:_534.top||_534.y||0,width:_534.width||0,height:_534.height||0}; +}else{ +var node=dojo.byId(_534); +var pos=dojo.html.abs(node,_535,_536); +var _53a=dojo.html.getMarginBox(node); +var ret={left:pos.left,top:pos.top,width:_53a.width,height:_53a.height}; +} +} +ret.x=ret.left; +ret.y=ret.top; +return ret; +}; +dojo.html.setMarginBoxWidth=dojo.html.setOuterWidth=function(node,_53c){ +return dojo.html._callDeprecated("setMarginBoxWidth","setMarginBox",arguments,"width"); +}; +dojo.html.setMarginBoxHeight=dojo.html.setOuterHeight=function(){ +return dojo.html._callDeprecated("setMarginBoxHeight","setMarginBox",arguments,"height"); +}; +dojo.html.getMarginBoxWidth=dojo.html.getOuterWidth=function(){ +return dojo.html._callDeprecated("getMarginBoxWidth","getMarginBox",arguments,null,"width"); +}; +dojo.html.getMarginBoxHeight=dojo.html.getOuterHeight=function(){ +return dojo.html._callDeprecated("getMarginBoxHeight","getMarginBox",arguments,null,"height"); +}; +dojo.html.getTotalOffset=function(node,type,_53f){ +return dojo.html._callDeprecated("getTotalOffset","getAbsolutePosition",arguments,null,type); +}; +dojo.html.getAbsoluteX=function(node,_541){ +return dojo.html._callDeprecated("getAbsoluteX","getAbsolutePosition",arguments,null,"x"); +}; +dojo.html.getAbsoluteY=function(node,_543){ +return dojo.html._callDeprecated("getAbsoluteY","getAbsolutePosition",arguments,null,"y"); +}; +dojo.html.totalOffsetLeft=function(node,_545){ +return dojo.html._callDeprecated("totalOffsetLeft","getAbsolutePosition",arguments,null,"left"); +}; +dojo.html.totalOffsetTop=function(node,_547){ +return dojo.html._callDeprecated("totalOffsetTop","getAbsolutePosition",arguments,null,"top"); +}; +dojo.html.getMarginWidth=function(node){ +return dojo.html._callDeprecated("getMarginWidth","getMargin",arguments,null,"width"); +}; +dojo.html.getMarginHeight=function(node){ +return dojo.html._callDeprecated("getMarginHeight","getMargin",arguments,null,"height"); +}; +dojo.html.getBorderWidth=function(node){ +return dojo.html._callDeprecated("getBorderWidth","getBorder",arguments,null,"width"); +}; +dojo.html.getBorderHeight=function(node){ +return dojo.html._callDeprecated("getBorderHeight","getBorder",arguments,null,"height"); +}; +dojo.html.getPaddingWidth=function(node){ +return dojo.html._callDeprecated("getPaddingWidth","getPadding",arguments,null,"width"); +}; +dojo.html.getPaddingHeight=function(node){ +return dojo.html._callDeprecated("getPaddingHeight","getPadding",arguments,null,"height"); +}; +dojo.html.getPadBorderWidth=function(node){ +return dojo.html._callDeprecated("getPadBorderWidth","getPadBorder",arguments,null,"width"); +}; +dojo.html.getPadBorderHeight=function(node){ +return dojo.html._callDeprecated("getPadBorderHeight","getPadBorder",arguments,null,"height"); +}; +dojo.html.getBorderBoxWidth=dojo.html.getInnerWidth=function(){ +return dojo.html._callDeprecated("getBorderBoxWidth","getBorderBox",arguments,null,"width"); +}; +dojo.html.getBorderBoxHeight=dojo.html.getInnerHeight=function(){ +return dojo.html._callDeprecated("getBorderBoxHeight","getBorderBox",arguments,null,"height"); +}; +dojo.html.getContentBoxWidth=dojo.html.getContentWidth=function(){ +return dojo.html._callDeprecated("getContentBoxWidth","getContentBox",arguments,null,"width"); +}; +dojo.html.getContentBoxHeight=dojo.html.getContentHeight=function(){ +return dojo.html._callDeprecated("getContentBoxHeight","getContentBox",arguments,null,"height"); +}; +dojo.html.setContentBoxWidth=dojo.html.setContentWidth=function(node,_551){ +return dojo.html._callDeprecated("setContentBoxWidth","setContentBox",arguments,"width"); +}; +dojo.html.setContentBoxHeight=dojo.html.setContentHeight=function(node,_553){ +return dojo.html._callDeprecated("setContentBoxHeight","setContentBox",arguments,"height"); +}; +dojo.provide("dojo.lfx.html"); +dojo.lfx.html._byId=function(_554){ +if(!_554){ +return []; +} +if(dojo.lang.isArrayLike(_554)){ +if(!_554.alreadyChecked){ +var n=[]; +dojo.lang.forEach(_554,function(node){ +n.push(dojo.byId(node)); +}); +n.alreadyChecked=true; +return n; +}else{ +return _554; +} +}else{ +var n=[]; +n.push(dojo.byId(_554)); +n.alreadyChecked=true; +return n; +} +}; +dojo.lfx.html.propertyAnimation=function(_557,_558,_559,_55a,_55b){ +_557=dojo.lfx.html._byId(_557); +var _55c={"propertyMap":_558,"nodes":_557,"duration":_559,"easing":_55a||dojo.lfx.easeDefault}; +var _55d=function(args){ +if(args.nodes.length==1){ +var pm=args.propertyMap; +if(!dojo.lang.isArray(args.propertyMap)){ +var parr=[]; +for(var _561 in pm){ +pm[_561].property=_561; +parr.push(pm[_561]); +} +pm=args.propertyMap=parr; +} +dojo.lang.forEach(pm,function(prop){ +if(dj_undef("start",prop)){ +if(prop.property!="opacity"){ +prop.start=parseInt(dojo.html.getComputedStyle(args.nodes[0],prop.property)); +}else{ +prop.start=dojo.html.getOpacity(args.nodes[0]); +} +} +}); +} +}; +var _563=function(_564){ +var _565=[]; +dojo.lang.forEach(_564,function(c){ +_565.push(Math.round(c)); +}); +return _565; +}; +var _567=function(n,_569){ +n=dojo.byId(n); +if(!n||!n.style){ +return; +} +for(var s in _569){ +try{ +if(s=="opacity"){ +dojo.html.setOpacity(n,_569[s]); +}else{ +n.style[s]=_569[s]; +} +} +catch(e){ +dojo.debug(e); +} +} +}; +var _56b=function(_56c){ +this._properties=_56c; +this.diffs=new Array(_56c.length); +dojo.lang.forEach(_56c,function(prop,i){ +if(dojo.lang.isFunction(prop.start)){ +prop.start=prop.start(prop,i); +} +if(dojo.lang.isFunction(prop.end)){ +prop.end=prop.end(prop,i); +} +if(dojo.lang.isArray(prop.start)){ +this.diffs[i]=null; +}else{ +if(prop.start instanceof dojo.gfx.color.Color){ +prop.startRgb=prop.start.toRgb(); +prop.endRgb=prop.end.toRgb(); +}else{ +this.diffs[i]=prop.end-prop.start; +} +} +},this); +this.getValue=function(n){ +var ret={}; +dojo.lang.forEach(this._properties,function(prop,i){ +var _573=null; +if(dojo.lang.isArray(prop.start)){ +}else{ +if(prop.start instanceof dojo.gfx.color.Color){ +_573=(prop.units||"rgb")+"("; +for(var j=0;j3){ +_5e8.pop(); +} +var rgb=new dojo.gfx.color.Color(_5e2); +var _5ed=new dojo.gfx.color.Color(_5e8); +var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:rgb,end:_5ed}},_5e3,_5e4,{"beforeBegin":function(){ +if(_5ea){ +node.style.backgroundImage="none"; +} +node.style.backgroundColor="rgb("+rgb.toRgb().join(",")+")"; +},"onEnd":function(){ +if(_5ea){ +node.style.backgroundImage=_5ea; +} +if(_5eb){ +node.style.backgroundColor="transparent"; +} +if(_5e5){ +_5e5(node,anim); +} +}}); +_5e6.push(anim); +}); +return dojo.lfx.combine(_5e6); +}; +dojo.lfx.html.unhighlight=function(_5ef,_5f0,_5f1,_5f2,_5f3){ +_5ef=dojo.lfx.html._byId(_5ef); +var _5f4=[]; +dojo.lang.forEach(_5ef,function(node){ +var _5f6=new dojo.gfx.color.Color(dojo.html.getBackgroundColor(node)); +var rgb=new dojo.gfx.color.Color(_5f0); +var _5f8=dojo.html.getStyle(node,"background-image"); +var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:_5f6,end:rgb}},_5f1,_5f2,{"beforeBegin":function(){ +if(_5f8){ +node.style.backgroundImage="none"; +} +node.style.backgroundColor="rgb("+_5f6.toRgb().join(",")+")"; +},"onEnd":function(){ +if(_5f3){ +_5f3(node,anim); +} +}}); +_5f4.push(anim); +}); +return dojo.lfx.combine(_5f4); +}; +dojo.lang.mixin(dojo.lfx,dojo.lfx.html); +dojo.kwCompoundRequire({browser:["dojo.lfx.html"],dashboard:["dojo.lfx.html"]}); +dojo.provide("dojo.lfx.*"); +if(!this["dojo"]){ +alert("\"dojo/__package__.js\" is now located at \"dojo/dojo.js\". Please update your includes accordingly"); +} +dojo.provide("dojo.xml.Parse"); +dojo.xml.Parse=function(){ +var isIE=((dojo.render.html.capable)&&(dojo.render.html.ie)); +function getTagName(node){ +try{ +return node.tagName.toLowerCase(); +} +catch(e){ +return ""; +} +} +function getDojoTagName(node){ +var _5fd=getTagName(node); +if(!_5fd){ +return ""; +} +if((dojo.widget)&&(dojo.widget.tags[_5fd])){ +return _5fd; +} +var p=_5fd.indexOf(":"); +if(p>=0){ +return _5fd; +} +if(_5fd.substr(0,5)=="dojo:"){ +return _5fd; +} +if(dojo.render.html.capable&&dojo.render.html.ie&&node.scopeName!="HTML"){ +return node.scopeName.toLowerCase()+":"+_5fd; +} +if(_5fd.substr(0,4)=="dojo"){ +return "dojo:"+_5fd.substring(4); +} +var djt=node.getAttribute("dojoType")||node.getAttribute("dojotype"); +if(djt){ +if(djt.indexOf(":")<0){ +djt="dojo:"+djt; +} +return djt.toLowerCase(); +} +djt=node.getAttributeNS&&node.getAttributeNS(dojo.dom.dojoml,"type"); +if(djt){ +return "dojo:"+djt.toLowerCase(); +} +try{ +djt=node.getAttribute("dojo:type"); +} +catch(e){ +} +if(djt){ +return "dojo:"+djt.toLowerCase(); +} +if((dj_global["djConfig"])&&(!djConfig["ignoreClassNames"])){ +var _600=node.className||node.getAttribute("class"); +if((_600)&&(_600.indexOf)&&(_600.indexOf("dojo-")!=-1)){ +var _601=_600.split(" "); +for(var x=0,c=_601.length;x0){ +var ns=_608.substring(0,pos); +_60c["ns"]=ns; +if((dojo.ns)&&(!dojo.ns.allow(ns))){ +_60a=false; +} +} +if(_60a){ +var _60f=this.parseAttributes(node); +for(var attr in _60f){ +if((!_60c[_608][attr])||(typeof _60c[_608][attr]!="array")){ +_60c[_608][attr]=[]; +} +_60c[_608][attr].push(_60f[attr]); +} +_60c[_608].nodeRef=node; +_60c.tagName=_608; +_60c.index=_607||0; +} +var _610=0; +for(var i=0;i=0;x--){ +try{ +this.widgets[x].destroy(true); +delete this.widgets[x]; +} +catch(e){ +} +} +}; +this.remove=function(_656){ +if(dojo.lang.isNumber(_656)){ +var tw=this.widgets[_656].widgetId; +delete this.topWidgets[tw]; +delete this.widgetIds[tw]; +this.widgets.splice(_656,1); +}else{ +this.removeById(_656); +} +}; +this.removeById=function(id){ +if(!dojo.lang.isString(id)){ +id=id["widgetId"]; +if(!id){ +dojo.debug("invalid widget or id passed to removeById"); +return; +} +} +for(var i=0;i0){ +return _692[n]; +} +return _692; +}; +g("registerWidgetPackage"); +g("getImplementation","getWidgetImplementation"); +g("getImplementationName","getWidgetImplementationName"); +dw.widgets=dwm.widgets; +dw.widgetIds=dwm.widgetIds; +dw.root=dwm.root; +})(); +dojo.kwCompoundRequire({common:[["dojo.uri.Uri",false,false]]}); +dojo.provide("dojo.uri.*"); +dojo.provide("dojo.a11y"); +dojo.a11y={imgPath:dojo.uri.moduleUri("dojo.widget","templates/images"),doAccessibleCheck:true,accessible:null,checkAccessible:function(){ +if(this.accessible===null){ +this.accessible=false; +if(this.doAccessibleCheck==true){ +this.accessible=this.testAccessible(); +} +} +return this.accessible; +},testAccessible:function(){ +this.accessible=false; +if(dojo.render.html.ie||dojo.render.html.mozilla){ +var div=document.createElement("div"); +div.style.backgroundImage="url(\""+this.imgPath+"/tab_close.gif\")"; +dojo.body().appendChild(div); +var _694=null; +if(window.getComputedStyle){ +var _695=getComputedStyle(div,""); +_694=_695.getPropertyValue("background-image"); +}else{ +_694=div.currentStyle.backgroundImage; +} +var _696=false; +if(_694!=null&&(_694=="none"||_694=="url(invalid-url:)")){ +this.accessible=true; +} +dojo.body().removeChild(div); +} +return this.accessible; +},setCheckAccessible:function(_697){ +this.doAccessibleCheck=_697; +},setAccessibleMode:function(){ +if(this.accessible===null){ +if(this.checkAccessible()){ +dojo.render.html.prefixes.unshift("a11y"); +} +} +return this.accessible; +}}; +dojo.provide("dojo.widget.Widget"); +dojo.declare("dojo.widget.Widget",null,function(){ +this.children=[]; +this.extraArgs={}; +},{parent:null,isTopLevel:false,disabled:false,isContainer:false,widgetId:"",widgetType:"Widget",ns:"dojo",getNamespacedType:function(){ +return (this.ns?this.ns+":"+this.widgetType:this.widgetType).toLowerCase(); +},toString:function(){ +return "[Widget "+this.getNamespacedType()+", "+(this.widgetId||"NO ID")+"]"; +},repr:function(){ +return this.toString(); +},enable:function(){ +this.disabled=false; +},disable:function(){ +this.disabled=true; +},onResized:function(){ +this.notifyChildrenOfResize(); +},notifyChildrenOfResize:function(){ +for(var i=0;ii){ +_69f=this.children[i]; +if(_69f instanceof dojo.widget.Widget){ +this.removeChild(_69f); +_69f.destroy(); +continue; +} +i++; +} +},getChildrenOfType:function(type,_6a2){ +var ret=[]; +var _6a4=dojo.lang.isFunction(type); +if(!_6a4){ +type=type.toLowerCase(); +} +for(var x=0;xsi)){ +this[x][_6b3[y].substr(0,si).replace(/^\s+|\s+$/g,"")]=_6b3[y].substr(si+1); +} +} +} +}else{ +this[x]=args[x]; +} +} +} +} +} +} +} +} +}else{ +this.extraArgs[x.toLowerCase()]=args[x]; +} +} +},postMixInProperties:function(args,frag,_6b7){ +},initialize:function(args,frag,_6ba){ +return false; +},postInitialize:function(args,frag,_6bd){ +return false; +},postCreate:function(args,frag,_6c0){ +return false; +},uninitialize:function(){ +return false; +},buildRendering:function(args,frag,_6c3){ +dojo.unimplemented("dojo.widget.Widget.buildRendering, on "+this.toString()+", "); +return false; +},destroyRendering:function(){ +dojo.unimplemented("dojo.widget.Widget.destroyRendering"); +return false; +},addedTo:function(_6c4){ +},addChild:function(_6c5){ +dojo.unimplemented("dojo.widget.Widget.addChild"); +return false; +},removeChild:function(_6c6){ +for(var x=0;x-1)?_6e9.substring(0,pos):_6e9; +_6e8=(_6e8)||{}; +_6e8.widgetType=type; +if((!init)&&(_6e8["classConstructor"])){ +init=_6e8.classConstructor; +delete _6e8.classConstructor; +} +dojo.declare(_6e4,_6e6,init,_6e8); +}; +dojo.provide("dojo.widget.Parse"); +dojo.widget.Parse=function(_6ef){ +this.propertySetsList=[]; +this.fragment=_6ef; +this.createComponents=function(frag,_6f1){ +var _6f2=[]; +var _6f3=false; +try{ +if(frag&&frag.tagName&&(frag!=frag.nodeRef)){ +var _6f4=dojo.widget.tags; +var tna=String(frag.tagName).split(";"); +for(var x=0;x-1)?name.substring(0,pos):"dojo"; +if(pos>-1){ +name=name.substring(pos+1); +} +var _727=name.toLowerCase(); +var _728=ns+":"+_727; +_723=(dojo.byId(name)&&!dojo.widget.tags[_728]); +} +if((arguments.length==1)&&(_723||!_724)){ +var xp=new dojo.xml.Parse(); +var tn=_723?dojo.byId(name):name; +return dojo.widget.getParser().createComponents(xp.parseElement(tn,null,true))[0]; +} +function fromScript(_72b,name,_72d,ns){ +_72d[_728]={dojotype:[{value:_727}],nodeRef:_72b,fastMixIn:true}; +_72d.ns=ns; +return dojo.widget.getParser().createComponentFromScript(_72b,name,_72d,ns); +} +_720=_720||{}; +var _72f=false; +var tn=null; +var h=dojo.render.html.capable; +if(h){ +tn=document.createElement("span"); +} +if(!_721){ +_72f=true; +_721=tn; +if(h){ +dojo.body().appendChild(_721); +} +}else{ +if(_722){ +dojo.dom.insertAtPosition(tn,_721,_722); +}else{ +tn=_721; +} +} +var _731=fromScript(tn,name.toLowerCase(),_720,ns); +if((!_731)||(!_731[0])||(typeof _731[0].widgetType=="undefined")){ +throw new Error("createWidget: Creation of \""+name+"\" widget failed."); +} +try{ +if(_72f&&_731[0].domNode.parentNode){ +_731[0].domNode.parentNode.removeChild(_731[0].domNode); +} +} +catch(e){ +dojo.debug(e); +} +return _731[0]; +}; +dojo.provide("dojo.widget.DomWidget"); +dojo.widget._cssFiles={}; +dojo.widget._cssStrings={}; +dojo.widget._templateCache={}; +dojo.widget.defaultStrings={dojoRoot:dojo.hostenv.getBaseScriptUri(),dojoWidgetModuleUri:dojo.uri.moduleUri("dojo.widget"),baseScriptUri:dojo.hostenv.getBaseScriptUri()}; +dojo.widget.fillFromTemplateCache=function(obj,_733,_734,_735){ +var _736=_733||obj.templatePath; +var _737=dojo.widget._templateCache; +if(!_736&&!obj["widgetType"]){ +do{ +var _738="__dummyTemplate__"+dojo.widget._templateCache.dummyCount++; +}while(_737[_738]); +obj.widgetType=_738; +} +var wt=_736?_736.toString():obj.widgetType; +var ts=_737[wt]; +if(!ts){ +_737[wt]={"string":null,"node":null}; +if(_735){ +ts={}; +}else{ +ts=_737[wt]; +} +} +if((!obj.templateString)&&(!_735)){ +obj.templateString=_734||ts["string"]; +} +if(obj.templateString){ +obj.templateString=this._sanitizeTemplateString(obj.templateString); +} +if((!obj.templateNode)&&(!_735)){ +obj.templateNode=ts["node"]; +} +if((!obj.templateNode)&&(!obj.templateString)&&(_736)){ +var _73b=this._sanitizeTemplateString(dojo.hostenv.getText(_736)); +obj.templateString=_73b; +if(!_735){ +_737[wt]["string"]=_73b; +} +} +if((!ts["string"])&&(!_735)){ +ts.string=obj.templateString; +} +}; +dojo.widget._sanitizeTemplateString=function(_73c){ +if(_73c){ +_73c=_73c.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,""); +var _73d=_73c.match(/]*>\s*([\s\S]+)\s*<\/body>/im); +if(_73d){ +_73c=_73d[1]; +} +}else{ +_73c=""; +} +return _73c; +}; +dojo.widget._templateCache.dummyCount=0; +dojo.widget.attachProperties=["dojoAttachPoint","id"]; +dojo.widget.eventAttachProperty="dojoAttachEvent"; +dojo.widget.onBuildProperty="dojoOnBuild"; +dojo.widget.waiNames=["waiRole","waiState"]; +dojo.widget.wai={waiRole:{name:"waiRole","namespace":"http://www.w3.org/TR/xhtml2",alias:"x2",prefix:"wairole:"},waiState:{name:"waiState","namespace":"http://www.w3.org/2005/07/aaa",alias:"aaa",prefix:""},setAttr:function(node,ns,attr,_741){ +if(dojo.render.html.ie){ +node.setAttribute(this[ns].alias+":"+attr,this[ns].prefix+_741); +}else{ +node.setAttributeNS(this[ns]["namespace"],attr,this[ns].prefix+_741); +} +},getAttr:function(node,ns,attr){ +if(dojo.render.html.ie){ +return node.getAttribute(this[ns].alias+":"+attr); +}else{ +return node.getAttributeNS(this[ns]["namespace"],attr); +} +},removeAttr:function(node,ns,attr){ +var _748=true; +if(dojo.render.html.ie){ +_748=node.removeAttribute(this[ns].alias+":"+attr); +}else{ +node.removeAttributeNS(this[ns]["namespace"],attr); +} +return _748; +}}; +dojo.widget.attachTemplateNodes=function(_749,_74a,_74b){ +var _74c=dojo.dom.ELEMENT_NODE; +function trim(str){ +return str.replace(/^\s+|\s+$/g,""); +} +if(!_749){ +_749=_74a.domNode; +} +if(_749.nodeType!=_74c){ +return; +} +var _74e=_749.all||_749.getElementsByTagName("*"); +var _74f=_74a; +for(var x=-1;x<_74e.length;x++){ +var _751=(x==-1)?_749:_74e[x]; +var _752=[]; +if(!_74a.widgetsInTemplate||!_751.getAttribute("dojoType")){ +for(var y=0;y=0){ +var _75a=tevt.split(":"); +tevt=trim(_75a[0]); +_758=trim(_75a[1]); +} +if(!_758){ +_758=tevt; +} +var tf=function(){ +var ntf=new String(_758); +return function(evt){ +if(_74f[ntf]){ +_74f[ntf](dojo.event.browser.fixEvent(evt,this)); +} +}; +}(); +dojo.event.browser.addListener(_751,tevt,tf,false,true); +} +} +for(var y=0;y<_74b.length;y++){ +var _75e=_751.getAttribute(_74b[y]); +if((_75e)&&(_75e.length)){ +var _758=null; +var _75f=_74b[y].substr(4); +_758=trim(_75e); +var _760=[_758]; +if(_758.indexOf(";")>=0){ +_760=dojo.lang.map(_758.split(";"),trim); +} +for(var z=0;z<_760.length;z++){ +if(!_760[z].length){ +continue; +} +var tf=function(){ +var ntf=new String(_760[z]); +return function(evt){ +if(_74f[ntf]){ +_74f[ntf](dojo.event.browser.fixEvent(evt,this)); +} +}; +}(); +dojo.event.browser.addListener(_751,_75f,tf,false,true); +} +} +} +} +var _763=_751.getAttribute(this.templateProperty); +if(_763){ +_74a[_763]=_751; +} +dojo.lang.forEach(dojo.widget.waiNames,function(name){ +var wai=dojo.widget.wai[name]; +var val=_751.getAttribute(wai.name); +if(val){ +if(val.indexOf("-")==-1){ +dojo.widget.wai.setAttr(_751,wai.name,"role",val); +}else{ +var _767=val.split("-"); +dojo.widget.wai.setAttr(_751,wai.name,_767[0],_767[1]); +} +} +},this); +var _768=_751.getAttribute(this.onBuildProperty); +if(_768){ +eval("var node = baseNode; var widget = targetObj; "+_768); +} +} +}; +dojo.widget.getDojoEventsFromStr=function(str){ +var re=/(dojoOn([a-z]+)(\s?))=/gi; +var evts=str?str.match(re)||[]:[]; +var ret=[]; +var lem={}; +for(var x=0;x0)&&(typeof arguments[0]=="object")){ +this.create(arguments[0]); +} +},{templateNode:null,templateString:null,templateCssString:null,preventClobber:false,domNode:null,containerNode:null,widgetsInTemplate:false,addChild:function(_770,_771,pos,ref,_774){ +if(!this.isContainer){ +dojo.debug("dojo.widget.DomWidget.addChild() attempted on non-container widget"); +return null; +}else{ +if(_774==undefined){ +_774=this.children.length; +} +this.addWidgetAsDirectChild(_770,_771,pos,ref,_774); +this.registerChild(_770,_774); +} +return _770; +},addWidgetAsDirectChild:function(_775,_776,pos,ref,_779){ +if((!this.containerNode)&&(!_776)){ +this.containerNode=this.domNode; +} +var cn=(_776)?_776:this.containerNode; +if(!pos){ +pos="after"; +} +if(!ref){ +if(!cn){ +cn=dojo.body(); +} +ref=cn.lastChild; +} +if(!_779){ +_779=0; +} +_775.domNode.setAttribute("dojoinsertionindex",_779); +if(!ref){ +cn.appendChild(_775.domNode); +}else{ +if(pos=="insertAtIndex"){ +dojo.dom.insertAtIndex(_775.domNode,ref.parentNode,_779); +}else{ +if((pos=="after")&&(ref===cn.lastChild)){ +cn.appendChild(_775.domNode); +}else{ +dojo.dom.insertAtPosition(_775.domNode,cn,pos); +} +} +} +},registerChild:function(_77b,_77c){ +_77b.dojoInsertionIndex=_77c; +var idx=-1; +for(var i=0;i=0){ +var _794=tevt.split(":"); +tevt=dojo.string.trim(_794[0]); +_792=dojo.string.trim(_794[1]); +} +if(!_792){ +_792=tevt; +} +if(dojo.lang.isFunction(_78f[tevt])){ +dojo.event.kwConnect({srcObj:_78f,srcFunc:tevt,targetObj:this,targetFunc:_792}); +}else{ +alert(tevt+" is not a function in widget "+_78f); +} +} +} +if(_78f.extraArgs["dojoattachpoint"]){ +this[_78f.extraArgs["dojoattachpoint"]]=_78f; +} +} +} +if(this.isContainer&&!frag["dojoDontFollow"]){ +dojo.widget.getParser().createSubComponents(frag,this); +} +},buildRendering:function(args,frag){ +var ts=dojo.widget._templateCache[this.widgetType]; +if(args["templatecsspath"]){ +args["templateCssPath"]=args["templatecsspath"]; +} +var _798=args["templateCssPath"]||this.templateCssPath; +if(_798&&!dojo.widget._cssFiles[_798.toString()]){ +if((!this.templateCssString)&&(_798)){ +this.templateCssString=dojo.hostenv.getText(_798); +this.templateCssPath=null; +} +dojo.widget._cssFiles[_798.toString()]=true; +} +if((this["templateCssString"])&&(!dojo.widget._cssStrings[this.templateCssString])){ +dojo.html.insertCssText(this.templateCssString,null,_798); +dojo.widget._cssStrings[this.templateCssString]=true; +} +if((!this.preventClobber)&&((this.templatePath)||(this.templateNode)||((this["templateString"])&&(this.templateString.length))||((typeof ts!="undefined")&&((ts["string"])||(ts["node"]))))){ +this.buildFromTemplate(args,frag); +}else{ +this.domNode=this.getFragNodeRef(frag); +} +this.fillInTemplate(args,frag); +},buildFromTemplate:function(args,frag){ +var _79b=false; +if(args["templatepath"]){ +args["templatePath"]=args["templatepath"]; +} +dojo.widget.fillFromTemplateCache(this,args["templatePath"],null,_79b); +var ts=dojo.widget._templateCache[this.templatePath?this.templatePath.toString():this.widgetType]; +if((ts)&&(!_79b)){ +if(!this.templateString.length){ +this.templateString=ts["string"]; +} +if(!this.templateNode){ +this.templateNode=ts["node"]; +} +} +var _79d=false; +var node=null; +var tstr=this.templateString; +if((!this.templateNode)&&(this.templateString)){ +_79d=this.templateString.match(/\$\{([^\}]+)\}/g); +if(_79d){ +var hash=this.strings||{}; +for(var key in dojo.widget.defaultStrings){ +if(dojo.lang.isUndefined(hash[key])){ +hash[key]=dojo.widget.defaultStrings[key]; +} +} +for(var i=0;i<_79d.length;i++){ +var key=_79d[i]; +key=key.substring(2,key.length-1); +var kval=(key.substring(0,5)=="this.")?dojo.lang.getObjPathValue(key.substring(5),this):hash[key]; +var _7a4; +if((kval)||(dojo.lang.isString(kval))){ +_7a4=new String((dojo.lang.isFunction(kval))?kval.call(this,key,this.templateString):kval); +while(_7a4.indexOf("\"")>-1){ +_7a4=_7a4.replace("\"","""); +} +tstr=tstr.replace(_79d[i],_7a4); +} +} +}else{ +this.templateNode=this.createNodesFromText(this.templateString,true)[0]; +if(!_79b){ +ts.node=this.templateNode; +} +} +} +if((!this.templateNode)&&(!_79d)){ +dojo.debug("DomWidget.buildFromTemplate: could not create template"); +return false; +}else{ +if(!_79d){ +node=this.templateNode.cloneNode(true); +if(!node){ +return false; +} +}else{ +node=this.createNodesFromText(tstr,true)[0]; +} +} +this.domNode=node; +this.attachTemplateNodes(); +if(this.isContainer&&this.containerNode){ +var src=this.getFragNodeRef(frag); +if(src){ +dojo.dom.moveChildren(src,this.containerNode); +} +} +},attachTemplateNodes:function(_7a6,_7a7){ +if(!_7a6){ +_7a6=this.domNode; +} +if(!_7a7){ +_7a7=this; +} +return dojo.widget.attachTemplateNodes(_7a6,_7a7,dojo.widget.getDojoEventsFromStr(this.templateString)); +},fillInTemplate:function(){ +},destroyRendering:function(){ +try{ +dojo.dom.destroyNode(this.domNode); +delete this.domNode; +} +catch(e){ +} +if(this._sourceNodeRef){ +try{ +dojo.dom.destroyNode(this._sourceNodeRef); +} +catch(e){ +} +} +},createNodesFromText:function(){ +dojo.unimplemented("dojo.widget.DomWidget.createNodesFromText"); +}}); +dojo.provide("dojo.html.util"); +dojo.html.getElementWindow=function(_7a8){ +return dojo.html.getDocumentWindow(_7a8.ownerDocument); +}; +dojo.html.getDocumentWindow=function(doc){ +if(dojo.render.html.safari&&!doc._parentWindow){ +var fix=function(win){ +win.document._parentWindow=win; +for(var i=0;i=left&&_7b7.x<=_7bd&&_7b7.y>=top&&_7b7.y<=_7bb); +}; +dojo.html.renderedTextContent=function(node){ +node=dojo.byId(node); +var _7bf=""; +if(node==null){ +return _7bf; +} +for(var i=0;i]/i).test(txt.replace(/^\s+/))){ +txt=""+txt+"
    "; +_7c8="cell"; +}else{ +if((/^]/i).test(txt.replace(/^\s+/))){ +txt=""+txt+"
    "; +_7c8="row"; +}else{ +if((/^<(thead|tbody|tfoot)[\s\r\n>]/i).test(txt.replace(/^\s+/))){ +txt=""+txt+"
    "; +_7c8="section"; +} +} +} +tn.innerHTML=txt; +if(tn["normalize"]){ +tn.normalize(); +} +var _7c9=null; +switch(_7c8){ +case "cell": +_7c9=tn.getElementsByTagName("tr")[0]; +break; +case "row": +_7c9=tn.getElementsByTagName("tbody")[0]; +break; +case "section": +_7c9=tn.getElementsByTagName("table")[0]; +break; +default: +_7c9=tn; +break; +} +var _7ca=[]; +for(var x=0;x<_7c9.childNodes.length;x++){ +_7ca.push(_7c9.childNodes[x].cloneNode(true)); +} +tn.style.display="none"; +dojo.html.destroyNode(tn); +return _7ca; +}; +dojo.html.placeOnScreen=function(node,_7cd,_7ce,_7cf,_7d0,_7d1,_7d2){ +if(_7cd instanceof Array||typeof _7cd=="array"){ +_7d2=_7d1; +_7d1=_7d0; +_7d0=_7cf; +_7cf=_7ce; +_7ce=_7cd[1]; +_7cd=_7cd[0]; +} +if(_7d1 instanceof String||typeof _7d1=="string"){ +_7d1=_7d1.split(","); +} +if(!isNaN(_7cf)){ +_7cf=[Number(_7cf),Number(_7cf)]; +}else{ +if(!(_7cf instanceof Array||typeof _7cf=="array")){ +_7cf=[0,0]; +} +} +var _7d3=dojo.html.getScroll().offset; +var view=dojo.html.getViewport(); +node=dojo.byId(node); +var _7d5=node.style.display; +node.style.display=""; +var bb=dojo.html.getBorderBox(node); +var w=bb.width; +var h=bb.height; +node.style.display=_7d5; +if(!(_7d1 instanceof Array||typeof _7d1=="array")){ +_7d1=["TL"]; +} +var _7d9,_7da,_7db=Infinity,_7dc; +for(var _7dd=0;_7dd<_7d1.length;++_7dd){ +var _7de=_7d1[_7dd]; +var _7df=true; +var tryX=_7cd-(_7de.charAt(1)=="L"?0:w)+_7cf[0]*(_7de.charAt(1)=="L"?1:-1); +var tryY=_7ce-(_7de.charAt(0)=="T"?0:h)+_7cf[1]*(_7de.charAt(0)=="T"?1:-1); +if(_7d0){ +tryX-=_7d3.x; +tryY-=_7d3.y; +} +if(tryX<0){ +tryX=0; +_7df=false; +} +if(tryY<0){ +tryY=0; +_7df=false; +} +var x=tryX+w; +if(x>view.width){ +x=view.width-w; +_7df=false; +}else{ +x=tryX; +} +x=Math.max(_7cf[0],x)+_7d3.x; +var y=tryY+h; +if(y>view.height){ +y=view.height-h; +_7df=false; +}else{ +y=tryY; +} +y=Math.max(_7cf[1],y)+_7d3.y; +if(_7df){ +_7d9=x; +_7da=y; +_7db=0; +_7dc=_7de; +break; +}else{ +var dist=Math.pow(x-tryX-_7d3.x,2)+Math.pow(y-tryY-_7d3.y,2); +if(_7db>dist){ +_7db=dist; +_7d9=x; +_7da=y; +_7dc=_7de; +} +} +} +if(!_7d2){ +node.style.left=_7d9+"px"; +node.style.top=_7da+"px"; +} +return {left:_7d9,top:_7da,x:_7d9,y:_7da,dist:_7db,corner:_7dc}; +}; +dojo.html.placeOnScreenPoint=function(node,_7e6,_7e7,_7e8,_7e9){ +dojo.deprecated("dojo.html.placeOnScreenPoint","use dojo.html.placeOnScreen() instead","0.5"); +return dojo.html.placeOnScreen(node,_7e6,_7e7,_7e8,_7e9,["TL","TR","BL","BR"]); +}; +dojo.html.placeOnScreenAroundElement=function(node,_7eb,_7ec,_7ed,_7ee,_7ef){ +var best,_7f1=Infinity; +_7eb=dojo.byId(_7eb); +var _7f2=_7eb.style.display; +_7eb.style.display=""; +var mb=dojo.html.getElementBox(_7eb,_7ed); +var _7f4=mb.width; +var _7f5=mb.height; +var _7f6=dojo.html.getAbsolutePosition(_7eb,true,_7ed); +_7eb.style.display=_7f2; +for(var _7f7 in _7ee){ +var pos,_7f9,_7fa; +var _7fb=_7ee[_7f7]; +_7f9=_7f6.x+(_7f7.charAt(1)=="L"?0:_7f4); +_7fa=_7f6.y+(_7f7.charAt(0)=="T"?0:_7f5); +pos=dojo.html.placeOnScreen(node,_7f9,_7fa,_7ec,true,_7fb,true); +if(pos.dist==0){ +best=pos; +break; +}else{ +if(_7f1>pos.dist){ +_7f1=pos.dist; +best=pos; +} +} +} +if(!_7ef){ +node.style.left=best.left+"px"; +node.style.top=best.top+"px"; +} +return best; +}; +dojo.html.scrollIntoView=function(node){ +if(!node){ +return; +} +if(dojo.render.html.ie){ +if(dojo.html.getBorderBox(node.parentNode).height<=node.parentNode.scrollHeight){ +node.scrollIntoView(false); +} +}else{ +if(dojo.render.html.mozilla){ +node.scrollIntoView(false); +}else{ +var _7fd=node.parentNode; +var _7fe=_7fd.scrollTop+dojo.html.getBorderBox(_7fd).height; +var _7ff=node.offsetTop+dojo.html.getMarginBox(node).height; +if(_7fe<_7ff){ +_7fd.scrollTop+=(_7ff-_7fe); +}else{ +if(_7fd.scrollTop>node.offsetTop){ +_7fd.scrollTop-=(_7fd.scrollTop-node.offsetTop); +} +} +} +} +}; +dojo.provide("dojo.lfx.toggle"); +dojo.lfx.toggle.plain={show:function(node,_801,_802,_803){ +dojo.html.show(node); +if(dojo.lang.isFunction(_803)){ +_803(); +} +},hide:function(node,_805,_806,_807){ +dojo.html.hide(node); +if(dojo.lang.isFunction(_807)){ +_807(); +} +}}; +dojo.lfx.toggle.fade={show:function(node,_809,_80a,_80b){ +dojo.lfx.fadeShow(node,_809,_80a,_80b).play(); +},hide:function(node,_80d,_80e,_80f){ +dojo.lfx.fadeHide(node,_80d,_80e,_80f).play(); +}}; +dojo.lfx.toggle.wipe={show:function(node,_811,_812,_813){ +dojo.lfx.wipeIn(node,_811,_812,_813).play(); +},hide:function(node,_815,_816,_817){ +dojo.lfx.wipeOut(node,_815,_816,_817).play(); +}}; +dojo.lfx.toggle.explode={show:function(node,_819,_81a,_81b,_81c){ +dojo.lfx.explode(_81c||{x:0,y:0,width:0,height:0},node,_819,_81a,_81b).play(); +},hide:function(node,_81e,_81f,_820,_821){ +dojo.lfx.implode(node,_821||{x:0,y:0,width:0,height:0},_81e,_81f,_820).play(); +}}; +dojo.provide("dojo.widget.HtmlWidget"); +dojo.declare("dojo.widget.HtmlWidget",dojo.widget.DomWidget,{templateCssPath:null,templatePath:null,lang:"",toggle:"plain",toggleDuration:150,initialize:function(args,frag){ +},postMixInProperties:function(args,frag){ +if(this.lang===""){ +this.lang=null; +} +this.toggleObj=dojo.lfx.toggle[this.toggle.toLowerCase()]||dojo.lfx.toggle.plain; +},createNodesFromText:function(txt,wrap){ +return dojo.html.createNodesFromText(txt,wrap); +},destroyRendering:function(_828){ +try{ +if(this.bgIframe){ +this.bgIframe.remove(); +delete this.bgIframe; +} +if(!_828&&this.domNode){ +dojo.event.browser.clean(this.domNode); +} +dojo.widget.HtmlWidget.superclass.destroyRendering.call(this); +} +catch(e){ +} +},isShowing:function(){ +return dojo.html.isShowing(this.domNode); +},toggleShowing:function(){ +if(this.isShowing()){ +this.hide(); +}else{ +this.show(); +} +},show:function(){ +if(this.isShowing()){ +return; +} +this.animationInProgress=true; +this.toggleObj.show(this.domNode,this.toggleDuration,null,dojo.lang.hitch(this,this.onShow),this.explodeSrc); +},onShow:function(){ +this.animationInProgress=false; +this.checkSize(); +},hide:function(){ +if(!this.isShowing()){ +return; +} +this.animationInProgress=true; +this.toggleObj.hide(this.domNode,this.toggleDuration,null,dojo.lang.hitch(this,this.onHide),this.explodeSrc); +},onHide:function(){ +this.animationInProgress=false; +},_isResized:function(w,h){ +if(!this.isShowing()){ +return false; +} +var wh=dojo.html.getMarginBox(this.domNode); +var _82c=w||wh.width; +var _82d=h||wh.height; +if(this.width==_82c&&this.height==_82d){ +return false; +} +this.width=_82c; +this.height=_82d; +return true; +},checkSize:function(){ +if(!this._isResized()){ +return; +} +this.onResized(); +},resizeTo:function(w,h){ +dojo.html.setMarginBox(this.domNode,{width:w,height:h}); +if(this.isShowing()){ +this.onResized(); +} +},resizeSoon:function(){ +if(this.isShowing()){ +dojo.lang.setTimeout(this,this.onResized,0); +} +},onResized:function(){ +dojo.lang.forEach(this.children,function(_830){ +if(_830.checkSize){ +_830.checkSize(); +} +}); +}}); +dojo.kwCompoundRequire({common:["dojo.xml.Parse","dojo.widget.Widget","dojo.widget.Parse","dojo.widget.Manager"],browser:["dojo.widget.DomWidget","dojo.widget.HtmlWidget"],dashboard:["dojo.widget.DomWidget","dojo.widget.HtmlWidget"],svg:["dojo.widget.SvgWidget"],rhino:["dojo.widget.SwtWidget"]}); +dojo.provide("dojo.widget.*"); +dojo.kwCompoundRequire({common:["dojo.html.common","dojo.html.style"]}); +dojo.provide("dojo.html.*"); +dojo.provide("dojo.html.selection"); +dojo.html.selectionType={NONE:0,TEXT:1,CONTROL:2}; +dojo.html.clearSelection=function(){ +var _831=dojo.global(); +var _832=dojo.doc(); +try{ +if(_831["getSelection"]){ +if(dojo.render.html.safari){ +_831.getSelection().collapse(); +}else{ +_831.getSelection().removeAllRanges(); +} +}else{ +if(_832.selection){ +if(_832.selection.empty){ +_832.selection.empty(); +}else{ +if(_832.selection.clear){ +_832.selection.clear(); +} +} +} +} +return true; +} +catch(e){ +dojo.debug(e); +return false; +} +}; +dojo.html.disableSelection=function(_833){ +_833=dojo.byId(_833)||dojo.body(); +var h=dojo.render.html; +if(h.mozilla){ +_833.style.MozUserSelect="none"; +}else{ +if(h.safari){ +_833.style.KhtmlUserSelect="none"; +}else{ +if(h.ie){ +_833.unselectable="on"; +}else{ +return false; +} +} +} +return true; +}; +dojo.html.enableSelection=function(_835){ +_835=dojo.byId(_835)||dojo.body(); +var h=dojo.render.html; +if(h.mozilla){ +_835.style.MozUserSelect=""; +}else{ +if(h.safari){ +_835.style.KhtmlUserSelect=""; +}else{ +if(h.ie){ +_835.unselectable="off"; +}else{ +return false; +} +} +} +return true; +}; +dojo.html.selectElement=function(_837){ +dojo.deprecated("dojo.html.selectElement","replaced by dojo.html.selection.selectElementChildren",0.5); +}; +dojo.html.selectInputText=function(_838){ +var _839=dojo.global(); +var _83a=dojo.doc(); +_838=dojo.byId(_838); +if(_83a["selection"]&&dojo.body()["createTextRange"]){ +var _83b=_838.createTextRange(); +_83b.moveStart("character",0); +_83b.moveEnd("character",_838.value.length); +_83b.select(); +}else{ +if(_839["getSelection"]){ +var _83c=_839.getSelection(); +_838.setSelectionRange(0,_838.value.length); +} +} +_838.focus(); +}; +dojo.html.isSelectionCollapsed=function(){ +dojo.deprecated("dojo.html.isSelectionCollapsed","replaced by dojo.html.selection.isCollapsed",0.5); +return dojo.html.selection.isCollapsed(); +}; +dojo.lang.mixin(dojo.html.selection,{getType:function(){ +if(dojo.doc()["selection"]){ +return dojo.html.selectionType[dojo.doc().selection.type.toUpperCase()]; +}else{ +var _83d=dojo.html.selectionType.TEXT; +var oSel; +try{ +oSel=dojo.global().getSelection(); +} +catch(e){ +} +if(oSel&&oSel.rangeCount==1){ +var _83f=oSel.getRangeAt(0); +if(_83f.startContainer==_83f.endContainer&&(_83f.endOffset-_83f.startOffset)==1&&_83f.startContainer.nodeType!=dojo.dom.TEXT_NODE){ +_83d=dojo.html.selectionType.CONTROL; +} +} +return _83d; +} +},isCollapsed:function(){ +var _840=dojo.global(); +var _841=dojo.doc(); +if(_841["selection"]){ +return _841.selection.createRange().text==""; +}else{ +if(_840["getSelection"]){ +var _842=_840.getSelection(); +if(dojo.lang.isString(_842)){ +return _842==""; +}else{ +return _842.isCollapsed||_842.toString()==""; +} +} +} +},getSelectedElement:function(){ +if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){ +if(dojo.doc()["selection"]){ +var _843=dojo.doc().selection.createRange(); +if(_843&&_843.item){ +return dojo.doc().selection.createRange().item(0); +} +}else{ +var _844=dojo.global().getSelection(); +return _844.anchorNode.childNodes[_844.anchorOffset]; +} +} +},getParentElement:function(){ +if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){ +var p=dojo.html.selection.getSelectedElement(); +if(p){ +return p.parentNode; +} +}else{ +if(dojo.doc()["selection"]){ +return dojo.doc().selection.createRange().parentElement(); +}else{ +var _846=dojo.global().getSelection(); +if(_846){ +var node=_846.anchorNode; +while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){ +node=node.parentNode; +} +return node; +} +} +} +},getSelectedText:function(){ +if(dojo.doc()["selection"]){ +if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){ +return null; +} +return dojo.doc().selection.createRange().text; +}else{ +var _848=dojo.global().getSelection(); +if(_848){ +return _848.toString(); +} +} +},getSelectedHtml:function(){ +if(dojo.doc()["selection"]){ +if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){ +return null; +} +return dojo.doc().selection.createRange().htmlText; +}else{ +var _849=dojo.global().getSelection(); +if(_849&&_849.rangeCount){ +var frag=_849.getRangeAt(0).cloneContents(); +var div=document.createElement("div"); +div.appendChild(frag); +return div.innerHTML; +} +return null; +} +},hasAncestorElement:function(_84c){ +return (dojo.html.selection.getAncestorElement.apply(this,arguments)!=null); +},getAncestorElement:function(_84d){ +var node=dojo.html.selection.getSelectedElement()||dojo.html.selection.getParentElement(); +while(node){ +if(dojo.html.selection.isTag(node,arguments).length>0){ +return node; +} +node=node.parentNode; +} +return null; +},isTag:function(node,tags){ +if(node&&node.tagName){ +for(var i=0;i=0)){ +this._fire(); +} +},_continue:function(res){ +this._resback(res); +this._unpause(); +},_resback:function(res){ +this.fired=((res instanceof Error)?1:0); +this.results[this.fired]=res; +this._fire(); +},_check:function(){ +if(this.fired!=-1){ +if(!this.silentlyCancelled){ +dojo.raise("already called!"); +} +this.silentlyCancelled=false; +return; +} +},callback:function(res){ +this._check(); +this._resback(res); +},errback:function(res){ +this._check(); +if(!(res instanceof Error)){ +res=new Error(res); +} +this._resback(res); +},addBoth:function(cb,cbfn){ +var _874=this.getFunctionFromArgs(cb,cbfn); +if(arguments.length>2){ +_874=dojo.lang.curryArguments(null,_874,arguments,2); +} +return this.addCallbacks(_874,_874); +},addCallback:function(cb,cbfn){ +var _877=this.getFunctionFromArgs(cb,cbfn); +if(arguments.length>2){ +_877=dojo.lang.curryArguments(null,_877,arguments,2); +} +return this.addCallbacks(_877,null); +},addErrback:function(cb,cbfn){ +var _87a=this.getFunctionFromArgs(cb,cbfn); +if(arguments.length>2){ +_87a=dojo.lang.curryArguments(null,_87a,arguments,2); +} +return this.addCallbacks(null,_87a); +return this.addCallbacks(null,cbfn); +},addCallbacks:function(cb,eb){ +this.chain.push([cb,eb]); +if(this.fired>=0){ +this._fire(); +} +return this; +},_fire:function(){ +var _87d=this.chain; +var _87e=this.fired; +var res=this.results[_87e]; +var self=this; +var cb=null; +while(_87d.length>0&&this.paused==0){ +var pair=_87d.shift(); +var f=pair[_87e]; +if(f==null){ +continue; +} +try{ +res=f(res); +_87e=((res instanceof Error)?1:0); +if(res instanceof dojo.Deferred){ +cb=function(res){ +self._continue(res); +}; +this._pause(); +} +} +catch(err){ +_87e=1; +res=err; +} +} +this.fired=_87e; +this.results[_87e]=res; +if((cb)&&(this.paused)){ +res.addBoth(cb); +} +}}); +dojo.provide("dojo.widget.RichText"); +if(!djConfig["useXDomain"]||djConfig["allowXdRichTextSave"]){ +if(dojo.hostenv.post_load_){ +(function(){ +var _885=dojo.doc().createElement("textarea"); +_885.id="dojo.widget.RichText.savedContent"; +_885.style="display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;"; +dojo.body().appendChild(_885); +})(); +}else{ +try{ +dojo.doc().write(""); +} +catch(e){ +} +} +} +dojo.widget.defineWidget("dojo.widget.RichText",dojo.widget.HtmlWidget,function(){ +this.contentPreFilters=[]; +this.contentPostFilters=[]; +this.contentDomPreFilters=[]; +this.contentDomPostFilters=[]; +this.editingAreaStyleSheets=[]; +if(dojo.render.html.moz){ +this.contentPreFilters.push(this._fixContentForMoz); +} +this._keyHandlers={}; +if(dojo.Deferred){ +this.onLoadDeferred=new dojo.Deferred(); +} +},{inheritWidth:false,focusOnLoad:false,saveName:"",styleSheets:"",_content:"",height:"",minHeight:"1em",isClosed:true,isLoaded:false,useActiveX:false,relativeImageUrls:false,_SEPARATOR:"@@**%%__RICHTEXTBOUNDRY__%%**@@",onLoadDeferred:null,fillInTemplate:function(){ +dojo.event.topic.publish("dojo.widget.RichText::init",this); +this.open(); +dojo.event.connect(this,"onKeyPressed",this,"afterKeyPress"); +dojo.event.connect(this,"onKeyPress",this,"keyPress"); +dojo.event.connect(this,"onKeyDown",this,"keyDown"); +dojo.event.connect(this,"onKeyUp",this,"keyUp"); +this.setupDefaultShortcuts(); +},setupDefaultShortcuts:function(){ +var ctrl=this.KEY_CTRL; +var exec=function(cmd,arg){ +return arguments.length==1?function(){ +this.execCommand(cmd); +}:function(){ +this.execCommand(cmd,arg); +}; +}; +this.addKeyHandler("b",ctrl,exec("bold")); +this.addKeyHandler("i",ctrl,exec("italic")); +this.addKeyHandler("u",ctrl,exec("underline")); +this.addKeyHandler("a",ctrl,exec("selectall")); +this.addKeyHandler("s",ctrl,function(){ +this.save(true); +}); +this.addKeyHandler("1",ctrl,exec("formatblock","h1")); +this.addKeyHandler("2",ctrl,exec("formatblock","h2")); +this.addKeyHandler("3",ctrl,exec("formatblock","h3")); +this.addKeyHandler("4",ctrl,exec("formatblock","h4")); +this.addKeyHandler("\\",ctrl,exec("insertunorderedlist")); +if(!dojo.render.html.ie){ +this.addKeyHandler("Z",ctrl,exec("redo")); +} +},events:["onBlur","onFocus","onKeyPress","onKeyDown","onKeyUp","onClick"],open:function(_88a){ +if(this.onLoadDeferred.fired>=0){ +this.onLoadDeferred=new dojo.Deferred(); +} +var h=dojo.render.html; +if(!this.isClosed){ +this.close(); +} +dojo.event.topic.publish("dojo.widget.RichText::open",this); +this._content=""; +if((arguments.length==1)&&(_88a["nodeName"])){ +this.domNode=_88a; +} +if((this.domNode["nodeName"])&&(this.domNode.nodeName.toLowerCase()=="textarea")){ +this.textarea=this.domNode; +var html=this._preFilterContent(this.textarea.value); +this.domNode=dojo.doc().createElement("div"); +dojo.html.copyStyle(this.domNode,this.textarea); +var _88d=dojo.lang.hitch(this,function(){ +with(this.textarea.style){ +display="block"; +position="absolute"; +left=top="-1000px"; +if(h.ie){ +this.__overflow=overflow; +overflow="hidden"; +} +} +}); +if(h.ie){ +setTimeout(_88d,10); +}else{ +_88d(); +} +if(!h.safari){ +dojo.html.insertBefore(this.domNode,this.textarea); +} +if(this.textarea.form){ +dojo.event.connect("before",this.textarea.form,"onsubmit",dojo.lang.hitch(this,function(){ +this.textarea.value=this.getEditorContent(); +})); +} +var _88e=this; +dojo.event.connect(this,"postCreate",function(){ +dojo.html.insertAfter(_88e.textarea,_88e.domNode); +}); +}else{ +var html=this._preFilterContent(dojo.string.trim(this.domNode.innerHTML)); +} +if(html==""){ +html=" "; +} +var _88f=dojo.html.getContentBox(this.domNode); +this._oldHeight=_88f.height; +this._oldWidth=_88f.width; +this._firstChildContributingMargin=this._getContributingMargin(this.domNode,"top"); +this._lastChildContributingMargin=this._getContributingMargin(this.domNode,"bottom"); +this.savedContent=html; +this.domNode.innerHTML=""; +this.editingArea=dojo.doc().createElement("div"); +this.domNode.appendChild(this.editingArea); +if((this.domNode["nodeName"])&&(this.domNode.nodeName=="LI")){ +this.domNode.innerHTML="
    "; +} +if(this.saveName!=""&&(!djConfig["useXDomain"]||djConfig["allowXdRichTextSave"])){ +var _890=dojo.doc().getElementById("dojo.widget.RichText.savedContent"); +if(_890.value!=""){ +var _891=_890.value.split(this._SEPARATOR); +for(var i=0;i<_891.length;i++){ +var data=_891[i].split(":"); +if(data[0]==this.saveName){ +html=data[1]; +_891.splice(i,1); +break; +} +} +} +dojo.event.connect("before",window,"onunload",this,"_saveContent"); +} +if(h.ie70&&this.useActiveX){ +dojo.debug("activeX in ie70 is not currently supported, useActiveX is ignored for now."); +this.useActiveX=false; +} +if(this.useActiveX&&h.ie){ +var self=this; +setTimeout(function(){ +self._drawObject(html); +},0); +}else{ +if(h.ie||this._safariIsLeopard()||h.opera){ +this.iframe=dojo.doc().createElement("iframe"); +this.iframe.src="javascript:void(0)"; +this.editorObject=this.iframe; +with(this.iframe.style){ +border="0"; +width="100%"; +} +this.iframe.frameBorder=0; +this.editingArea.appendChild(this.iframe); +this.window=this.iframe.contentWindow; +this.document=this.window.document; +this.document.open(); +this.document.write("
    "); +this.document.close(); +this.editNode=this.document.body.firstChild; +this.editNode.contentEditable=true; +with(this.iframe.style){ +if(h.ie70){ +if(this.height){ +height=this.height; +} +if(this.minHeight){ +minHeight=this.minHeight; +} +}else{ +height=this.height?this.height:this.minHeight; +} +} +var _895=["p","pre","address","h1","h2","h3","h4","h5","h6","ol","div","ul"]; +var _896=""; +for(var i in _895){ +if(_895[i].charAt(1)!="l"){ +_896+="<"+_895[i]+">content"; +}else{ +_896+="<"+_895[i]+">
  • content
  • "; +} +} +with(this.editNode.style){ +position="absolute"; +left="-2000px"; +top="-2000px"; +} +this.editNode.innerHTML=_896; +var node=this.editNode.firstChild; +while(node){ +dojo.withGlobal(this.window,"selectElement",dojo.html.selection,[node.firstChild]); +var _898=node.tagName.toLowerCase(); +this._local2NativeFormatNames[_898]=this.queryCommandValue("formatblock"); +this._native2LocalFormatNames[this._local2NativeFormatNames[_898]]=_898; +node=node.nextSibling; +} +with(this.editNode.style){ +position=""; +left=""; +top=""; +} +this.editNode.innerHTML=html; +if(this.height){ +this.document.body.style.overflowY="scroll"; +} +dojo.lang.forEach(this.events,function(e){ +dojo.event.connect(this.editNode,e.toLowerCase(),this,e); +},this); +this.onLoad(); +}else{ +this._drawIframe(html); +this.editorObject=this.iframe; +} +} +if(this.domNode.nodeName=="LI"){ +this.domNode.lastChild.style.marginTop="-1.2em"; +} +dojo.html.addClass(this.domNode,"RichTextEditable"); +this.isClosed=false; +},_hasCollapseableMargin:function(_89a,side){ +if(dojo.html.getPixelValue(_89a,"border-"+side+"-width",false)){ +return false; +}else{ +if(dojo.html.getPixelValue(_89a,"padding-"+side,false)){ +return false; +}else{ +return true; +} +} +},_getContributingMargin:function(_89c,_89d){ +if(_89d=="top"){ +var _89e="previousSibling"; +var _89f="nextSibling"; +var _8a0="firstChild"; +var _8a1="margin-top"; +var _8a2="margin-bottom"; +}else{ +var _89e="nextSibling"; +var _89f="previousSibling"; +var _8a0="lastChild"; +var _8a1="margin-bottom"; +var _8a2="margin-top"; +} +var _8a3=dojo.html.getPixelValue(_89c,_8a1,false); +function isSignificantNode(_8a4){ +return !(_8a4.nodeType==3&&dojo.string.isBlank(_8a4.data))&&dojo.html.getStyle(_8a4,"display")!="none"&&!dojo.html.isPositionAbsolute(_8a4); +} +var _8a5=0; +var _8a6=_89c[_8a0]; +while(_8a6){ +while((!isSignificantNode(_8a6))&&_8a6[_89f]){ +_8a6=_8a6[_89f]; +} +_8a5=Math.max(_8a5,dojo.html.getPixelValue(_8a6,_8a1,false)); +if(!this._hasCollapseableMargin(_8a6,_89d)){ +break; +} +_8a6=_8a6[_8a0]; +} +if(!this._hasCollapseableMargin(_89c,_89d)){ +return parseInt(_8a5); +} +var _8a7=0; +var _8a8=_89c[_89e]; +while(_8a8){ +if(isSignificantNode(_8a8)){ +_8a7=dojo.html.getPixelValue(_8a8,_8a2,false); +break; +} +_8a8=_8a8[_89e]; +} +if(!_8a8){ +_8a7=dojo.html.getPixelValue(_89c.parentNode,_8a1,false); +} +if(_8a5>_8a3){ +return parseInt(Math.max((_8a5-_8a3)-_8a7,0)); +}else{ +return 0; +} +},_drawIframe:function(html){ +var _8aa=Boolean(dojo.render.html.moz&&(typeof window.XML=="undefined")); +if(!this.iframe){ +var _8ab=(new dojo.uri.Uri(dojo.doc().location)).host; +this.iframe=dojo.doc().createElement("iframe"); +with(this.iframe){ +style.border="none"; +style.lineHeight="0"; +style.verticalAlign="bottom"; +scrolling=this.height?"auto":"no"; +} +} +if(djConfig["useXDomain"]&&!djConfig["dojoRichTextFrameUrl"]){ +dojo.debug("dojo.widget.RichText: When using cross-domain Dojo builds,"+" please save src/widget/templates/richtextframe.html to your domain and set djConfig.dojoRichTextFrameUrl"+" to the path on your domain to richtextframe.html"); +} +this.iframe.src=(djConfig["dojoRichTextFrameUrl"]||dojo.uri.moduleUri("dojo.widget","templates/richtextframe.html"))+((dojo.doc().domain!=_8ab)?("#"+dojo.doc().domain):""); +this.iframe.width=this.inheritWidth?this._oldWidth:"100%"; +if(this.height){ +this.iframe.style.height=this.height; +}else{ +var _8ac=this._oldHeight; +if(this._hasCollapseableMargin(this.domNode,"top")){ +_8ac+=this._firstChildContributingMargin; +} +if(this._hasCollapseableMargin(this.domNode,"bottom")){ +_8ac+=this._lastChildContributingMargin; +} +this.iframe.height=_8ac; +} +var _8ad=dojo.doc().createElement("div"); +_8ad.innerHTML=html; +this.editingArea.appendChild(_8ad); +if(this.relativeImageUrls){ +var imgs=_8ad.getElementsByTagName("img"); +for(var i=0;i *:first-child{padding-top:0 !important;margin-top:"+this._firstChildContributingMargin+"px !important;}"+"body > *:last-child{padding-bottom:0 !important;margin-bottom:"+this._lastChildContributingMargin+"px !important;}"+"li > ul:-moz-first-node, li > ol:-moz-first-node{padding-top:1.2em;}\n"+"li{min-height:1.2em;}"+"",this.document); +dojo.html.removeNode(_8ad); +this.document.body.innerHTML=html; +if(_8aa||dojo.render.html.safari){ +this.document.designMode="on"; +} +this.onLoad(); +}else{ +dojo.html.removeNode(_8ad); +this.editNode.innerHTML=html; +this.onDisplayChanged(); +} +}); +if(this.editNode){ +_8b3(); +}else{ +if(dojo.render.html.moz){ +this.iframe.onload=function(){ +setTimeout(_8b3,250); +}; +}else{ +this.iframe.onload=_8b3; +} +} +},_applyEditingAreaStyleSheets:function(){ +var _8ba=[]; +if(this.styleSheets){ +_8ba=this.styleSheets.split(";"); +this.styleSheets=""; +} +_8ba=_8ba.concat(this.editingAreaStyleSheets); +this.editingAreaStyleSheets=[]; +if(_8ba.length>0){ +for(var i=0;i<_8ba.length;i++){ +var url=_8ba[i]; +if(url){ +this.addStyleSheet(dojo.uri.dojoUri(url)); +} +} +} +},addStyleSheet:function(uri){ +var url=uri.toString(); +if(dojo.lang.find(this.editingAreaStyleSheets,url)>-1){ +dojo.debug("dojo.widget.RichText.addStyleSheet: Style sheet "+url+" is already applied to the editing area!"); +return; +} +if(url.charAt(0)=="."||(url.charAt(0)!="/"&&!uri.host)){ +url=(new dojo.uri.Uri(dojo.global().location,url)).toString(); +} +this.editingAreaStyleSheets.push(url); +if(this.document.createStyleSheet){ +this.document.createStyleSheet(url); +}else{ +var head=this.document.getElementsByTagName("head")[0]; +var _8c0=this.document.createElement("link"); +with(_8c0){ +rel="stylesheet"; +type="text/css"; +href=url; +} +head.appendChild(_8c0); +} +},removeStyleSheet:function(uri){ +var url=uri.toString(); +if(url.charAt(0)=="."||(url.charAt(0)!="/"&&!uri.host)){ +url=(new dojo.uri.Uri(dojo.global().location,url)).toString(); +} +var _8c3=dojo.lang.find(this.editingAreaStyleSheets,url); +if(_8c3==-1){ +dojo.debug("dojo.widget.RichText.removeStyleSheet: Style sheet "+url+" is not applied to the editing area so it can not be removed!"); +return; +} +delete this.editingAreaStyleSheets[_8c3]; +var _8c4=this.document.getElementsByTagName("link"); +for(var i=0;i<_8c4.length;i++){ +if(_8c4[i].href==url){ +if(dojo.render.html.ie){ +_8c4[i].href=""; +} +dojo.html.removeNode(_8c4[i]); +break; +} +} +},_drawObject:function(html){ +this.object=dojo.html.createExternalElement(dojo.doc(),"object"); +with(this.object){ +classid="clsid:2D360201-FFF5-11D1-8D03-00A0C959BC0A"; +width=this.inheritWidth?this._oldWidth:"100%"; +style.height=this.height?this.height:(this._oldHeight+"px"); +Scrollbars=this.height?true:false; +Appearance=this._activeX.appearance.flat; +} +this.editorObject=this.object; +this.editingArea.appendChild(this.object); +this.object.attachEvent("DocumentComplete",dojo.lang.hitch(this,"onLoad")); +dojo.lang.forEach(this.events,function(e){ +this.object.attachEvent(e.toLowerCase(),dojo.lang.hitch(this,e)); +},this); +this.object.DocumentHTML=""+""+""+"
    "+html+"
    "; +this._cacheLocalBlockFormatNames(); +},_local2NativeFormatNames:{},_native2LocalFormatNames:{},_cacheLocalBlockFormatNames:function(){ +if(!this._native2LocalFormatNames["p"]){ +var obj=this.object; +var _8c9=false; +if(!obj){ +try{ +obj=dojo.html.createExternalElement(dojo.doc(),"object"); +obj.classid="clsid:2D360201-FFF5-11D1-8D03-00A0C959BC0A"; +dojo.body().appendChild(obj); +obj.DocumentHTML=""; +} +catch(e){ +_8c9=true; +} +} +try{ +var _8ca=new ActiveXObject("DEGetBlockFmtNamesParam.DEGetBlockFmtNamesParam"); +obj.ExecCommand(this._activeX.command["getblockformatnames"],0,_8ca); +var _8cb=new VBArray(_8ca.Names); +var _8cc=_8cb.toArray(); +var _8cd=["p","pre","address","h1","h2","h3","h4","h5","h6","ol","ul","","","","","div"]; +for(var i=0;i<_8cd.length;++i){ +if(_8cd[i].length>0){ +this._local2NativeFormatNames[_8cc[i]]=_8cd[i]; +this._native2LocalFormatNames[_8cd[i]]=_8cc[i]; +} +} +} +catch(e){ +_8c9=true; +} +if(obj&&!this.object){ +dojo.body().removeChild(obj); +} +} +return !_8c9; +},_isResized:function(){ +return false; +},onLoad:function(e){ +this.isLoaded=true; +if(this.object){ +this.document=this.object.DOM; +this.window=this.document.parentWindow; +this.editNode=this.document.body.firstChild; +this.editingArea.style.height=this.height?this.height:this.minHeight; +if(!this.height){ +this.connect(this,"onDisplayChanged","_updateHeight"); +} +this.window._frameElement=this.object; +}else{ +if(this.iframe&&!dojo.render.html.ie){ +this.editNode=this.document.body; +if(!this.height){ +this.connect(this,"onDisplayChanged","_updateHeight"); +} +try{ +this.document.execCommand("useCSS",false,true); +this.document.execCommand("styleWithCSS",false,false); +} +catch(e2){ +} +if(dojo.render.html.safari){ +this.connect(this.editNode,"onblur","onBlur"); +this.connect(this.editNode,"onfocus","onFocus"); +this.connect(this.editNode,"onclick","onFocus"); +this.interval=setInterval(dojo.lang.hitch(this,"onDisplayChanged"),750); +}else{ +if(dojo.render.html.mozilla||dojo.render.html.opera){ +var doc=this.document; +var _8d1=dojo.event.browser.addListener; +var self=this; +dojo.lang.forEach(this.events,function(e){ +var l=_8d1(self.document,e.substr(2).toLowerCase(),dojo.lang.hitch(self,e)); +if(e=="onBlur"){ +var _8d5={unBlur:function(e){ +dojo.event.browser.removeListener(doc,"blur",l); +}}; +dojo.event.connect("before",self,"close",_8d5,"unBlur"); +} +}); +} +} +}else{ +if(dojo.render.html.ie){ +if(!this.height){ +this.connect(this,"onDisplayChanged","_updateHeight"); +} +this.editNode.style.zoom=1; +} +} +} +this._applyEditingAreaStyleSheets(); +if(this.focusOnLoad){ +this.focus(); +} +this.onDisplayChanged(e); +if(this.onLoadDeferred){ +this.onLoadDeferred.callback(true); +} +},onKeyDown:function(e){ +if((!e)&&(this.object)){ +e=dojo.event.browser.fixEvent(this.window.event); +} +if((dojo.render.html.ie)&&(e.keyCode==e.KEY_TAB)){ +e.preventDefault(); +e.stopPropagation(); +this.execCommand((e.shiftKey?"outdent":"indent")); +}else{ +if(dojo.render.html.ie){ +if((65<=e.keyCode)&&(e.keyCode<=90)){ +e.charCode=e.keyCode; +this.onKeyPress(e); +} +} +} +},onKeyUp:function(e){ +return; +},KEY_CTRL:1,onKeyPress:function(e){ +if((!e)&&(this.object)){ +e=dojo.event.browser.fixEvent(this.window.event); +} +var _8da=e.ctrlKey?this.KEY_CTRL:0; +if(this._keyHandlers[e.key]){ +var _8db=this._keyHandlers[e.key],i=0,_8dd; +while(_8dd=_8db[i++]){ +if(_8da==_8dd.modifiers){ +e.preventDefault(); +_8dd.handler.call(this); +break; +} +} +} +dojo.lang.setTimeout(this,this.onKeyPressed,1,e); +},addKeyHandler:function(key,_8df,_8e0){ +if(!(this._keyHandlers[key] instanceof Array)){ +this._keyHandlers[key]=[]; +} +this._keyHandlers[key].push({modifiers:_8df||0,handler:_8e0}); +},onKeyPressed:function(e){ +this.onDisplayChanged(); +},onClick:function(e){ +this.onDisplayChanged(e); +},onBlur:function(e){ +},_initialFocus:true,onFocus:function(e){ +if((dojo.render.html.mozilla)&&(this._initialFocus)){ +this._initialFocus=false; +if(dojo.string.trim(this.editNode.innerHTML)==" "){ +this.placeCursorAtStart(); +} +} +},blur:function(){ +if(this.iframe){ +this.window.blur(); +}else{ +if(this.object){ +this.document.body.blur(); +}else{ +if(this.editNode){ +this.editNode.blur(); +} +} +} +},focus:function(){ +if(this.iframe&&!dojo.render.html.ie){ +this.window.focus(); +}else{ +if(this.object){ +this.document.focus(); +}else{ +if(this.editNode&&this.editNode.focus){ +this.editNode.focus(); +}else{ +dojo.debug("Have no idea how to focus into the editor!"); +} +} +} +},onDisplayChanged:function(e){ +},_activeX:{command:{bold:5000,italic:5023,underline:5048,justifycenter:5024,justifyleft:5025,justifyright:5026,cut:5003,copy:5002,paste:5032,"delete":5004,undo:5049,redo:5033,removeformat:5034,selectall:5035,unlink:5050,indent:5018,outdent:5031,insertorderedlist:5030,insertunorderedlist:5051,inserttable:5022,insertcell:5019,insertcol:5020,insertrow:5021,deletecells:5005,deletecols:5006,deleterows:5007,mergecells:5029,splitcell:5047,setblockformat:5043,getblockformat:5011,getblockformatnames:5012,setfontname:5044,getfontname:5013,setfontsize:5045,getfontsize:5014,setbackcolor:5042,getbackcolor:5010,setforecolor:5046,getforecolor:5015,findtext:5008,font:5009,hyperlink:5016,image:5017,lockelement:5027,makeabsolute:5028,sendbackward:5036,bringforward:5037,sendbelowtext:5038,bringabovetext:5039,sendtoback:5040,bringtofront:5041,properties:5052},ui:{"default":0,prompt:1,noprompt:2},status:{notsupported:0,disabled:1,enabled:3,latched:7,ninched:11},appearance:{flat:0,inset:1},state:{unchecked:0,checked:1,gray:2}},_normalizeCommand:function(cmd){ +var drh=dojo.render.html; +var _8e8=cmd.toLowerCase(); +if(_8e8=="formatblock"){ +if(drh.safari){ +_8e8="heading"; +} +}else{ +if(this.object){ +switch(_8e8){ +case "createlink": +_8e8="hyperlink"; +break; +case "insertimage": +_8e8="image"; +break; +} +}else{ +if(_8e8=="hilitecolor"&&!drh.mozilla){ +_8e8="backcolor"; +} +} +} +return _8e8; +},_safariIsLeopard:function(){ +var _8e9=false; +if(dojo.render.html.safari){ +var tmp=dojo.render.html.UA.split("AppleWebKit/")[1]; +var ver=parseFloat(tmp.split(" ")[0]); +if(ver>=420){ +_8e9=true; +} +} +return _8e9; +},queryCommandAvailable:function(_8ec){ +var ie=1; +var _8ee=1<<1; +var _8ef=1<<2; +var _8f0=1<<3; +var _8f1=1<<4; +var _8f2=this._safariIsLeopard(); +function isSupportedBy(_8f3){ +return {ie:Boolean(_8f3&ie),mozilla:Boolean(_8f3&_8ee),safari:Boolean(_8f3&_8ef),safari420:Boolean(_8f3&_8f1),opera:Boolean(_8f3&_8f0)}; +} +var _8f4=null; +switch(_8ec.toLowerCase()){ +case "bold": +case "italic": +case "underline": +case "subscript": +case "superscript": +case "fontname": +case "fontsize": +case "forecolor": +case "hilitecolor": +case "justifycenter": +case "justifyfull": +case "justifyleft": +case "justifyright": +case "delete": +case "selectall": +_8f4=isSupportedBy(_8ee|ie|_8ef|_8f0); +break; +case "createlink": +case "unlink": +case "removeformat": +case "inserthorizontalrule": +case "insertimage": +case "insertorderedlist": +case "insertunorderedlist": +case "indent": +case "outdent": +case "formatblock": +case "inserthtml": +case "undo": +case "redo": +case "strikethrough": +_8f4=isSupportedBy(_8ee|ie|_8f0|_8f1); +break; +case "blockdirltr": +case "blockdirrtl": +case "dirltr": +case "dirrtl": +case "inlinedirltr": +case "inlinedirrtl": +_8f4=isSupportedBy(ie); +break; +case "cut": +case "copy": +case "paste": +_8f4=isSupportedBy(ie|_8ee|_8f1); +break; +case "inserttable": +_8f4=isSupportedBy(_8ee|(this.object?ie:0)); +break; +case "insertcell": +case "insertcol": +case "insertrow": +case "deletecells": +case "deletecols": +case "deleterows": +case "mergecells": +case "splitcell": +_8f4=isSupportedBy(this.object?ie:0); +break; +default: +return false; +} +return (dojo.render.html.ie&&_8f4.ie)||(dojo.render.html.mozilla&&_8f4.mozilla)||(dojo.render.html.safari&&_8f4.safari)||(_8f2&&_8f4.safari420)||(dojo.render.html.opera&&_8f4.opera); +},execCommand:function(_8f5,_8f6){ +var _8f7; +this.focus(); +_8f5=this._normalizeCommand(_8f5); +if(_8f6!=undefined){ +if(_8f5=="heading"){ +throw new Error("unimplemented"); +}else{ +if(_8f5=="formatblock"){ +if(this.object){ +_8f6=this._native2LocalFormatNames[_8f6]; +}else{ +if(dojo.render.html.ie){ +_8f6="<"+_8f6+">"; +} +} +} +} +} +if(this.object){ +switch(_8f5){ +case "hilitecolor": +_8f5="setbackcolor"; +break; +case "forecolor": +case "backcolor": +case "fontsize": +case "fontname": +_8f5="set"+_8f5; +break; +case "formatblock": +_8f5="setblockformat"; +} +if(_8f5=="strikethrough"){ +_8f5="inserthtml"; +var _8f8=this.document.selection.createRange(); +if(!_8f8.htmlText){ +return; +} +_8f6=_8f8.htmlText.strike(); +}else{ +if(_8f5=="inserthorizontalrule"){ +_8f5="inserthtml"; +_8f6="
    "; +} +} +if(_8f5=="inserthtml"){ +var _8f8=this.document.selection.createRange(); +if(this.document.selection.type.toUpperCase()=="CONTROL"){ +for(var i=0;i<_8f8.length;i++){ +_8f8.item(i).outerHTML=_8f6; +} +}else{ +_8f8.pasteHTML(_8f6); +_8f8.select(); +} +_8f7=true; +}else{ +if(arguments.length==1){ +_8f7=this.object.ExecCommand(this._activeX.command[_8f5],this._activeX.ui.noprompt); +}else{ +_8f7=this.object.ExecCommand(this._activeX.command[_8f5],this._activeX.ui.noprompt,_8f6); +} +} +}else{ +if(_8f5=="inserthtml"){ +if(dojo.render.html.ie){ +var _8fa=this.document.selection.createRange(); +_8fa.pasteHTML(_8f6); +_8fa.select(); +return true; +}else{ +return this.document.execCommand(_8f5,false,_8f6); +} +}else{ +if((_8f5=="unlink")&&(this.queryCommandEnabled("unlink"))&&(dojo.render.html.mozilla)){ +var _8fb=this.window.getSelection(); +var _8fc=_8fb.getRangeAt(0); +var _8fd=_8fc.startContainer; +var _8fe=_8fc.startOffset; +var _8ff=_8fc.endContainer; +var _900=_8fc.endOffset; +var a=dojo.withGlobal(this.window,"getAncestorElement",dojo.html.selection,["a"]); +dojo.withGlobal(this.window,"selectElement",dojo.html.selection,[a]); +_8f7=this.document.execCommand("unlink",false,null); +var _8fc=this.document.createRange(); +_8fc.setStart(_8fd,_8fe); +_8fc.setEnd(_8ff,_900); +_8fb.removeAllRanges(); +_8fb.addRange(_8fc); +return _8f7; +}else{ +if((_8f5=="hilitecolor")&&(dojo.render.html.mozilla)){ +this.document.execCommand("useCSS",false,false); +_8f7=this.document.execCommand(_8f5,false,_8f6); +this.document.execCommand("useCSS",false,true); +}else{ +if((dojo.render.html.ie)&&((_8f5=="backcolor")||(_8f5=="forecolor"))){ +_8f6=arguments.length>1?_8f6:null; +_8f7=this.document.execCommand(_8f5,false,_8f6); +}else{ +_8f6=arguments.length>1?_8f6:null; +if(_8f6||_8f5!="createlink"){ +_8f7=this.document.execCommand(_8f5,false,_8f6); +} +} +} +} +} +} +this.onDisplayChanged(); +return _8f7; +},queryCommandEnabled:function(_902){ +_902=this._normalizeCommand(_902); +if(this.object){ +switch(_902){ +case "hilitecolor": +_902="setbackcolor"; +break; +case "forecolor": +case "backcolor": +case "fontsize": +case "fontname": +_902="set"+_902; +break; +case "formatblock": +_902="setblockformat"; +break; +case "strikethrough": +_902="bold"; +break; +case "inserthorizontalrule": +return true; +} +if(typeof this._activeX.command[_902]=="undefined"){ +return false; +} +var _903=this.object.QueryStatus(this._activeX.command[_902]); +return ((_903!=this._activeX.status.notsupported)&&(_903!=this._activeX.status.disabled)); +}else{ +if(dojo.render.html.mozilla){ +if(_902=="unlink"){ +return dojo.withGlobal(this.window,"hasAncestorElement",dojo.html.selection,["a"]); +}else{ +if(_902=="inserttable"){ +return true; +} +} +} +var elem=(dojo.render.html.ie)?this.document.selection.createRange():this.document; +return elem.queryCommandEnabled(_902); +} +},queryCommandState:function(_905){ +_905=this._normalizeCommand(_905); +if(this.object){ +if(_905=="forecolor"){ +_905="setforecolor"; +}else{ +if(_905=="backcolor"){ +_905="setbackcolor"; +}else{ +if(_905=="strikethrough"){ +return dojo.withGlobal(this.window,"hasAncestorElement",dojo.html.selection,["strike"]); +}else{ +if(_905=="inserthorizontalrule"){ +return false; +} +} +} +} +if(typeof this._activeX.command[_905]=="undefined"){ +return null; +} +var _906=this.object.QueryStatus(this._activeX.command[_905]); +return ((_906==this._activeX.status.latched)||(_906==this._activeX.status.ninched)); +}else{ +return this.document.queryCommandState(_905); +} +},queryCommandValue:function(_907){ +_907=this._normalizeCommand(_907); +if(this.object){ +switch(_907){ +case "forecolor": +case "backcolor": +case "fontsize": +case "fontname": +_907="get"+_907; +return this.object.execCommand(this._activeX.command[_907],this._activeX.ui.noprompt); +case "formatblock": +var _908=this.object.execCommand(this._activeX.command["getblockformat"],this._activeX.ui.noprompt); +if(_908){ +return this._local2NativeFormatNames[_908]; +} +} +}else{ +if(dojo.render.html.ie&&_907=="formatblock"){ +return this._local2NativeFormatNames[this.document.queryCommandValue(_907)]||this.document.queryCommandValue(_907); +} +return this.document.queryCommandValue(_907); +} +},placeCursorAtStart:function(){ +this.focus(); +if(dojo.render.html.moz&&this.editNode.firstChild&&this.editNode.firstChild.nodeType!=dojo.dom.TEXT_NODE){ +dojo.withGlobal(this.window,"selectElementChildren",dojo.html.selection,[this.editNode.firstChild]); +}else{ +dojo.withGlobal(this.window,"selectElementChildren",dojo.html.selection,[this.editNode]); +} +dojo.withGlobal(this.window,"collapse",dojo.html.selection,[true]); +},placeCursorAtEnd:function(){ +this.focus(); +if(dojo.render.html.moz&&this.editNode.lastChild&&this.editNode.lastChild.nodeType!=dojo.dom.TEXT_NODE){ +dojo.withGlobal(this.window,"selectElementChildren",dojo.html.selection,[this.editNode.lastChild]); +}else{ +dojo.withGlobal(this.window,"selectElementChildren",dojo.html.selection,[this.editNode]); +} +dojo.withGlobal(this.window,"collapse",dojo.html.selection,[false]); +},replaceEditorContent:function(html){ +html=this._preFilterContent(html); +if(this.isClosed){ +this.domNode.innerHTML=html; +}else{ +if(this.window&&this.window.getSelection&&!dojo.render.html.moz){ +this.editNode.innerHTML=html; +}else{ +if((this.window&&this.window.getSelection)||(this.document&&this.document.selection)){ +this.execCommand("selectall"); +if(dojo.render.html.moz&&!html){ +html=" "; +} +this.execCommand("inserthtml",html); +} +} +} +},_preFilterContent:function(html){ +var ec=html; +dojo.lang.forEach(this.contentPreFilters,function(ef){ +ec=ef(ec); +}); +if(this.contentDomPreFilters.length>0){ +var dom=dojo.doc().createElement("div"); +dom.style.display="none"; +dojo.body().appendChild(dom); +dom.innerHTML=ec; +dojo.lang.forEach(this.contentDomPreFilters,function(ef){ +dom=ef(dom); +}); +ec=dom.innerHTML; +dojo.body().removeChild(dom); +} +return ec; +},_postFilterContent:function(html){ +var ec=html; +if(this.contentDomPostFilters.length>0){ +var dom=this.document.createElement("div"); +dom.innerHTML=ec; +dojo.lang.forEach(this.contentDomPostFilters,function(ef){ +dom=ef(dom); +}); +ec=dom.innerHTML; +} +dojo.lang.forEach(this.contentPostFilters,function(ef){ +ec=ef(ec); +}); +return ec; +},_lastHeight:0,_updateHeight:function(){ +if(!this.isLoaded){ +return; +} +if(this.height){ +return; +} +var _914=dojo.html.getBorderBox(this.editNode).height; +if(!_914){ +_914=dojo.html.getBorderBox(this.document.body).height; +} +if(_914==0){ +dojo.debug("Can not figure out the height of the editing area!"); +return; +} +this._lastHeight=_914; +this.editorObject.style.height=this._lastHeight+"px"; +this.window.scrollTo(0,0); +},_saveContent:function(e){ +var _916=dojo.doc().getElementById("dojo.widget.RichText.savedContent"); +_916.value+=this._SEPARATOR+this.saveName+":"+this.getEditorContent(); +},getEditorContent:function(){ +var ec=""; +try{ +ec=(this._content.length>0)?this._content:this.editNode.innerHTML; +if(dojo.string.trim(ec)==" "){ +ec=""; +} +} +catch(e){ +} +if(dojo.render.html.ie&&!this.object){ +var re=new RegExp("(?:

     

    [\n\r]*)+$","i"); +ec=ec.replace(re,""); +} +ec=this._postFilterContent(ec); +if(this.relativeImageUrls){ +var _919=dojo.global().location.protocol+"//"+dojo.global().location.host; +var _91a=dojo.global().location.pathname; +if(_91a.match(/\/$/)){ +}else{ +var _91b=_91a.split("/"); +if(_91b.length){ +_91b.pop(); +} +_91a=_91b.join("/")+"/"; +} +var _91c=new RegExp("(]* src=[\"'])("+_919+"("+_91a+")?)","ig"); +ec=ec.replace(_91c,"$1"); +} +return ec; +},close:function(save,_91e){ +if(this.isClosed){ +return false; +} +if(arguments.length==0){ +save=true; +} +this._content=this._postFilterContent(this.editNode.innerHTML); +var _91f=(this.savedContent!=this._content); +if(this.interval){ +clearInterval(this.interval); +} +if(dojo.render.html.ie&&!this.object){ +dojo.event.browser.clean(this.editNode); +} +if(this.iframe){ +delete this.iframe; +} +if(this.textarea){ +with(this.textarea.style){ +position=""; +left=top=""; +if(dojo.render.html.ie){ +overflow=this.__overflow; +this.__overflow=null; +} +} +if(save){ +this.textarea.value=this._content; +}else{ +this.textarea.value=this.savedContent; +} +dojo.html.removeNode(this.domNode); +this.domNode=this.textarea; +}else{ +if(save){ +if(dojo.render.html.moz){ +var nc=dojo.doc().createElement("span"); +this.domNode.appendChild(nc); +nc.innerHTML=this.editNode.innerHTML; +}else{ +this.domNode.innerHTML=this._content; +} +}else{ +this.domNode.innerHTML=this.savedContent; +} +} +dojo.html.removeClass(this.domNode,"RichTextEditable"); +this.isClosed=true; +this.isLoaded=false; +delete this.editNode; +if(this.window._frameElement){ +this.window._frameElement=null; +} +this.window=null; +this.document=null; +this.object=null; +this.editingArea=null; +this.editorObject=null; +return _91f; +},destroyRendering:function(){ +},destroy:function(){ +this.destroyRendering(); +if(!this.isClosed){ +this.close(false); +} +dojo.widget.RichText.superclass.destroy.call(this); +},connect:function(_921,_922,_923){ +dojo.event.connect(_921,_922,this,_923); +},disconnect:function(_924,_925,_926){ +dojo.event.disconnect(_924,_925,this,_926); +},disconnectAllWithRoot:function(_927){ +dojo.deprecated("disconnectAllWithRoot","is deprecated. No need to disconnect manually","0.5"); +},_fixContentForMoz:function(html){ +html=html.replace(/])/gi,"/gi,""); +html=html.replace(/])/gi,"/gi,""); +return html; +}}); +dojo.provide("dojo.lang.type"); +dojo.lang.whatAmI=function(_929){ +dojo.deprecated("dojo.lang.whatAmI","use dojo.lang.getType instead","0.5"); +return dojo.lang.getType(_929); +}; +dojo.lang.whatAmI.custom={}; +dojo.lang.getType=function(_92a){ +try{ +if(dojo.lang.isArray(_92a)){ +return "array"; +} +if(dojo.lang.isFunction(_92a)){ +return "function"; +} +if(dojo.lang.isString(_92a)){ +return "string"; +} +if(dojo.lang.isNumber(_92a)){ +return "number"; +} +if(dojo.lang.isBoolean(_92a)){ +return "boolean"; +} +if(dojo.lang.isAlien(_92a)){ +return "alien"; +} +if(dojo.lang.isUndefined(_92a)){ +return "undefined"; +} +for(var name in dojo.lang.whatAmI.custom){ +if(dojo.lang.whatAmI.custom[name](_92a)){ +return name; +} +} +if(dojo.lang.isObject(_92a)){ +return "object"; +} +} +catch(e){ +} +return "unknown"; +}; +dojo.lang.isNumeric=function(_92c){ +return (!isNaN(_92c)&&isFinite(_92c)&&(_92c!=null)&&!dojo.lang.isBoolean(_92c)&&!dojo.lang.isArray(_92c)&&!/^\s*$/.test(_92c)); +}; +dojo.lang.isBuiltIn=function(_92d){ +return (dojo.lang.isArray(_92d)||dojo.lang.isFunction(_92d)||dojo.lang.isString(_92d)||dojo.lang.isNumber(_92d)||dojo.lang.isBoolean(_92d)||(_92d==null)||(_92d instanceof Error)||(typeof _92d=="error")); +}; +dojo.lang.isPureObject=function(_92e){ +return ((_92e!=null)&&dojo.lang.isObject(_92e)&&_92e.constructor==Object); +}; +dojo.lang.isOfType=function(_92f,type,_931){ +var _932=false; +if(_931){ +_932=_931["optional"]; +} +if(_932&&((_92f===null)||dojo.lang.isUndefined(_92f))){ +return true; +} +if(dojo.lang.isArray(type)){ +var _933=type; +for(var i in _933){ +var _935=_933[i]; +if(dojo.lang.isOfType(_92f,_935)){ +return true; +} +} +return false; +}else{ +if(dojo.lang.isString(type)){ +type=type.toLowerCase(); +} +switch(type){ +case Array: +case "array": +return dojo.lang.isArray(_92f); +case Function: +case "function": +return dojo.lang.isFunction(_92f); +case String: +case "string": +return dojo.lang.isString(_92f); +case Number: +case "number": +return dojo.lang.isNumber(_92f); +case "numeric": +return dojo.lang.isNumeric(_92f); +case Boolean: +case "boolean": +return dojo.lang.isBoolean(_92f); +case Object: +case "object": +return dojo.lang.isObject(_92f); +case "pureobject": +return dojo.lang.isPureObject(_92f); +case "builtin": +return dojo.lang.isBuiltIn(_92f); +case "alien": +return dojo.lang.isAlien(_92f); +case "undefined": +return dojo.lang.isUndefined(_92f); +case null: +case "null": +return (_92f===null); +case "optional": +dojo.deprecated("dojo.lang.isOfType(value, [type, \"optional\"])","use dojo.lang.isOfType(value, type, {optional: true} ) instead","0.5"); +return ((_92f===null)||dojo.lang.isUndefined(_92f)); +default: +if(dojo.lang.isFunction(type)){ +return (_92f instanceof type); +}else{ +dojo.raise("dojo.lang.isOfType() was passed an invalid type"); +} +} +} +dojo.raise("If we get here, it means a bug was introduced above."); +}; +dojo.lang.getObject=function(str){ +var _937=str.split("."),i=0,obj=dj_global; +do{ +obj=obj[_937[i++]]; +}while(i<_937.length&&obj); +return (obj!=dj_global)?obj:null; +}; +dojo.lang.doesObjectExist=function(str){ +var _93b=str.split("."),i=0,obj=dj_global; +do{ +obj=obj[_93b[i++]]; +}while(i<_93b.length&&obj); +return (obj&&obj!=dj_global); +}; +dojo.provide("dojo.lang.assert"); +dojo.lang.assert=function(_93e,_93f){ +if(!_93e){ +var _940="An assert statement failed.\n"+"The method dojo.lang.assert() was called with a 'false' value.\n"; +if(_93f){ +_940+="Here's the assert message:\n"+_93f+"\n"; +} +throw new Error(_940); +} +}; +dojo.lang.assertType=function(_941,type,_943){ +if(dojo.lang.isString(_943)){ +dojo.deprecated("dojo.lang.assertType(value, type, \"message\")","use dojo.lang.assertType(value, type) instead","0.5"); +} +if(!dojo.lang.isOfType(_941,type,_943)){ +if(!dojo.lang.assertType._errorMessage){ +dojo.lang.assertType._errorMessage="Type mismatch: dojo.lang.assertType() failed."; +} +dojo.lang.assert(false,dojo.lang.assertType._errorMessage); +} +}; +dojo.lang.assertValidKeywords=function(_944,_945,_946){ +var key; +if(!_946){ +if(!dojo.lang.assertValidKeywords._errorMessage){ +dojo.lang.assertValidKeywords._errorMessage="In dojo.lang.assertValidKeywords(), found invalid keyword:"; +} +_946=dojo.lang.assertValidKeywords._errorMessage; +} +if(dojo.lang.isArray(_945)){ +for(key in _944){ +if(!dojo.lang.inArray(_945,key)){ +dojo.lang.assert(false,_946+" "+key); +} +} +}else{ +for(key in _944){ +if(!(key in _945)){ +dojo.lang.assert(false,_946+" "+key); +} +} +} +}; +dojo.provide("dojo.AdapterRegistry"); +dojo.AdapterRegistry=function(_948){ +this.pairs=[]; +this.returnWrappers=_948||false; +}; +dojo.lang.extend(dojo.AdapterRegistry,{register:function(name,_94a,wrap,_94c,_94d){ +var type=(_94d)?"unshift":"push"; +this.pairs[type]([name,_94a,wrap,_94c]); +},match:function(){ +for(var i=0;i"; +this.iframe=dojo.doc().createElement(html); +this.iframe.tabIndex=-1; +if(node){ +node.appendChild(this.iframe); +this.domNode=node; +}else{ +dojo.body().appendChild(this.iframe); +this.iframe.style.display="none"; +} +} +}; +dojo.lang.extend(dojo.html.BackgroundIframe,{iframe:null,onResized:function(){ +if(this.iframe&&this.domNode&&this.domNode.parentNode){ +var _963=dojo.html.getMarginBox(this.domNode); +if(_963.width==0||_963.height==0){ +dojo.lang.setTimeout(this,this.onResized,100); +return; +} +this.iframe.style.width=_963.width+"px"; +this.iframe.style.height=_963.height+"px"; +} +},size:function(node){ +if(!this.iframe){ +return; +} +var _965=dojo.html.toCoordinateObject(node,true,dojo.html.boxSizing.BORDER_BOX); +with(this.iframe.style){ +width=_965.width+"px"; +height=_965.height+"px"; +left=_965.left+"px"; +top=_965.top+"px"; +} +},setZIndex:function(node){ +if(!this.iframe){ +return; +} +if(dojo.dom.isNode(node)){ +this.iframe.style.zIndex=dojo.html.getStyle(node,"z-index")-1; +}else{ +if(!isNaN(node)){ +this.iframe.style.zIndex=node; +} +} +},show:function(){ +if(this.iframe){ +this.iframe.style.display="block"; +} +},hide:function(){ +if(this.iframe){ +this.iframe.style.display="none"; +} +},remove:function(){ +if(this.iframe){ +dojo.html.removeNode(this.iframe,true); +delete this.iframe; +this.iframe=null; +} +}}); +dojo.provide("dojo.widget.PopupContainer"); +dojo.declare("dojo.widget.PopupContainerBase",null,function(){ +this.queueOnAnimationFinish=[]; +},{isShowingNow:false,currentSubpopup:null,beginZIndex:1000,parentPopup:null,parent:null,popupIndex:0,aroundBox:dojo.html.boxSizing.BORDER_BOX,openedForWindow:null,processKey:function(evt){ +return false; +},applyPopupBasicStyle:function(){ +with(this.domNode.style){ +display="none"; +position="absolute"; +} +},aboutToShow:function(){ +},open:function(x,y,_96a,_96b,_96c,_96d){ +if(this.isShowingNow){ +return; +} +if(this.animationInProgress){ +this.queueOnAnimationFinish.push(this.open,arguments); +return; +} +this.aboutToShow(); +var _96e=false,node,_970; +if(typeof x=="object"){ +node=x; +_970=_96b; +_96b=_96a; +_96a=y; +_96e=true; +} +this.parent=_96a; +dojo.body().appendChild(this.domNode); +_96b=_96b||_96a["domNode"]||[]; +var _971=null; +this.isTopLevel=true; +while(_96a){ +if(_96a!==this&&(_96a.setOpenedSubpopup!=undefined&&_96a.applyPopupBasicStyle!=undefined)){ +_971=_96a; +this.isTopLevel=false; +_971.setOpenedSubpopup(this); +break; +} +_96a=_96a.parent; +} +this.parentPopup=_971; +this.popupIndex=_971?_971.popupIndex+1:1; +if(this.isTopLevel){ +var _972=dojo.html.isNode(_96b)?_96b:null; +dojo.widget.PopupManager.opened(this,_972); +} +if(this.isTopLevel&&!dojo.withGlobal(this.openedForWindow||dojo.global(),dojo.html.selection.isCollapsed)){ +this._bookmark=dojo.withGlobal(this.openedForWindow||dojo.global(),dojo.html.selection.getBookmark); +}else{ +this._bookmark=null; +} +if(_96b instanceof Array){ +_96b={left:_96b[0],top:_96b[1],width:0,height:0}; +} +with(this.domNode.style){ +display=""; +zIndex=this.beginZIndex+this.popupIndex; +} +if(_96e){ +this.move(node,_96d,_970); +}else{ +this.move(x,y,_96d,_96c); +} +this.domNode.style.display="none"; +this.explodeSrc=_96b; +this.show(); +this.isShowingNow=true; +},move:function(x,y,_975,_976){ +var _977=(typeof x=="object"); +if(_977){ +var _978=_975; +var node=x; +_975=y; +if(!_978){ +_978={"BL":"TL","TL":"BL"}; +} +dojo.html.placeOnScreenAroundElement(this.domNode,node,_975,this.aroundBox,_978); +}else{ +if(!_976){ +_976="TL,TR,BL,BR"; +} +dojo.html.placeOnScreen(this.domNode,x,y,_975,true,_976); +} +},close:function(_97a){ +if(_97a){ +this.domNode.style.display="none"; +} +if(this.animationInProgress){ +this.queueOnAnimationFinish.push(this.close,[]); +return; +} +this.closeSubpopup(_97a); +this.hide(); +if(this.bgIframe){ +this.bgIframe.hide(); +this.bgIframe.size({left:0,top:0,width:0,height:0}); +} +if(this.isTopLevel){ +dojo.widget.PopupManager.closed(this); +} +this.isShowingNow=false; +if(this.parent){ +setTimeout(dojo.lang.hitch(this,function(){ +try{ +if(this.parent["focus"]){ +this.parent.focus(); +}else{ +this.parent.domNode.focus(); +} +} +catch(e){ +dojo.debug("No idea how to focus to parent",e); +} +}),10); +} +if(this._bookmark&&dojo.withGlobal(this.openedForWindow||dojo.global(),dojo.html.selection.isCollapsed)){ +if(this.openedForWindow){ +this.openedForWindow.focus(); +} +try{ +dojo.withGlobal(this.openedForWindow||dojo.global(),"moveToBookmark",dojo.html.selection,[this._bookmark]); +} +catch(e){ +} +} +this._bookmark=null; +},closeAll:function(_97b){ +if(this.parentPopup){ +this.parentPopup.closeAll(_97b); +}else{ +this.close(_97b); +} +},setOpenedSubpopup:function(_97c){ +this.currentSubpopup=_97c; +},closeSubpopup:function(_97d){ +if(this.currentSubpopup==null){ +return; +} +this.currentSubpopup.close(_97d); +this.currentSubpopup=null; +},onShow:function(){ +dojo.widget.PopupContainer.superclass.onShow.apply(this,arguments); +this.openedSize={w:this.domNode.style.width,h:this.domNode.style.height}; +if(dojo.render.html.ie){ +if(!this.bgIframe){ +this.bgIframe=new dojo.html.BackgroundIframe(); +this.bgIframe.setZIndex(this.domNode); +} +this.bgIframe.size(this.domNode); +this.bgIframe.show(); +} +this.processQueue(); +},processQueue:function(){ +if(!this.queueOnAnimationFinish.length){ +return; +} +var func=this.queueOnAnimationFinish.shift(); +var args=this.queueOnAnimationFinish.shift(); +func.apply(this,args); +},onHide:function(){ +dojo.widget.HtmlWidget.prototype.onHide.call(this); +if(this.openedSize){ +with(this.domNode.style){ +width=this.openedSize.w; +height=this.openedSize.h; +} +} +this.processQueue(); +}}); +dojo.widget.defineWidget("dojo.widget.PopupContainer",[dojo.widget.HtmlWidget,dojo.widget.PopupContainerBase],{isContainer:true,fillInTemplate:function(){ +this.applyPopupBasicStyle(); +dojo.widget.PopupContainer.superclass.fillInTemplate.apply(this,arguments); +}}); +dojo.widget.PopupManager=new function(){ +this.currentMenu=null; +this.currentButton=null; +this.currentFocusMenu=null; +this.focusNode=null; +this.registeredWindows=[]; +this.registerWin=function(win){ +if(!win.__PopupManagerRegistered){ +dojo.event.connect(win.document,"onmousedown",this,"onClick"); +dojo.event.connect(win,"onscroll",this,"onClick"); +dojo.event.connect(win.document,"onkey",this,"onKey"); +win.__PopupManagerRegistered=true; +this.registeredWindows.push(win); +} +}; +this.registerAllWindows=function(_981){ +if(!_981){ +_981=dojo.html.getDocumentWindow(window.top&&window.top.document||window.document); +} +this.registerWin(_981); +for(var i=0;i<_981.frames.length;i++){ +try{ +var win=dojo.html.getDocumentWindow(_981.frames[i].document); +if(win){ +this.registerAllWindows(win); +} +} +catch(e){ +} +} +}; +this.unRegisterWin=function(win){ +if(win.__PopupManagerRegistered){ +dojo.event.disconnect(win.document,"onmousedown",this,"onClick"); +dojo.event.disconnect(win,"onscroll",this,"onClick"); +dojo.event.disconnect(win.document,"onkey",this,"onKey"); +win.__PopupManagerRegistered=false; +} +}; +this.unRegisterAllWindows=function(){ +for(var i=0;i]*>([\s\S]*?)<\/title>/i; +while(_9c6=_9d0.exec(s)){ +_9c3.push(_9c6[1]); +s=s.substring(0,_9c6.index)+s.substr(_9c6.index+_9c6[0].length); +} +if(this.adjustPaths){ +var _9d1=/<[a-z][a-z0-9]*[^>]*\s(?:(?:src|href|style)=[^>])+[^>]*>/i; +var _9d2=/\s(src|href|style)=(['"]?)([\w()\[\]\/.,\\'"-:;#=&?\s@]+?)\2/i; +var _9d3=/^(?:[#]|(?:(?:https?|ftps?|file|javascript|mailto|news):))/; +while(tag=_9d1.exec(s)){ +str+=s.substring(0,tag.index); +s=s.substring((tag.index+tag[0].length),s.length); +tag=tag[0]; +_9cd=""; +while(attr=_9d2.exec(tag)){ +path=""; +_9cf=attr[3]; +switch(attr[1].toLowerCase()){ +case "src": +case "href": +if(_9d3.exec(_9cf)){ +path=_9cf; +}else{ +path=(new dojo.uri.Uri(url,_9cf).toString()); +} +break; +case "style": +path=dojo.html.fixPathsInCssText(_9cf,url); +break; +default: +path=_9cf; +} +fix=" "+attr[1]+"="+attr[2]+path+attr[2]; +_9cd+=tag.substring(0,attr.index)+fix; +tag=tag.substring((attr.index+attr[0].length),tag.length); +} +str+=_9cd+tag; +} +s=str+s; +} +_9d0=/(?:<(style)[^>]*>([\s\S]*?)<\/style>|]*rel=['"]?stylesheet['"]?[^>]*)>)/i; +while(_9c6=_9d0.exec(s)){ +if(_9c6[1]&&_9c6[1].toLowerCase()=="style"){ +_9c9.push(dojo.html.fixPathsInCssText(_9c6[2],url)); +}else{ +if(attr=_9c6[3].match(/href=(['"]?)([^'">]*)\1/i)){ +_9c9.push({path:attr[2]}); +} +} +s=s.substring(0,_9c6.index)+s.substr(_9c6.index+_9c6[0].length); +} +var _9d0=/]*)>([\s\S]*?)<\/script>/i; +var _9d4=/src=(['"]?)([^"']*)\1/i; +var _9d5=/.*(\bdojo\b\.js(?:\.uncompressed\.js)?)$/; +var _9d6=/(?:var )?\bdjConfig\b(?:[\s]*=[\s]*\{[^}]+\}|\.[\w]*[\s]*=[\s]*[^;\n]*)?;?|dojo\.hostenv\.writeIncludes\(\s*\);?/g; +var _9d7=/dojo\.(?:(?:require(?:After)?(?:If)?)|(?:widget\.(?:manager\.)?registerWidgetPackage)|(?:(?:hostenv\.)?setModulePrefix|registerModulePath)|defineNamespace)\((['"]).*?\1\)\s*;?/; +while(_9c6=_9d0.exec(s)){ +if(this.executeScripts&&_9c6[1]){ +if(attr=_9d4.exec(_9c6[1])){ +if(_9d5.exec(attr[2])){ +dojo.debug("Security note! inhibit:"+attr[2]+" from being loaded again."); +}else{ +_9c4.push({path:attr[2]}); +} +} +} +if(_9c6[2]){ +var sc=_9c6[2].replace(_9d6,""); +if(!sc){ +continue; +} +while(tmp=_9d7.exec(sc)){ +_9c7.push(tmp[0]); +sc=sc.substring(0,tmp.index)+sc.substr(tmp.index+tmp[0].length); +} +if(this.executeScripts){ +_9c4.push(sc); +} +} +s=s.substr(0,_9c6.index)+s.substr(_9c6.index+_9c6[0].length); +} +if(this.extractContent){ +_9c6=s.match(/]*>\s*([\s\S]+)\s*<\/body>/im); +if(_9c6){ +s=_9c6[1]; +} +} +if(this.executeScripts&&this.scriptSeparation){ +var _9d0=/(<[a-zA-Z][a-zA-Z0-9]*\s[^>]*?\S=)((['"])[^>]*scriptScope[^>]*>)/; +var _9d9=/([\s'";:\(])scriptScope(.*)/; +str=""; +while(tag=_9d0.exec(s)){ +tmp=((tag[3]=="'")?"\"":"'"); +fix=""; +str+=s.substring(0,tag.index)+tag[1]; +while(attr=_9d9.exec(tag[2])){ +tag[2]=tag[2].substring(0,attr.index)+attr[1]+"dojo.widget.byId("+tmp+this.widgetId+tmp+").scriptScope"+attr[2]; +} +str+=tag[2]; +s=s.substr(tag.index+tag[0].length); +} +s=str+s; +} +} +return {"xml":s,"styles":_9c9,"titles":_9c3,"requires":_9c7,"scripts":_9c4,"url":url}; +},_setContent:function(cont){ +this.destroyChildren(); +for(var i=0;i\r\n\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tW\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tS\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\t
    normal
    \r\n\t\t\t\t\t\t\t\t\t\t

    Heading 1

    \r\n\t\t\t\t\t\t\t\t\t\t

    Heading 2

    \r\n\t\t\t\t\t\t\t\t\t\t

    Heading 3

    \r\n\t\t\t\t\t\t\t\t\t\t

    Heading 4

    \r\n\t\t\t\t\t\t\t\t\t\t
    blah
    \r\n\t\t\t\t\t\t\t\t\t\t
    blah
    \r\n\t\t\t\t\t\t\t\t\t\t
    blah
    \r\n\t\t\t\t\t\t\t\t\t\t
    blah
    \r\n\t\t\t\t\t\t\t\t\t\t
    blah
    \r\n\t\t\t\t\t\t\t\t\t\t
    blah
    \r\n\t\t\t\t\t\t\t\t\t\t
    blah
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\tthud\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t  copy\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t  paste\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t  undo\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t  redo\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n
    \r\n",templateCssString:".StyleDropdownContainer {\r\n\tposition: absolute;\r\n\tz-index: 1000;\r\n\toverflow: auto;\r\n\tcursor: default;\r\n\twidth: 250px;\r\n\theight: 250px;\r\n\tbackground-color: white;\r\n\tborder: 1px solid black;\r\n}\r\n\r\n.ColorDropdownContainer {\r\n\tposition: absolute;\r\n\tz-index: 1000;\r\n\toverflow: auto;\r\n\tcursor: default;\r\n\twidth: 250px;\r\n\theight: 150px;\r\n\tbackground-color: white;\r\n\tborder: 1px solid black;\r\n}\r\n\r\n.EditorToolbarDomNode {\r\n\tbackground-image: url(buttons/bg-fade.png);\r\n\tbackground-repeat: repeat-x;\r\n\tbackground-position: 0px -50px;\r\n}\r\n\r\n.EditorToolbarSmallBg {\r\n\tbackground-image: url(images/toolbar-bg.gif);\r\n\tbackground-repeat: repeat-x;\r\n\tbackground-position: 0px 0px;\r\n}\r\n\r\n/*\r\nbody {\r\n\tbackground:url(images/blank.gif) fixed;\r\n}*/\r\n\r\n.IEFixedToolbar {\r\n\tposition:absolute;\r\n\t/* top:0; */\r\n\ttop: expression(eval((document.documentElement||document.body).scrollTop));\r\n}\r\n\r\ndiv.bigIcon {\r\n\twidth: 40px;\r\n\theight: 40px; \r\n\t/* background-color: white; */\r\n\t/* border: 1px solid #a6a7a3; */\r\n\tfont-family: Verdana, Trebuchet, Tahoma, Arial;\r\n}\r\n\r\n.iconContainer {\r\n\tfont-family: Verdana, Trebuchet, Tahoma, Arial;\r\n\tfont-size: 13px;\r\n\tfloat: left;\r\n\theight: 18px;\r\n\tdisplay: block;\r\n\t/* background-color: white; */\r\n\tcursor: pointer;\r\n\tpadding: 1px 4px 1px 1px; /* almost the same as a transparent border */\r\n\tborder: 0px;\r\n}\r\n\r\n.dojoE2TBIcon {\r\n\tdisplay: block;\r\n\ttext-align: center;\r\n\tmin-width: 18px;\r\n\twidth: 18px;\r\n\theight: 18px;\r\n\t/* background-color: #a6a7a3; */\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-image: url(buttons/aggregate.gif);\r\n}\r\n\r\n\r\n.dojoE2TBIcon[class~=dojoE2TBIcon] {\r\n}\r\n\r\n.ToolbarButtonLatched {\r\n border: #316ac5 1px solid; !important;\r\n padding: 0px 3px 0px 0px; !important; /* make room for border */\r\n background-color: #c1d2ee;\r\n}\r\n\r\n.ToolbarButtonHighlighted {\r\n border: #316ac5 1px solid; !important;\r\n padding: 0px 3px 0px 0px; !important; /* make room for border */\r\n background-color: #dff1ff;\r\n}\r\n\r\n.ToolbarButtonDisabled{\r\n filter: gray() alpha(opacity=30); /* IE */\r\n opacity: 0.30; /* Safari, Opera and Mozilla */\r\n}\r\n\r\n.headingContainer {\r\n\twidth: 150px;\r\n\theight: 30px;\r\n\tmargin: 0px;\r\n\t/* padding-left: 5px; */\r\n\toverflow: hidden;\r\n\tline-height: 25px;\r\n\tborder-bottom: 1px solid black;\r\n\tborder-top: 1px solid white;\r\n}\r\n\r\n.EditorToolbarDomNode select {\r\n\tfont-size: 14px;\r\n}\r\n \r\n.dojoE2TBIcon_Sep { width: 5px; min-width: 5px; max-width: 5px; background-position: 0px 0px}\r\n.dojoE2TBIcon_Backcolor { background-position: -18px 0px}\r\n.dojoE2TBIcon_Bold { background-position: -36px 0px}\r\n.dojoE2TBIcon_Cancel { background-position: -54px 0px}\r\n.dojoE2TBIcon_Copy { background-position: -72px 0px}\r\n.dojoE2TBIcon_Link { background-position: -90px 0px}\r\n.dojoE2TBIcon_Cut { background-position: -108px 0px}\r\n.dojoE2TBIcon_Delete { background-position: -126px 0px}\r\n.dojoE2TBIcon_TextColor { background-position: -144px 0px}\r\n.dojoE2TBIcon_BackgroundColor { background-position: -162px 0px}\r\n.dojoE2TBIcon_Indent { background-position: -180px 0px}\r\n.dojoE2TBIcon_HorizontalLine { background-position: -198px 0px}\r\n.dojoE2TBIcon_Image { background-position: -216px 0px}\r\n.dojoE2TBIcon_NumberedList { background-position: -234px 0px}\r\n.dojoE2TBIcon_Table { background-position: -252px 0px}\r\n.dojoE2TBIcon_BulletedList { background-position: -270px 0px}\r\n.dojoE2TBIcon_Italic { background-position: -288px 0px}\r\n.dojoE2TBIcon_CenterJustify { background-position: -306px 0px}\r\n.dojoE2TBIcon_BlockJustify { background-position: -324px 0px}\r\n.dojoE2TBIcon_LeftJustify { background-position: -342px 0px}\r\n.dojoE2TBIcon_RightJustify { background-position: -360px 0px}\r\n.dojoE2TBIcon_left_to_right { background-position: -378px 0px}\r\n.dojoE2TBIcon_list_bullet_indent { background-position: -396px 0px}\r\n.dojoE2TBIcon_list_bullet_outdent { background-position: -414px 0px}\r\n.dojoE2TBIcon_list_num_indent { background-position: -432px 0px}\r\n.dojoE2TBIcon_list_num_outdent { background-position: -450px 0px}\r\n.dojoE2TBIcon_Outdent { background-position: -468px 0px}\r\n.dojoE2TBIcon_Paste { background-position: -486px 0px}\r\n.dojoE2TBIcon_Redo { background-position: -504px 0px}\r\ndojoE2TBIcon_RemoveFormat { background-position: -522px 0px}\r\n.dojoE2TBIcon_right_to_left { background-position: -540px 0px}\r\n.dojoE2TBIcon_Save { background-position: -558px 0px}\r\n.dojoE2TBIcon_Space { background-position: -576px 0px}\r\n.dojoE2TBIcon_StrikeThrough { background-position: -594px 0px}\r\n.dojoE2TBIcon_Subscript { background-position: -612px 0px}\r\n.dojoE2TBIcon_Superscript { background-position: -630px 0px}\r\n.dojoE2TBIcon_Underline { background-position: -648px 0px}\r\n.dojoE2TBIcon_Undo { background-position: -666px 0px}\r\n.dojoE2TBIcon_WikiWord { background-position: -684px 0px}\r\n\r\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/EditorToolbar.css"),ToolbarLatchedItemStyle:"ToolbarButtonLatched",ToolbarEnabledItemStyle:"ToolbarButtonEnabled",ToolbarDisabledItemStyle:"ToolbarButtonDisabled",ToolbarHighlightedItemStyle:"ToolbarButtonHighlighted",ToolbarHighlightedSelectStyle:"ToolbarSelectHighlighted",ToolbarHighlightedSelectItemStyle:"ToolbarSelectHighlightedItem",postCreate:function(){ +var _a38=dojo.html.getElementsByClass("dojoEditorToolbarItem",this.domNode); +this.items={}; +for(var x=0;x<_a38.length;x++){ +var node=_a38[x]; +var _a3b=node.getAttribute("dojoETItemName"); +if(_a3b){ +var item=dojo.widget.Editor2ToolbarItemManager.getToolbarItem(_a3b); +if(item){ +item.create(node,this); +this.items[_a3b.toLowerCase()]=item; +}else{ +node.style.display="none"; +} +} +} +},update:function(){ +for(var cmd in this.items){ +this.items[cmd].refreshState(); +} +},shareGroup:"",checkAvailability:function(){ +if(!this.shareGroup){ +this.parent.focus(); +return true; +} +var _a3e=dojo.widget.Editor2Manager.getCurrentInstance(); +if(this.shareGroup==_a3e.toolbarGroup){ +return true; +} +return false; +},destroy:function(){ +for(var it in this.items){ +this.items[it].destroy(); +delete this.items[it]; +} +dojo.widget.Editor2Toolbar.superclass.destroy.call(this); +}}); +dojo.provide("dojo.uri.cache"); +dojo.uri.cache={_cache:{},set:function(uri,_a41){ +this._cache[uri.toString()]=_a41; +return uri; +},remove:function(uri){ +delete this._cache[uri.toString()]; +},get:function(uri){ +var key=uri.toString(); +var _a45=this._cache[key]; +if(!_a45){ +_a45=dojo.hostenv.getText(key); +if(_a45){ +this._cache[key]=_a45; +} +} +return _a45; +},allow:function(uri){ +return uri; +}}; +dojo.provide("dojo.lfx.shadow"); +dojo.lfx.shadow=function(node){ +this.shadowPng=dojo.uri.moduleUri("dojo.html","images/shadow"); +this.shadowThickness=8; +this.shadowOffset=15; +this.init(node); +}; +dojo.extend(dojo.lfx.shadow,{init:function(node){ +this.node=node; +this.pieces={}; +var x1=-1*this.shadowThickness; +var y0=this.shadowOffset; +var y1=this.shadowOffset+this.shadowThickness; +this._makePiece("tl","top",y0,"left",x1); +this._makePiece("l","top",y1,"left",x1,"scale"); +this._makePiece("tr","top",y0,"left",0); +this._makePiece("r","top",y1,"left",0,"scale"); +this._makePiece("bl","top",0,"left",x1); +this._makePiece("b","top",0,"left",0,"crop"); +this._makePiece("br","top",0,"left",0); +},_makePiece:function(name,_a4d,_a4e,_a4f,_a50,_a51){ +var img; +var url=this.shadowPng+name.toUpperCase()+".png"; +if(dojo.render.html.ie55||dojo.render.html.ie60){ +img=dojo.doc().createElement("div"); +img.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+url+"'"+(_a51?", sizingMethod='"+_a51+"'":"")+")"; +}else{ +img=dojo.doc().createElement("img"); +img.src=url; +} +img.style.position="absolute"; +img.style[_a4d]=_a4e+"px"; +img.style[_a4f]=_a50+"px"; +img.style.width=this.shadowThickness+"px"; +img.style.height=this.shadowThickness+"px"; +this.pieces[name]=img; +this.node.appendChild(img); +},size:function(_a54,_a55){ +var _a56=_a55-(this.shadowOffset+this.shadowThickness+1); +if(_a56<0){ +_a56=0; +} +if(_a55<1){ +_a55=1; +} +if(_a54<1){ +_a54=1; +} +with(this.pieces){ +l.style.height=_a56+"px"; +r.style.height=_a56+"px"; +b.style.width=(_a54-1)+"px"; +bl.style.top=(_a55-1)+"px"; +b.style.top=(_a55-1)+"px"; +br.style.top=(_a55-1)+"px"; +tr.style.left=(_a54-1)+"px"; +r.style.left=(_a54-1)+"px"; +br.style.left=(_a54-1)+"px"; +} +}}); +dojo.provide("dojo.widget.html.layout"); +dojo.widget.html.layout=function(_a57,_a58,_a59){ +dojo.html.addClass(_a57,"dojoLayoutContainer"); +_a58=dojo.lang.filter(_a58,function(_a5a,idx){ +_a5a.idx=idx; +return dojo.lang.inArray(["top","bottom","left","right","client","flood"],_a5a.layoutAlign); +}); +if(_a59&&_a59!="none"){ +var rank=function(_a5d){ +switch(_a5d.layoutAlign){ +case "flood": +return 1; +case "left": +case "right": +return (_a59=="left-right")?2:3; +case "top": +case "bottom": +return (_a59=="left-right")?3:2; +default: +return 4; +} +}; +_a58.sort(function(a,b){ +return (rank(a)-rank(b))||(a.idx-b.idx); +}); +} +var f={top:dojo.html.getPixelValue(_a57,"padding-top",true),left:dojo.html.getPixelValue(_a57,"padding-left",true)}; +dojo.lang.mixin(f,dojo.html.getContentBox(_a57)); +dojo.lang.forEach(_a58,function(_a61){ +var elm=_a61.domNode; +var pos=_a61.layoutAlign; +with(elm.style){ +left=f.left+"px"; +top=f.top+"px"; +bottom="auto"; +right="auto"; +} +dojo.html.addClass(elm,"dojoAlign"+dojo.string.capitalize(pos)); +if((pos=="top")||(pos=="bottom")){ +dojo.html.setMarginBox(elm,{width:f.width}); +var h=dojo.html.getMarginBox(elm).height; +f.height-=h; +if(pos=="top"){ +f.top+=h; +}else{ +elm.style.top=f.top+f.height+"px"; +} +if(_a61.onResized){ +_a61.onResized(); +} +}else{ +if(pos=="left"||pos=="right"){ +var w=dojo.html.getMarginBox(elm).width; +if(_a61.resizeTo){ +_a61.resizeTo(w,f.height); +}else{ +dojo.html.setMarginBox(elm,{width:w,height:f.height}); +} +f.width-=w; +if(pos=="left"){ +f.left+=w; +}else{ +elm.style.left=f.left+f.width+"px"; +} +}else{ +if(pos=="flood"||pos=="client"){ +if(_a61.resizeTo){ +_a61.resizeTo(f.width,f.height); +}else{ +dojo.html.setMarginBox(elm,{width:f.width,height:f.height}); +} +} +} +} +}); +}; +dojo.html.insertCssText(".dojoLayoutContainer{ position: relative; display: block; overflow: hidden; }\n"+"body .dojoAlignTop, body .dojoAlignBottom, body .dojoAlignLeft, body .dojoAlignRight { position: absolute; overflow: hidden; }\n"+"body .dojoAlignClient { position: absolute }\n"+".dojoAlignClient { overflow: auto; }\n"); +dojo.provide("dojo.dnd.DragAndDrop"); +dojo.declare("dojo.dnd.DragSource",null,{type:"",onDragEnd:function(evt){ +},onDragStart:function(evt){ +},onSelected:function(evt){ +},unregister:function(){ +dojo.dnd.dragManager.unregisterDragSource(this); +},reregister:function(){ +dojo.dnd.dragManager.registerDragSource(this); +}}); +dojo.declare("dojo.dnd.DragObject",null,{type:"",register:function(){ +var dm=dojo.dnd.dragManager; +if(dm["registerDragObject"]){ +dm.registerDragObject(this); +} +},onDragStart:function(evt){ +},onDragMove:function(evt){ +},onDragOver:function(evt){ +},onDragOut:function(evt){ +},onDragEnd:function(evt){ +},onDragLeave:dojo.lang.forward("onDragOut"),onDragEnter:dojo.lang.forward("onDragOver"),ondragout:dojo.lang.forward("onDragOut"),ondragover:dojo.lang.forward("onDragOver")}); +dojo.declare("dojo.dnd.DropTarget",null,{acceptsType:function(type){ +if(!dojo.lang.inArray(this.acceptedTypes,"*")){ +if(!dojo.lang.inArray(this.acceptedTypes,type)){ +return false; +} +} +return true; +},accepts:function(_a70){ +if(!dojo.lang.inArray(this.acceptedTypes,"*")){ +for(var i=0;i<_a70.length;i++){ +if(!dojo.lang.inArray(this.acceptedTypes,_a70[i].type)){ +return false; +} +} +} +return true; +},unregister:function(){ +dojo.dnd.dragManager.unregisterDropTarget(this); +},onDragOver:function(evt){ +},onDragOut:function(evt){ +},onDragMove:function(evt){ +},onDropStart:function(evt){ +},onDrop:function(evt){ +},onDropEnd:function(){ +}},function(){ +this.acceptedTypes=[]; +}); +dojo.dnd.DragEvent=function(){ +this.dragSource=null; +this.dragObject=null; +this.target=null; +this.eventStatus="success"; +}; +dojo.declare("dojo.dnd.DragManager",null,{selectedSources:[],dragObjects:[],dragSources:[],registerDragSource:function(_a77){ +},dropTargets:[],registerDropTarget:function(_a78){ +},lastDragTarget:null,currentDragTarget:null,onKeyDown:function(){ +},onMouseOut:function(){ +},onMouseMove:function(){ +},onMouseUp:function(){ +}}); +dojo.provide("dojo.dnd.HtmlDragManager"); +dojo.declare("dojo.dnd.HtmlDragManager",dojo.dnd.DragManager,{disabled:false,nestedTargets:false,mouseDownTimer:null,dsCounter:0,dsPrefix:"dojoDragSource",dropTargetDimensions:[],currentDropTarget:null,previousDropTarget:null,_dragTriggered:false,selectedSources:[],dragObjects:[],dragSources:[],dropTargets:[],currentX:null,currentY:null,lastX:null,lastY:null,mouseDownX:null,mouseDownY:null,threshold:7,dropAcceptable:false,cancelEvent:function(e){ +e.stopPropagation(); +e.preventDefault(); +},registerDragSource:function(ds){ +if(ds["domNode"]){ +var dp=this.dsPrefix; +var _a7c=dp+"Idx_"+(this.dsCounter++); +ds.dragSourceId=_a7c; +this.dragSources[_a7c]=ds; +ds.domNode.setAttribute(dp,_a7c); +if(dojo.render.html.ie){ +dojo.event.browser.addListener(ds.domNode,"ondragstart",this.cancelEvent); +} +} +},unregisterDragSource:function(ds){ +if(ds["domNode"]){ +var dp=this.dsPrefix; +var _a7f=ds.dragSourceId; +delete ds.dragSourceId; +delete this.dragSources[_a7f]; +ds.domNode.setAttribute(dp,null); +if(dojo.render.html.ie){ +dojo.event.browser.removeListener(ds.domNode,"ondragstart",this.cancelEvent); +} +} +},registerDropTarget:function(dt){ +this.dropTargets.push(dt); +},unregisterDropTarget:function(dt){ +var _a82=dojo.lang.find(this.dropTargets,dt,true); +if(_a82>=0){ +this.dropTargets.splice(_a82,1); +} +},getDragSource:function(e){ +var tn=e.target; +if(tn===dojo.body()){ +return; +} +var ta=dojo.html.getAttribute(tn,this.dsPrefix); +while((!ta)&&(tn)){ +tn=tn.parentNode; +if((!tn)||(tn===dojo.body())){ +return; +} +ta=dojo.html.getAttribute(tn,this.dsPrefix); +} +return this.dragSources[ta]; +},onKeyDown:function(e){ +},onMouseDown:function(e){ +if(this.disabled){ +return; +} +if(dojo.render.html.ie){ +if(e.button!=1){ +return; +} +}else{ +if(e.which!=1){ +return; +} +} +var _a88=e.target.nodeType==dojo.html.TEXT_NODE?e.target.parentNode:e.target; +if(dojo.html.isTag(_a88,"button","textarea","input","select","option")){ +return; +} +var ds=this.getDragSource(e); +if(!ds){ +return; +} +if(!dojo.lang.inArray(this.selectedSources,ds)){ +this.selectedSources.push(ds); +ds.onSelected(); +} +this.mouseDownX=e.pageX; +this.mouseDownY=e.pageY; +e.preventDefault(); +dojo.event.connect(document,"onmousemove",this,"onMouseMove"); +},onMouseUp:function(e,_a8b){ +if(this.selectedSources.length==0){ +return; +} +this.mouseDownX=null; +this.mouseDownY=null; +this._dragTriggered=false; +e.dragSource=this.dragSource; +if((!e.shiftKey)&&(!e.ctrlKey)){ +if(this.currentDropTarget){ +this.currentDropTarget.onDropStart(); +} +dojo.lang.forEach(this.dragObjects,function(_a8c){ +var ret=null; +if(!_a8c){ +return; +} +if(this.currentDropTarget){ +e.dragObject=_a8c; +var ce=this.currentDropTarget.domNode.childNodes; +if(ce.length>0){ +e.dropTarget=ce[0]; +while(e.dropTarget==_a8c.domNode){ +e.dropTarget=e.dropTarget.nextSibling; +} +}else{ +e.dropTarget=this.currentDropTarget.domNode; +} +if(this.dropAcceptable){ +ret=this.currentDropTarget.onDrop(e); +}else{ +this.currentDropTarget.onDragOut(e); +} +} +e.dragStatus=this.dropAcceptable&&ret?"dropSuccess":"dropFailure"; +dojo.lang.delayThese([function(){ +try{ +_a8c.dragSource.onDragEnd(e); +} +catch(err){ +var _a8f={}; +for(var i in e){ +if(i=="type"){ +_a8f.type="mouseup"; +continue; +} +_a8f[i]=e[i]; +} +_a8c.dragSource.onDragEnd(_a8f); +} +},function(){ +_a8c.onDragEnd(e); +}]); +},this); +this.selectedSources=[]; +this.dragObjects=[]; +this.dragSource=null; +if(this.currentDropTarget){ +this.currentDropTarget.onDropEnd(); +} +}else{ +} +dojo.event.disconnect(document,"onmousemove",this,"onMouseMove"); +this.currentDropTarget=null; +},onScroll:function(){ +for(var i=0;ithis.threshold); +if(!this._dragTriggered){ +return; +} +dx=e.pageX-this.mouseDownX; +dy=e.pageY-this.mouseDownY; +} +this.dragSource=this.selectedSources[0]; +dojo.lang.forEach(this.selectedSources,function(_a9f){ +if(!_a9f){ +return; +} +var tdo=_a9f.onDragStart(e); +if(tdo){ +tdo.onDragStart(e); +tdo.dragOffset.y+=dy; +tdo.dragOffset.x+=dx; +tdo.dragSource=_a9f; +this.dragObjects.push(tdo); +} +},this); +this.previousDropTarget=null; +this.cacheTargetLocations(); +} +dojo.lang.forEach(this.dragObjects,function(_aa1){ +if(_aa1){ +_aa1.onDragMove(e); +} +}); +if(this.currentDropTarget){ +var c=dojo.html.toCoordinateObject(this.currentDropTarget.domNode,true); +var dtp=[[c.x,c.y],[c.x+c.width,c.y+c.height]]; +} +if((!this.nestedTargets)&&(dtp)&&(this.isInsideBox(e,dtp))){ +if(this.dropAcceptable){ +this.currentDropTarget.onDragMove(e,this.dragObjects); +} +}else{ +var _aa4=this.findBestTarget(e); +if(_aa4.target===null){ +if(this.currentDropTarget){ +this.currentDropTarget.onDragOut(e); +this.previousDropTarget=this.currentDropTarget; +this.currentDropTarget=null; +} +this.dropAcceptable=false; +return; +} +if(this.currentDropTarget!==_aa4.target){ +if(this.currentDropTarget){ +this.previousDropTarget=this.currentDropTarget; +this.currentDropTarget.onDragOut(e); +} +this.currentDropTarget=_aa4.target; +e.dragObjects=this.dragObjects; +this.dropAcceptable=this.currentDropTarget.onDragOver(e); +}else{ +if(this.dropAcceptable){ +this.currentDropTarget.onDragMove(e,this.dragObjects); +} +} +} +},findBestTarget:function(e){ +var _aa6=this; +var _aa7=new Object(); +_aa7.target=null; +_aa7.points=null; +dojo.lang.every(this.dropTargetDimensions,function(_aa8){ +if(!_aa6.isInsideBox(e,_aa8)){ +return true; +} +_aa7.target=_aa8[2]; +_aa7.points=_aa8; +return Boolean(_aa6.nestedTargets); +}); +return _aa7; +},isInsideBox:function(e,_aaa){ +if((e.pageX>_aaa[0][0])&&(e.pageX<_aaa[1][0])&&(e.pageY>_aaa[0][1])&&(e.pageY<_aaa[1][1])){ +return true; +} +return false; +},onMouseOver:function(e){ +},onMouseOut:function(e){ +}}); +dojo.dnd.dragManager=new dojo.dnd.HtmlDragManager(); +(function(){ +var d=document; +var dm=dojo.dnd.dragManager; +dojo.event.connect(d,"onkeydown",dm,"onKeyDown"); +dojo.event.connect(d,"onmouseover",dm,"onMouseOver"); +dojo.event.connect(d,"onmouseout",dm,"onMouseOut"); +dojo.event.connect(d,"onmousedown",dm,"onMouseDown"); +dojo.event.connect(d,"onmouseup",dm,"onMouseUp"); +dojo.event.connect(window,"onscroll",dm,"onScroll"); +})(); +dojo.provide("dojo.dnd.HtmlDragAndDrop"); +dojo.declare("dojo.dnd.HtmlDragSource",dojo.dnd.DragSource,{dragClass:"",onDragStart:function(){ +var _aaf=new dojo.dnd.HtmlDragObject(this.dragObject,this.type); +if(this.dragClass){ +_aaf.dragClass=this.dragClass; +} +if(this.constrainToContainer){ +_aaf.constrainTo(this.constrainingContainer||this.domNode.parentNode); +} +return _aaf; +},setDragHandle:function(node){ +node=dojo.byId(node); +dojo.dnd.dragManager.unregisterDragSource(this); +this.domNode=node; +dojo.dnd.dragManager.registerDragSource(this); +},setDragTarget:function(node){ +this.dragObject=node; +},constrainTo:function(_ab2){ +this.constrainToContainer=true; +if(_ab2){ +this.constrainingContainer=_ab2; +} +},onSelected:function(){ +for(var i=0;ithis.constraints.maxX){ +x=this.constraints.maxX; +} +if(y>this.constraints.maxY){ +y=this.constraints.maxY; +} +} +this.setAbsolutePosition(x,y); +dojo.event.topic.publish("dragMove",{source:this}); +},setAbsolutePosition:function(x,y){ +if(!this.disableY){ +this.dragClone.style.top=y+"px"; +} +if(!this.disableX){ +this.dragClone.style.left=x+"px"; +} +},onDragEnd:function(e){ +switch(e.dragStatus){ +case "dropSuccess": +dojo.html.removeNode(this.dragClone); +this.dragClone=null; +break; +case "dropFailure": +var _ad5=dojo.html.getAbsolutePosition(this.dragClone,true); +var _ad6={left:this.dragStartPosition.x+1,top:this.dragStartPosition.y+1}; +var anim=dojo.lfx.slideTo(this.dragClone,_ad6,300); +var _ad8=this; +dojo.event.connect(anim,"onEnd",function(e){ +dojo.html.removeNode(_ad8.dragClone); +_ad8.dragClone=null; +}); +anim.play(); +break; +} +dojo.event.topic.publish("dragEnd",{source:this}); +},constrainTo:function(_ada){ +this.constrainToContainer=true; +if(_ada){ +this.constrainingContainer=_ada; +}else{ +this.constrainingContainer=this.domNode.parentNode; +} +}},function(node,type){ +this.domNode=dojo.byId(node); +this.type=type; +this.constrainToContainer=false; +this.dragSource=null; +dojo.dnd.DragObject.prototype.register.call(this); +}); +dojo.declare("dojo.dnd.HtmlDropTarget",dojo.dnd.DropTarget,{vertical:false,onDragOver:function(e){ +if(!this.accepts(e.dragObjects)){ +return false; +} +this.childBoxes=[]; +for(var i=0,_adf;i=left&&e.pageX<=right&&e.pageY>=top&&e.pageY<=bottom){ +return i; +} +} +} +return -1; +},createDropIndicator:function(){ +this.dropIndicator=document.createElement("div"); +with(this.dropIndicator.style){ +position="absolute"; +zIndex=999; +if(this.vertical){ +borderLeftWidth="1px"; +borderLeftColor="black"; +borderLeftStyle="solid"; +height=dojo.html.getBorderBox(this.domNode).height+"px"; +top=dojo.html.getAbsolutePosition(this.domNode,true).y+"px"; +}else{ +borderTopWidth="1px"; +borderTopColor="black"; +borderTopStyle="solid"; +width=dojo.html.getBorderBox(this.domNode).width+"px"; +left=dojo.html.getAbsolutePosition(this.domNode,true).x+"px"; +} +} +},onDragMove:function(e,_ae6){ +var i=this._getNodeUnderMouse(e); +if(!this.dropIndicator){ +this.createDropIndicator(); +} +var _ae8=this.vertical?dojo.html.gravity.WEST:dojo.html.gravity.NORTH; +var hide=false; +if(i<0){ +if(this.childBoxes.length){ +var _aea=(dojo.html.gravity(this.childBoxes[0].node,e)&_ae8); +if(_aea){ +hide=true; +} +}else{ +var _aea=true; +} +}else{ +var _aeb=this.childBoxes[i]; +var _aea=(dojo.html.gravity(_aeb.node,e)&_ae8); +if(_aeb.node===_ae6[0].dragSource.domNode){ +hide=true; +}else{ +var _aec=_aea?(i>0?this.childBoxes[i-1]:_aeb):(i=3){ +_b0b=new dojo.gfx.color.Color(arguments[0],arguments[1],arguments[2]); +}else{ +_b0b=new dojo.gfx.color.Color(_b0b); +} +this.bg.style.backgroundColor=_b0b.toString(); +return this.bgColor=_b0b; +},setBackgroundOpacity:function(op){ +if(arguments.length==0){ +op=this.bgOpacity; +} +dojo.html.setOpacity(this.bg,op); +try{ +this.bgOpacity=dojo.html.getOpacity(this.bg); +} +catch(e){ +this.bgOpacity=op; +} +return this.bgOpacity; +},_sizeBackground:function(){ +if(this.bgOpacity>0){ +var _b0d=dojo.html.getViewport(); +var h=_b0d.height; +var w=_b0d.width; +with(this.bg.style){ +width=w+"px"; +height=h+"px"; +} +var _b10=dojo.html.getScroll().offset; +this.bg.style.top=_b10.y+"px"; +this.bg.style.left=_b10.x+"px"; +var _b0d=dojo.html.getViewport(); +if(_b0d.width!=w){ +this.bg.style.width=_b0d.width+"px"; +} +if(_b0d.height!=h){ +this.bg.style.height=_b0d.height+"px"; +} +} +this.bgIframe.size(this.bg); +},_showBackground:function(){ +if(this.bgOpacity>0){ +this.bg.style.display="block"; +} +if(this.bgIframe.iframe){ +this.bgIframe.iframe.style.display="block"; +} +},placeModalDialog:function(){ +var _b11=dojo.html.getScroll().offset; +var _b12=dojo.html.getViewport(); +var mb; +if(this.isShowing()){ +mb=dojo.html.getMarginBox(this.domNode); +}else{ +dojo.html.setVisibility(this.domNode,false); +dojo.html.show(this.domNode); +mb=dojo.html.getMarginBox(this.domNode); +dojo.html.hide(this.domNode); +dojo.html.setVisibility(this.domNode,true); +} +var x=_b11.x+(_b12.width-mb.width)/2; +var y=_b11.y+(_b12.height-mb.height)/2; +with(this.domNode.style){ +left=x+"px"; +top=y+"px"; +} +},_onKey:function(evt){ +if(evt.key){ +var node=evt.target; +while(node!=null){ +if(node==this.domNode){ +return; +} +node=node.parentNode; +} +if(evt.key!=evt.KEY_TAB){ +dojo.event.browser.stopEvent(evt); +}else{ +if(!dojo.render.html.opera){ +try{ +this.tabStart.focus(); +} +catch(e){ +} +} +} +} +},showModalDialog:function(){ +if(this.followScroll&&!this._scrollConnected){ +this._scrollConnected=true; +dojo.event.connect(window,"onscroll",this,"_onScroll"); +} +dojo.event.connect(document.documentElement,"onkey",this,"_onKey"); +this.placeModalDialog(); +this.setBackgroundOpacity(); +this._sizeBackground(); +this._showBackground(); +this._fromTrap=true; +setTimeout(dojo.lang.hitch(this,function(){ +try{ +this.tabStart.focus(); +} +catch(e){ +} +}),50); +},hideModalDialog:function(){ +if(this.focusElement){ +dojo.byId(this.focusElement).focus(); +dojo.byId(this.focusElement).blur(); +} +this.bg.style.display="none"; +this.bg.style.width=this.bg.style.height="1px"; +if(this.bgIframe.iframe){ +this.bgIframe.iframe.style.display="none"; +} +dojo.event.disconnect(document.documentElement,"onkey",this,"_onKey"); +if(this._scrollConnected){ +this._scrollConnected=false; +dojo.event.disconnect(window,"onscroll",this,"_onScroll"); +} +},_onScroll:function(){ +var _b18=dojo.html.getScroll().offset; +this.bg.style.top=_b18.y+"px"; +this.bg.style.left=_b18.x+"px"; +this.placeModalDialog(); +},checkSize:function(){ +if(this.isShowing()){ +this._sizeBackground(); +this.placeModalDialog(); +this.onResized(); +} +},onBackgroundClick:function(){ +if(this.lifetime-this.timeRemaining>=this.blockDuration){ +return; +} +this.hide(); +}}); +dojo.widget.defineWidget("dojo.widget.Dialog",[dojo.widget.ContentPane,dojo.widget.ModalDialogBase],{templateString:"
    \r\n\t\r\n\t\r\n\t
    \r\n\t\r\n\t\r\n
    \r\n",blockDuration:0,lifetime:0,closeNode:"",postMixInProperties:function(){ +dojo.widget.Dialog.superclass.postMixInProperties.apply(this,arguments); +if(this.closeNode){ +this.setCloseControl(this.closeNode); +} +},postCreate:function(){ +dojo.widget.Dialog.superclass.postCreate.apply(this,arguments); +dojo.widget.ModalDialogBase.prototype.postCreate.apply(this,arguments); +},show:function(){ +if(this.lifetime){ +this.timeRemaining=this.lifetime; +if(this.timerNode){ +this.timerNode.innerHTML=Math.ceil(this.timeRemaining/1000); +} +if(this.blockDuration&&this.closeNode){ +if(this.lifetime>this.blockDuration){ +this.closeNode.style.visibility="hidden"; +}else{ +this.closeNode.style.display="none"; +} +} +if(this.timer){ +clearInterval(this.timer); +} +this.timer=setInterval(dojo.lang.hitch(this,"_onTick"),100); +} +this.showModalDialog(); +dojo.widget.Dialog.superclass.show.call(this); +},onLoad:function(){ +this.placeModalDialog(); +dojo.widget.Dialog.superclass.onLoad.call(this); +},fillInTemplate:function(){ +},hide:function(){ +this.hideModalDialog(); +dojo.widget.Dialog.superclass.hide.call(this); +if(this.timer){ +clearInterval(this.timer); +} +},setTimerNode:function(node){ +this.timerNode=node; +},setCloseControl:function(node){ +this.closeNode=dojo.byId(node); +dojo.event.connect(this.closeNode,"onclick",this,"hide"); +},setShowControl:function(node){ +node=dojo.byId(node); +dojo.event.connect(node,"onclick",this,"show"); +},_onTick:function(){ +if(this.timer){ +this.timeRemaining-=100; +if(this.lifetime-this.timeRemaining>=this.blockDuration){ +if(this.closeNode){ +this.closeNode.style.visibility="visible"; +} +} +if(!this.timeRemaining){ +clearInterval(this.timer); +this.hide(); +}else{ +if(this.timerNode){ +this.timerNode.innerHTML=Math.ceil(this.timeRemaining/1000); +} +} +} +}}); +dojo.provide("dojo.widget.ResizeHandle"); +dojo.widget.defineWidget("dojo.widget.ResizeHandle",dojo.widget.HtmlWidget,{targetElmId:"",templateCssString:".dojoHtmlResizeHandle {\r\n\tfloat: right;\r\n\tposition: absolute;\r\n\tright: 2px;\r\n\tbottom: 2px;\r\n\twidth: 13px;\r\n\theight: 13px;\r\n\tz-index: 20;\r\n\tcursor: nw-resize;\r\n\tbackground-image: url(grabCorner.gif);\r\n\tline-height: 0px;\r\n}\r\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/ResizeHandle.css"),templateString:"
    ",postCreate:function(){ +dojo.event.connect(this.domNode,"onmousedown",this,"_beginSizing"); +},_beginSizing:function(e){ +if(this._isSizing){ +return false; +} +this.targetWidget=dojo.widget.byId(this.targetElmId); +this.targetDomNode=this.targetWidget?this.targetWidget.domNode:dojo.byId(this.targetElmId); +if(!this.targetDomNode){ +return; +} +this._isSizing=true; +this.startPoint={"x":e.clientX,"y":e.clientY}; +var mb=dojo.html.getMarginBox(this.targetDomNode); +this.startSize={"w":mb.width,"h":mb.height}; +dojo.event.kwConnect({srcObj:dojo.body(),srcFunc:"onmousemove",targetObj:this,targetFunc:"_changeSizing",rate:25}); +dojo.event.connect(dojo.body(),"onmouseup",this,"_endSizing"); +e.preventDefault(); +},_changeSizing:function(e){ +try{ +if(!e.clientX||!e.clientY){ +return; +} +} +catch(e){ +return; +} +var dx=this.startPoint.x-e.clientX; +var dy=this.startPoint.y-e.clientY; +var newW=this.startSize.w-dx; +var newH=this.startSize.h-dy; +if(this.minSize){ +var mb=dojo.html.getMarginBox(this.targetDomNode); +if(newW\r\n\t
    \r\n\t \t\r\n\t\t
    \r\n\t\t
    \r\n\t\t
    \r\n\t\t
    \r\n\t \t
    ${this.title}
    \r\n\t
    \r\n\r\n\t
    \r\n\r\n\t
    \r\n
    \r\n",templateCssString:"\r\n/********** Outer Window ***************/\r\n\r\n.dojoFloatingPane {\r\n\t/* essential css */\r\n\tposition: absolute;\r\n\toverflow: visible;\t\t/* so drop shadow is displayed */\r\n\tz-index: 10;\r\n\r\n\t/* styling css */\r\n\tborder: 1px solid;\r\n\tborder-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;\r\n\tbackground-color: ThreeDFace;\r\n}\r\n\r\n\r\n/********** Title Bar ****************/\r\n\r\n.dojoFloatingPaneTitleBar {\r\n\tvertical-align: top;\r\n\tmargin: 2px 2px 2px 2px;\r\n\tz-index: 10;\r\n\tbackground-color: #7596c6;\r\n\tcursor: default;\r\n\toverflow: hidden;\r\n\tborder-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;\r\n\tvertical-align: middle;\r\n}\r\n\r\n.dojoFloatingPaneTitleText {\r\n\tfloat: left;\r\n\tpadding: 2px 4px 2px 2px;\r\n\twhite-space: nowrap;\r\n\tcolor: CaptionText;\r\n\tfont: small-caption;\r\n}\r\n\r\n.dojoTitleBarIcon {\r\n\tfloat: left;\r\n\theight: 22px;\r\n\twidth: 22px;\r\n\tvertical-align: middle;\r\n\tmargin-right: 5px;\r\n\tmargin-left: 5px;\r\n}\r\n\r\n.dojoFloatingPaneActions{\r\n\tfloat: right;\r\n\tposition: absolute;\r\n\tright: 2px;\r\n\ttop: 2px;\r\n\tvertical-align: middle;\r\n}\r\n\r\n\r\n.dojoFloatingPaneActionItem {\r\n\tvertical-align: middle;\r\n\tmargin-right: 1px;\r\n\theight: 22px;\r\n\twidth: 22px;\r\n}\r\n\r\n\r\n.dojoFloatingPaneTitleBarIcon {\r\n\t/* essential css */\r\n\tfloat: left;\r\n\r\n\t/* styling css */\r\n\tmargin-left: 2px;\r\n\tmargin-right: 4px;\r\n\theight: 22px;\r\n}\r\n\r\n/* minimize/maximize icons are specified by CSS only */\r\n.dojoFloatingPaneMinimizeIcon,\r\n.dojoFloatingPaneMaximizeIcon,\r\n.dojoFloatingPaneRestoreIcon,\r\n.dojoFloatingPaneCloseIcon {\r\n\tvertical-align: middle;\r\n\theight: 22px;\r\n\twidth: 22px;\r\n\tfloat: right;\r\n}\r\n.dojoFloatingPaneMinimizeIcon {\r\n\tbackground-image: url(images/floatingPaneMinimize.gif);\r\n}\r\n.dojoFloatingPaneMaximizeIcon {\r\n\tbackground-image: url(images/floatingPaneMaximize.gif);\r\n}\r\n.dojoFloatingPaneRestoreIcon {\r\n\tbackground-image: url(images/floatingPaneRestore.gif);\r\n}\r\n.dojoFloatingPaneCloseIcon {\r\n\tbackground-image: url(images/floatingPaneClose.gif);\r\n}\r\n\r\n/* bar at bottom of window that holds resize handle */\r\n.dojoFloatingPaneResizebar {\r\n\tz-index: 10;\r\n\theight: 13px;\r\n\tbackground-color: ThreeDFace;\r\n}\r\n\r\n/************* Client Area ***************/\r\n\r\n.dojoFloatingPaneClient {\r\n\tposition: relative;\r\n\tz-index: 10;\r\n\tborder: 1px solid;\r\n\tborder-color: ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow;\r\n\tmargin: 2px;\r\n\tbackground-color: ThreeDFace;\r\n\tpadding: 8px;\r\n\tfont-family: Verdana, Helvetica, Garamond, sans-serif;\r\n\tfont-size: 12px;\r\n\toverflow: auto;\r\n}\r\n\r\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/FloatingPane.css"),fillInFloatingPaneTemplate:function(args,frag){ +var _b27=this.getFragNodeRef(frag); +dojo.html.copyStyle(this.domNode,_b27); +dojo.body().appendChild(this.domNode); +if(!this.isShowing()){ +this.windowState="minimized"; +} +if(this.iconSrc==""){ +dojo.html.removeNode(this.titleBarIcon); +}else{ +this.titleBarIcon.src=this.iconSrc.toString(); +} +if(this.titleBarDisplay){ +this.titleBar.style.display=""; +dojo.html.disableSelection(this.titleBar); +this.titleBarIcon.style.display=(this.iconSrc==""?"none":""); +this.minimizeAction.style.display=(this.displayMinimizeAction?"":"none"); +this.maximizeAction.style.display=(this.displayMaximizeAction&&this.windowState!="maximized"?"":"none"); +this.restoreAction.style.display=(this.displayMaximizeAction&&this.windowState=="maximized"?"":"none"); +this.closeAction.style.display=(this.displayCloseAction?"":"none"); +this.drag=new dojo.dnd.HtmlDragMoveSource(this.domNode); +if(this.constrainToContainer){ +this.drag.constrainTo(); +} +this.drag.setDragHandle(this.titleBar); +var self=this; +dojo.event.topic.subscribe("dragMove",function(info){ +if(info.source.domNode==self.domNode){ +dojo.event.topic.publish("floatingPaneMove",{source:self}); +} +}); +} +if(this.resizable){ +this.resizeBar.style.display=""; +this.resizeHandle=dojo.widget.createWidget("ResizeHandle",{targetElmId:this.widgetId,id:this.widgetId+"_resize"}); +this.resizeBar.appendChild(this.resizeHandle.domNode); +} +if(this.hasShadow){ +this.shadow=new dojo.lfx.shadow(this.domNode); +} +this.bgIframe=new dojo.html.BackgroundIframe(this.domNode); +if(this.taskBarId){ +this._taskBarSetup(); +} +dojo.body().removeChild(this.domNode); +},postCreate:function(){ +if(dojo.hostenv.post_load_){ +this._setInitialWindowState(); +}else{ +dojo.addOnLoad(this,"_setInitialWindowState"); +} +},maximizeWindow:function(evt){ +var mb=dojo.html.getMarginBox(this.domNode); +this.previous={width:mb.width||this.width,height:mb.height||this.height,left:this.domNode.style.left,top:this.domNode.style.top,bottom:this.domNode.style.bottom,right:this.domNode.style.right}; +if(this.domNode.parentNode.style.overflow.toLowerCase()!="hidden"){ +this.parentPrevious={overflow:this.domNode.parentNode.style.overflow}; +dojo.debug(this.domNode.parentNode.style.overflow); +this.domNode.parentNode.style.overflow="hidden"; +} +this.domNode.style.left=dojo.html.getPixelValue(this.domNode.parentNode,"padding-left",true)+"px"; +this.domNode.style.top=dojo.html.getPixelValue(this.domNode.parentNode,"padding-top",true)+"px"; +if((this.domNode.parentNode.nodeName.toLowerCase()=="body")){ +var _b2c=dojo.html.getViewport(); +var _b2d=dojo.html.getPadding(dojo.body()); +this.resizeTo(_b2c.width-_b2d.width,_b2c.height-_b2d.height); +}else{ +var _b2e=dojo.html.getContentBox(this.domNode.parentNode); +this.resizeTo(_b2e.width,_b2e.height); +} +this.maximizeAction.style.display="none"; +this.restoreAction.style.display=""; +if(this.resizeHandle){ +this.resizeHandle.domNode.style.display="none"; +} +this.drag.setDragHandle(null); +this.windowState="maximized"; +},minimizeWindow:function(evt){ +this.hide(); +for(var attr in this.parentPrevious){ +this.domNode.parentNode.style[attr]=this.parentPrevious[attr]; +} +this.lastWindowState=this.windowState; +this.windowState="minimized"; +},restoreWindow:function(evt){ +if(this.windowState=="minimized"){ +this.show(); +if(this.lastWindowState=="maximized"){ +this.domNode.parentNode.style.overflow="hidden"; +this.windowState="maximized"; +}else{ +this.windowState="normal"; +} +}else{ +if(this.windowState=="maximized"){ +for(var attr in this.previous){ +this.domNode.style[attr]=this.previous[attr]; +} +for(var attr in this.parentPrevious){ +this.domNode.parentNode.style[attr]=this.parentPrevious[attr]; +} +this.resizeTo(this.previous.width,this.previous.height); +this.previous=null; +this.parentPrevious=null; +this.restoreAction.style.display="none"; +this.maximizeAction.style.display=this.displayMaximizeAction?"":"none"; +if(this.resizeHandle){ +this.resizeHandle.domNode.style.display=""; +} +this.drag.setDragHandle(this.titleBar); +this.windowState="normal"; +}else{ +} +} +},toggleDisplay:function(){ +if(this.windowState=="minimized"){ +this.restoreWindow(); +}else{ +this.minimizeWindow(); +} +},closeWindow:function(evt){ +dojo.html.removeNode(this.domNode); +this.destroy(); +},onMouseDown:function(evt){ +this.bringToTop(); +},bringToTop:function(){ +var _b35=dojo.widget.manager.getWidgetsByType(this.widgetType); +var _b36=[]; +for(var x=0;x<_b35.length;x++){ +if(this.widgetId!=_b35[x].widgetId){ +_b36.push(_b35[x]); +} +} +_b36.sort(function(a,b){ +return a.domNode.style.zIndex-b.domNode.style.zIndex; +}); +_b36.push(this); +var _b3a=100; +for(x=0;x<_b36.length;x++){ +_b36[x].domNode.style.zIndex=_b3a+x*2; +} +},_setInitialWindowState:function(){ +if(this.isShowing()){ +this.width=-1; +var mb=dojo.html.getMarginBox(this.domNode); +this.resizeTo(mb.width,mb.height); +} +if(this.windowState=="maximized"){ +this.maximizeWindow(); +this.show(); +return; +} +if(this.windowState=="normal"){ +this.show(); +return; +} +if(this.windowState=="minimized"){ +this.hide(); +return; +} +this.windowState="minimized"; +},_taskBarSetup:function(){ +var _b3c=dojo.widget.getWidgetById(this.taskBarId); +if(!_b3c){ +if(this._taskBarConnectAttemptsthis._scrollThreshold){ +if(!this._fixEnabled){ +var _b4c=dojo.html.getMarginBox(tdn); +this.editor.editorObject.style.marginTop=_b4c.height+"px"; +if(isIE){ +tdn.style.left=dojo.html.abs(tdn,dojo.html.boxSizing.MARGIN_BOX).x; +if(tdn.previousSibling){ +this._IEOriginalPos=["after",tdn.previousSibling]; +}else{ +if(tdn.nextSibling){ +this._IEOriginalPos=["before",tdn.nextSibling]; +}else{ +this._IEOriginalPos=["",tdn.parentNode]; +} +} +dojo.body().appendChild(tdn); +dojo.html.addClass(tdn,"IEFixedToolbar"); +}else{ +with(tdn.style){ +position="fixed"; +top="0px"; +} +} +tdn.style.width=_b4c.width+"px"; +tdn.style.zIndex=1000; +this._fixEnabled=true; +} +if(!dojo.render.html.safari){ +var _b4d=(this.height)?parseInt(this.editor.height):this.editor._lastHeight; +if(_b4b>(this._scrollThreshold+_b4d)){ +tdn.style.display="none"; +}else{ +tdn.style.display=""; +} +} +}else{ +if(this._fixEnabled){ +(this.editor.object||this.editor.iframe).style.marginTop=null; +with(tdn.style){ +position=""; +top=""; +zIndex=""; +display=""; +} +if(isIE){ +tdn.style.left=""; +dojo.html.removeClass(tdn,"IEFixedToolbar"); +if(this._IEOriginalPos){ +dojo.html.insertAtPosition(tdn,this._IEOriginalPos[1],this._IEOriginalPos[0]); +this._IEOriginalPos=null; +}else{ +dojo.html.insertBefore(tdn,this.editor.object||this.editor.iframe); +} +} +tdn.style.width=""; +this._fixEnabled=false; +} +} +},destroy:function(){ +this._IEOriginalPos=null; +this._handleScroll=false; +clearInterval(this.scrollInterval); +this.editor.unregisterLoadedPlugin(this); +if(dojo.render.html.ie){ +dojo.html.removeClass(this.editor.toolbarWidget.domNode,"IEFixedToolbar"); +} +}}); +dojo.provide("dojo.widget.Editor2"); +dojo.widget.Editor2Manager=new dojo.widget.HandlerManager; +dojo.lang.mixin(dojo.widget.Editor2Manager,{_currentInstance:null,commandState:{Disabled:0,Latched:1,Enabled:2},getCurrentInstance:function(){ +return this._currentInstance; +},setCurrentInstance:function(inst){ +this._currentInstance=inst; +},getCommand:function(_b4f,name){ +var _b51; +name=name.toLowerCase(); +for(var i=0;ithis._updateTime||this._state==undefined){ +this._updateTime=this._editor._lastStateTimestamp; +try{ +if(this._editor.queryCommandEnabled(this._name)){ +if(this._editor.queryCommandState(this._name)){ +this._state=dojo.widget.Editor2Manager.commandState.Latched; +}else{ +this._state=dojo.widget.Editor2Manager.commandState.Enabled; +} +}else{ +this._state=dojo.widget.Editor2Manager.commandState.Disabled; +} +} +catch(e){ +this._state=dojo.widget.Editor2Manager.commandState.Enabled; +} +} +return this._state; +},getValue:function(){ +try{ +return this._editor.queryCommandValue(this._name); +} +catch(e){ +} +}}); +dojo.lang.declare("dojo.widget.Editor2FormatBlockCommand",dojo.widget.Editor2BrowserCommand,{}); +dojo.widget.defineWidget("dojo.widget.Editor2Dialog",[dojo.widget.HtmlWidget,dojo.widget.FloatingPaneBase,dojo.widget.ModalDialogBase],{templateString:"
    \r\n\t\r\n\t\r\n\t
    \r\n\t \t\r\n\t\t
    \r\n\t\t
    \r\n\t\t
    \r\n\t\t
    \r\n\t \t
    ${this.title}
    \r\n\t
    \r\n\r\n\t
    \r\n\t\r\n\t\r\n\t
    \r\n
    \r\n",modal:true,width:"",height:"",windowState:"minimized",displayCloseAction:true,contentFile:"",contentClass:"",fillInTemplate:function(args,frag){ +this.fillInFloatingPaneTemplate(args,frag); +dojo.widget.Editor2Dialog.superclass.fillInTemplate.call(this,args,frag); +},postCreate:function(){ +if(this.contentFile){ +dojo.require(this.contentFile); +} +if(this.modal){ +dojo.widget.ModalDialogBase.prototype.postCreate.call(this); +}else{ +with(this.domNode.style){ +zIndex=999; +display="none"; +} +} +dojo.widget.FloatingPaneBase.prototype.postCreate.apply(this,arguments); +dojo.widget.Editor2Dialog.superclass.postCreate.call(this); +if(this.width&&this.height){ +with(this.domNode.style){ +width=this.width; +height=this.height; +} +} +},createContent:function(){ +if(!this.contentWidget&&this.contentClass){ +this.contentWidget=dojo.widget.createWidget(this.contentClass); +this.addChild(this.contentWidget); +} +},show:function(){ +if(!this.contentWidget){ +dojo.widget.Editor2Dialog.superclass.show.apply(this,arguments); +this.createContent(); +dojo.widget.Editor2Dialog.superclass.hide.call(this); +} +if(!this.contentWidget||!this.contentWidget.loadContent()){ +return; +} +this.showFloatingPane(); +dojo.widget.Editor2Dialog.superclass.show.apply(this,arguments); +if(this.modal){ +this.showModalDialog(); +} +if(this.modal){ +this.bg.style.zIndex=this.domNode.style.zIndex-1; +} +},onShow:function(){ +dojo.widget.Editor2Dialog.superclass.onShow.call(this); +this.onFloatingPaneShow(); +},closeWindow:function(){ +this.hide(); +dojo.widget.Editor2Dialog.superclass.closeWindow.apply(this,arguments); +},hide:function(){ +if(this.modal){ +this.hideModalDialog(); +} +dojo.widget.Editor2Dialog.superclass.hide.call(this); +},checkSize:function(){ +if(this.isShowing()){ +if(this.modal){ +this._sizeBackground(); +} +this.placeModalDialog(); +this.onResized(); +} +}}); +dojo.widget.defineWidget("dojo.widget.Editor2DialogContent",dojo.widget.HtmlWidget,{widgetsInTemplate:true,loadContent:function(){ +return true; +},cancel:function(){ +this.parent.hide(); +}}); +dojo.lang.declare("dojo.widget.Editor2DialogCommand",dojo.widget.Editor2BrowserCommand,function(_b5d,name,_b5f){ +this.dialogParas=_b5f; +},{execute:function(){ +if(!this.dialog){ +if(!this.dialogParas.contentFile||!this.dialogParas.contentClass){ +alert("contentFile and contentClass should be set for dojo.widget.Editor2DialogCommand.dialogParas!"); +return; +} +this.dialog=dojo.widget.createWidget("Editor2Dialog",this.dialogParas); +dojo.body().appendChild(this.dialog.domNode); +dojo.event.connect(this,"destroy",this.dialog,"destroy"); +} +this.dialog.show(); +},getText:function(){ +return this.dialogParas.title||dojo.widget.Editor2DialogCommand.superclass.getText.call(this); +}}); +dojo.widget.Editor2ToolbarGroups={}; +dojo.widget.defineWidget("dojo.widget.Editor2",dojo.widget.RichText,function(){ +this._loadedCommands={}; +},{toolbarAlwaysVisible:false,toolbarWidget:null,scrollInterval:null,toolbarTemplatePath:dojo.uri.cache.set(dojo.uri.moduleUri("dojo.widget","templates/EditorToolbarOneline.html"), "
    \r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t<h>\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t 
    \r\n
    \r\n"),toolbarTemplateCssPath:null,toolbarPlaceHolder:"",_inSourceMode:false,_htmlEditNode:null,toolbarGroup:"",shareToolbar:false,contextMenuGroupSet:"",editorOnLoad:function(){ +dojo.event.topic.publish("dojo.widget.Editor2::preLoadingToolbar",this); +if(this.toolbarAlwaysVisible){ +} +if(this.toolbarWidget){ +this.toolbarWidget.show(); +dojo.html.insertBefore(this.toolbarWidget.domNode,this.domNode.firstChild); +}else{ +if(this.shareToolbar){ +dojo.deprecated("Editor2:shareToolbar is deprecated in favor of toolbarGroup","0.5"); +this.toolbarGroup="defaultDojoToolbarGroup"; +} +if(this.toolbarGroup){ +if(dojo.widget.Editor2ToolbarGroups[this.toolbarGroup]){ +this.toolbarWidget=dojo.widget.Editor2ToolbarGroups[this.toolbarGroup]; +} +} +if(!this.toolbarWidget){ +var _b60={shareGroup:this.toolbarGroup,parent:this}; +_b60.templateString=dojo.uri.cache.get(this.toolbarTemplatePath); +if(this.toolbarTemplateCssPath){ +_b60.templateCssPath=this.toolbarTemplateCssPath; +_b60.templateCssString=dojo.uri.cache.get(this.toolbarTemplateCssPath); +} +if(this.toolbarPlaceHolder){ +this.toolbarWidget=dojo.widget.createWidget("Editor2Toolbar",_b60,dojo.byId(this.toolbarPlaceHolder),"after"); +}else{ +this.toolbarWidget=dojo.widget.createWidget("Editor2Toolbar",_b60,this.domNode.firstChild,"before"); +} +if(this.toolbarGroup){ +dojo.widget.Editor2ToolbarGroups[this.toolbarGroup]=this.toolbarWidget; +} +dojo.event.connect(this,"close",this.toolbarWidget,"hide"); +this.toolbarLoaded(); +} +} +dojo.event.topic.registerPublisher("Editor2.clobberFocus",this,"clobberFocus"); +dojo.event.topic.subscribe("Editor2.clobberFocus",this,"setBlur"); +dojo.event.topic.publish("dojo.widget.Editor2::onLoad",this); +},toolbarLoaded:function(){ +},registerLoadedPlugin:function(obj){ +if(!this.loadedPlugins){ +this.loadedPlugins=[]; +} +this.loadedPlugins.push(obj); +},unregisterLoadedPlugin:function(obj){ +for(var i in this.loadedPlugins){ +if(this.loadedPlugins[i]===obj){ +delete this.loadedPlugins[i]; +return; +} +} +dojo.debug("dojo.widget.Editor2.unregisterLoadedPlugin: unknow plugin object: "+obj); +},execCommand:function(_b64,_b65){ +switch(_b64.toLowerCase()){ +case "htmltoggle": +this.toggleHtmlEditing(); +break; +default: +dojo.widget.Editor2.superclass.execCommand.apply(this,arguments); +} +},queryCommandEnabled:function(_b66,_b67){ +switch(_b66.toLowerCase()){ +case "htmltoggle": +return true; +default: +if(this._inSourceMode){ +return false; +} +return dojo.widget.Editor2.superclass.queryCommandEnabled.apply(this,arguments); +} +},queryCommandState:function(_b68,_b69){ +switch(_b68.toLowerCase()){ +case "htmltoggle": +return this._inSourceMode; +default: +return dojo.widget.Editor2.superclass.queryCommandState.apply(this,arguments); +} +},onClick:function(e){ +dojo.widget.Editor2.superclass.onClick.call(this,e); +if(dojo.widget.PopupManager){ +if(!e){ +e=this.window.event; +} +dojo.widget.PopupManager.onClick(e); +} +},clobberFocus:function(){ +},toggleHtmlEditing:function(){ +if(this===dojo.widget.Editor2Manager.getCurrentInstance()){ +if(!this._inSourceMode){ +var html=this.getEditorContent(); +this._inSourceMode=true; +if(!this._htmlEditNode){ +this._htmlEditNode=dojo.doc().createElement("textarea"); +dojo.html.insertAfter(this._htmlEditNode,this.editorObject); +} +this._htmlEditNode.style.display=""; +this._htmlEditNode.style.width="100%"; +this._htmlEditNode.style.height=dojo.html.getBorderBox(this.editNode).height+"px"; +this._htmlEditNode.value=html; +with(this.editorObject.style){ +position="absolute"; +left="-2000px"; +top="-2000px"; +} +}else{ +this._inSourceMode=false; +this._htmlEditNode.blur(); +with(this.editorObject.style){ +position=""; +left=""; +top=""; +} +var html=this._htmlEditNode.value; +dojo.lang.setTimeout(this,"replaceEditorContent",1,html); +this._htmlEditNode.style.display="none"; +this.focus(); +} +this.onDisplayChanged(null,true); +} +},setFocus:function(){ +if(dojo.widget.Editor2Manager.getCurrentInstance()===this){ +return; +} +this.clobberFocus(); +dojo.widget.Editor2Manager.setCurrentInstance(this); +},setBlur:function(){ +},saveSelection:function(){ +this._bookmark=null; +this._bookmark=dojo.withGlobal(this.window,dojo.html.selection.getBookmark); +},restoreSelection:function(){ +if(this._bookmark){ +this.focus(); +dojo.withGlobal(this.window,"moveToBookmark",dojo.html.selection,[this._bookmark]); +this._bookmark=null; +}else{ +dojo.debug("restoreSelection: no saved selection is found!"); +} +},_updateToolbarLastRan:null,_updateToolbarTimer:null,_updateToolbarFrequency:500,updateToolbar:function(_b6c){ +if((!this.isLoaded)||(!this.toolbarWidget)){ +return; +} +var diff=new Date()-this._updateToolbarLastRan; +if((!_b6c)&&(this._updateToolbarLastRan)&&((diff-1?"&":"?")+"struts.enableJSONValidation=true"; +if(!this.ajaxAfterValidation&&this.validate){ +_ba1=_ba1+(_ba1.indexOf("?")>-1?"&":"?")+"struts.validateOnly=true"; +} +if(dojo.dom.isTag(this.domNode,"INPUT","input")&&this.events=="onclick"&&this.domNode.type=="submit"&&!dojo.string.isBlank(this.domNode.name)&&!dojo.string.isBlank(this.domNode.value)){ +var enc=/utf/i.test("")?encodeURIComponent:dojo.string.encodeAscii; +_ba1=_ba1+(_ba1.indexOf("?")>-1?"&":"?")+enc(this.domNode.name)+"="+enc(this.domNode.value); +} +dojo.io.bind({url:_ba1,useCache:false,preventCache:true,formNode:self.formNode,formFilter:window[self.formFilter],transport:self.transport,handler:function(type,data,e){ +dojo.lang.hitch(self,"bindHandler")(type,data,e); +},mimetype:"text/html"}); +} +catch(ex){ +if(this.showError){ +var _ba6=dojo.string.isBlank(this.errorText)?ex:this.errorText; +this.setContent(_ba6); +} +} +} +},parse:function(s){ +this.log("Parsing: "+s); +var _ba8=[]; +var tmp=[]; +var _baa=[]; +while(_ba8){ +_ba8=s.match(/]*)>([\s\S]*?)<\/script>/i); +if(!_ba8){ +break; +} +if(_ba8[1]){ +attr=_ba8[1].match(/src=(['"]?)([^"']*)\1/i); +if(attr){ +var tmp2=attr[2].search(/.*(\bdojo\b(?:\.uncompressed)?\.js)$/); +if(tmp2>-1){ +this.log("Security note! inhibit:"+attr[2]+" from beeing loaded again."); +} +} +} +if(_ba8[2]){ +var sc=_ba8[2].replace(/(?:var )?\bdjConfig\b(?:[\s]*=[\s]*\{[^}]+\}|\.[\w]*[\s]*=[\s]*[^;\n]*)?;?|dojo\.hostenv\.writeIncludes\(\s*\);?/g,""); +if(!sc){ +continue; +} +tmp=[]; +while(tmp){ +tmp=sc.match(/dojo\.(?:(?:require(?:After)?(?:If)?)|(?:widget\.(?:manager\.)?registerWidgetPackage)|(?:(?:hostenv\.)?setModulePrefix))\((['"]).*?\1\)\s*;?/); +if(!tmp){ +break; +} +sc=sc.replace(tmp[0],""); +} +_baa.push(sc); +} +s=s.replace(/]*>[\s\S]*?<\/script>/i,""); +} +return {text:s,scripts:_baa}; +},_executeScripts:function(_bad){ +var self=this; +var tmp="",code=""; +for(var i=0;i<_bad.length;i++){ +if(_bad[i].path){ +dojo.io.bind(this._cacheSetting({"url":_bad[i].path,"load":function(type,_bb3){ +dojo.lang.hitch(self,tmp=";"+_bb3); +},"error":function(type,_bb5){ +_bb5.text=type+" downloading remote script"; +self._handleDefaults.call(self,_bb5,"onExecError","debug"); +},"mimetype":"text/plain","sync":true},this.cacheContent)); +code+=tmp; +}else{ +code+=_bad[i]; +} +} +try{ +if(this.scriptSeparation){ +delete this.scriptScope; +this.scriptScope=new (new Function("_container_",code+"; return this;"))(self); +}else{ +var djg=dojo.global(); +if(djg.execScript){ +djg.execScript(code); +}else{ +var djd=dojo.doc(); +var sc=djd.createElement("script"); +sc.appendChild(djd.createTextNode(code)); +(this.containerNode||this.domNode).appendChild(sc); +} +} +} +catch(e){ +e.text="Error running scripts from content:\n"+e.description; +this.log(e); +} +},_cacheSetting:function(_bb9,_bba){ +for(var x in this.bindArgs){ +if(dojo.lang.isUndefined(_bb9[x])){ +_bb9[x]=this.bindArgs[x]; +} +} +if(dojo.lang.isUndefined(_bb9.useCache)){ +_bb9.useCache=_bba; +} +if(dojo.lang.isUndefined(_bb9.preventCache)){ +_bb9.preventCache=!_bba; +} +if(dojo.lang.isUndefined(_bb9.mimetype)){ +_bb9.mimetype="text/html"; +} +return _bb9; +}}); +dojo.provide("dojo.lang.timing.Timer"); +dojo.lang.timing.Timer=function(_bbc){ +this.timer=null; +this.isRunning=false; +this.interval=_bbc; +this.onStart=null; +this.onStop=null; +}; +dojo.extend(dojo.lang.timing.Timer,{onTick:function(){ +},setInterval:function(_bbd){ +if(this.isRunning){ +dj_global.clearInterval(this.timer); +} +this.interval=_bbd; +if(this.isRunning){ +this.timer=dj_global.setInterval(dojo.lang.hitch(this,"onTick"),this.interval); +} +},start:function(){ +if(typeof this.onStart=="function"){ +this.onStart(); +} +this.isRunning=true; +this.timer=dj_global.setInterval(dojo.lang.hitch(this,"onTick"),this.interval); +},stop:function(){ +if(typeof this.onStop=="function"){ +this.onStop(); +} +this.isRunning=false; +dj_global.clearInterval(this.timer); +}}); +dojo.provide("struts.widget.BindDiv"); +dojo.widget.defineWidget("struts.widget.BindDiv",dojo.widget.ContentPane,{widgetType:"BindDiv",href:"",extractContent:false,parseContent:false,cacheContent:false,refreshOnShow:false,executeScripts:false,preload:true,updateFreq:0,delay:0,autoStart:true,timer:null,loadingText:"Loading...",showLoading:false,errorText:"",showError:true,listenTopics:"",notifyTopics:"",notifyTopicsArray:null,stopTimerListenTopics:"",startTimerListenTopics:"",beforeNotifyTopics:"",beforeNotifyTopicsArray:null,afterNotifyTopics:"",afterNotifyTopicsArray:null,errorNotifyTopics:"",errorNotifyTopicsArray:null,beforeLoading:"",afterLoading:"",formId:"",formFilter:"",indicator:"",parseContent:true,highlightColor:"",highlightDuration:2000,disabled:false,transport:"",onDownloadStart:function(_bbe){ +if(!this.showLoading){ +_bbe.returnValue=false; +return; +} +if(this.showLoading&&!dojo.string.isBlank(this.loadingText)){ +_bbe.text=this.loadingText; +} +},highlight:function(){ +if(!dojo.string.isBlank(this.highlightColor)){ +var _bbf=dojo.lfx.html.highlight([this.domNode],this.highlightColor,this.highlightDuration); +_bbf.play(); +} +},onDownloadError:function(_bc0){ +this.onError(_bc0); +},onContentError:function(_bc1){ +this.onError(_bc1); +},onExecError:function(_bc2){ +this.onError(_bc2); +},onError:function(_bc3){ +if(this.showError){ +if(!dojo.string.isBlank(this.errorText)){ +_bc3.text=this.errorText; +} +}else{ +_bc3.text=""; +} +},notify:function(data,type,e){ +if(this.notifyTopicsArray){ +var self=this; +dojo.lang.forEach(this.notifyTopicsArray,function(_bc8){ +try{ +dojo.event.topic.publish(_bc8,data,type,e,self); +} +catch(ex){ +self.log(ex); +} +}); +} +var _bc9=null; +switch(type){ +case "before": +this.notifyTo(this.beforeNotifyTopicsArray,null,e); +break; +case "load": +this.notifyTo(this.afterNotifyTopicsArray,data,e); +break; +case "error": +this.notifyTo(this.errorNotifyTopicsArray,data,e); +break; +} +},notifyTo:function(_bca,data,e){ +var self=this; +if(_bca){ +dojo.lang.forEach(_bca,function(_bce){ +try{ +if(data!=null){ +dojo.event.topic.publish(_bce,data,e,self); +}else{ +dojo.event.topic.publish(_bce,e,self); +} +} +catch(ex){ +self.log(ex); +} +}); +} +},postCreate:function(args,frag){ +if(this.handler!==""){ +this.setHandler(this.handler); +} +var self=this; +var _bd2=function(){ +dojo.lang.hitch(self,"refresh")(); +}; +var _bd3=function(){ +dojo.lang.hitch(self,"startTimer")(); +}; +if(this.updateFreq>0){ +this.timer=new dojo.lang.timing.Timer(this.updateFreq); +this.timer.onTick=_bd2; +if(this.autoStart){ +if(this.delay>0){ +dojo.lang.setTimeout(_bd3,this.delay); +}else{ +this.startTimer(); +} +} +}else{ +if(this.delay>0){ +dojo.lang.setTimeout(_bd2,this.delay); +} +} +if(!dojo.string.isBlank(this.listenTopics)){ +this.log("Listening to "+this.listenTopics+" to refresh"); +var _bd4=this.listenTopics.split(","); +if(_bd4){ +dojo.lang.forEach(_bd4,function(_bd5){ +dojo.event.topic.subscribe(_bd5,self,"refresh"); +}); +} +} +if(!dojo.string.isBlank(this.stopTimerListenTopics)){ +this.log("Listening to "+this.stopTimerListenTopics+" to stop timer"); +var _bd6=this.stopTimerListenTopics.split(","); +if(_bd6){ +dojo.lang.forEach(_bd6,function(_bd7){ +dojo.event.topic.subscribe(_bd7,self,"stopTimer"); +}); +} +} +if(!dojo.string.isBlank(this.startTimerListenTopics)){ +this.log("Listening to "+this.stopTimerListenTopics+" to start timer"); +var _bd8=this.startTimerListenTopics.split(","); +if(_bd8){ +dojo.lang.forEach(_bd8,function(_bd9){ +dojo.event.topic.subscribe(_bd9,self,"startTimer"); +}); +} +} +if(!dojo.string.isBlank(this.notifyTopics)){ +this.notifyTopicsArray=this.notifyTopics.split(","); +} +if(!dojo.string.isBlank(this.beforeNotifyTopics)){ +this.beforeNotifyTopicsArray=this.beforeNotifyTopics.split(","); +} +if(!dojo.string.isBlank(this.afterNotifyTopics)){ +this.afterNotifyTopicsArray=this.afterNotifyTopics.split(","); +} +if(!dojo.string.isBlank(this.errorNotifyTopics)){ +this.errorNotifyTopicsArray=this.errorNotifyTopics.split(","); +} +if(this.isShowing()&&this.preload&&this.updateFreq<=0&&this.delay<=0){ +this.refresh(); +} +},_downloadExternalContent:function(url,_bdb){ +var _bdc={cancel:false}; +this.notify(this.widgetId,"before",_bdc); +if(_bdc.cancel){ +return; +} +dojo.html.show(this.indicator); +this._handleDefaults("Loading...","onDownloadStart"); +var self=this; +dojo.io.bind({url:url,useCache:_bdb,preventCache:!_bdb,mimetype:"text/html",formNode:dojo.byId(self.formId),formFilter:window[self.formFilter],transport:self.transport,handler:function(type,data,e){ +dojo.html.hide(self.indicator); +self.notify(data,type,e); +if(type=="load"){ +self.onDownloadEnd.call(self,url,data); +self.highlight(); +}else{ +self._handleDefaults.call(self,"Error loading '"+url+"' ("+e.status+" "+e.statusText+")","onDownloadError"); +self.onLoad(); +} +}}); +},log:function(text){ +dojo.debug("["+this.widgetId+"] "+text); +},stopTimer:function(){ +if(this.timer&&this.timer.isRunning){ +this.log("stopping timer"); +this.timer.stop(); +} +},startTimer:function(){ +if(this.timer&&!this.timer.isRunning){ +this.log("starting timer with update interval "+this.updateFreq); +this.timer.start(); +} +},splitAndFixPaths:function(s,url){ +var _be4=[],_be5=[],tmp=[]; +var _be7=[],_be8=[],attr=[],_bea=[]; +var str="",path="",fix="",_bee="",tag="",_bf0=""; +if(!url){ +url="./"; +} +if(s){ +var _bf1=/]*>([\s\S]*?)<\/title>/i; +while(_be7=_bf1.exec(s)){ +_be4.push(_be7[1]); +s=s.substring(0,_be7.index)+s.substr(_be7.index+_be7[0].length); +} +if(this.adjustPaths){ +var _bf2=/<[a-z][a-z0-9]*[^>]*\s(?:(?:src|href|style)=[^>])+[^>]*>/i; +var _bf3=/\s(src|href|style)=(['"]?)([\w()\[\]\/.,\\'"-:;#=&?\s@!]+?)\2/i; +var _bf4=/^(?:[#]|(?:(?:https?|ftps?|file|javascript|mailto|news):))/; +while(tag=_bf2.exec(s)){ +str+=s.substring(0,tag.index); +s=s.substring((tag.index+tag[0].length),s.length); +tag=tag[0]; +_bee=""; +while(attr=_bf3.exec(tag)){ +path=""; +_bf0=attr[3]; +switch(attr[1].toLowerCase()){ +case "src": +case "href": +if(_bf4.exec(_bf0)){ +path=_bf0; +}else{ +path=(new dojo.uri.Uri(url,_bf0).toString()); +} +break; +case "style": +path=dojo.html.fixPathsInCssText(_bf0,url); +break; +default: +path=_bf0; +} +fix=" "+attr[1]+"="+attr[2]+path+attr[2]; +_bee+=tag.substring(0,attr.index)+fix; +tag=tag.substring((attr.index+attr[0].length),tag.length); +} +str+=_bee+tag; +} +s=str+s; +} +_bf1=/(?:<(style)[^>]*>([\s\S]*?)<\/style>|]*rel=['"]?stylesheet['"]?[^>]*)>)/i; +while(_be7=_bf1.exec(s)){ +if(_be7[1]&&_be7[1].toLowerCase()=="style"){ +_bea.push(dojo.html.fixPathsInCssText(_be7[2],url)); +}else{ +if(attr=_be7[3].match(/href=(['"]?)([^'">]*)\1/i)){ +_bea.push({path:attr[2]}); +} +} +s=s.substring(0,_be7.index)+s.substr(_be7.index+_be7[0].length); +} +var _bf1=/]*)>([\s\S]*?)<\/script>/i; +var _bf5=/src=(['"]?)([^"']*)\1/i; +var _bf6=/.*(\bdojo\b\.js(?:\.uncompressed\.js)?)$/; +var _bf7=/(?:var )?\bdjConfig\b(?:[\s]*=[\s]*\{[^}]+\}|\.[\w]*[\s]*=[\s]*[^;\n]*)?;?|dojo\.hostenv\.writeIncludes\(\s*\);?/g; +var _bf8=/dojo\.(?:(?:require(?:After)?(?:If)?)|(?:widget\.(?:manager\.)?registerWidgetPackage)|(?:(?:hostenv\.)?setModulePrefix|registerModulePath)|defineNamespace)\((['"]).*?\1\)\s*;?/; +while(_be7=_bf1.exec(s)){ +if(this.executeScripts&&_be7[1]){ +if(attr=_bf5.exec(_be7[1])){ +if(_bf6.exec(attr[2])){ +dojo.debug("Security note! inhibit:"+attr[2]+" from being loaded again."); +}else{ +_be5.push({path:attr[2]}); +} +} +} +if(_be7[2]){ +var sc=_be7[2].replace(_bf7,""); +if(!sc){ +continue; +} +while(tmp=_bf8.exec(sc)){ +_be8.push(tmp[0]); +sc=sc.substring(0,tmp.index)+sc.substr(tmp.index+tmp[0].length); +} +if(this.executeScripts){ +_be5.push(sc); +} +} +s=s.substr(0,_be7.index)+s.substr(_be7.index+_be7[0].length); +} +if(this.extractContent){ +_be7=s.match(/]*>\s*([\s\S]+)\s*<\/body>/im); +if(_be7){ +s=_be7[1]; +} +} +if(this.executeScripts&&this.scriptSeparation){ +var _bf1=/(<[a-zA-Z][a-zA-Z0-9]*\s[^>]*?\S=)((['"])[^>]*scriptScope[^>]*>)/; +var _bfa=/([\s'";:\(])scriptScope(.*)/; +str=""; +while(tag=_bf1.exec(s)){ +tmp=((tag[3]=="'")?"\"":"'"); +fix=""; +str+=s.substring(0,tag.index)+tag[1]; +while(attr=_bfa.exec(tag[2])){ +tag[2]=tag[2].substring(0,attr.index)+attr[1]+"dojo.widget.byId("+tmp+this.widgetId+tmp+").scriptScope"+attr[2]; +} +str+=tag[2]; +s=s.substr(tag.index+tag[0].length); +} +s=str+s; +} +} +return {"xml":s,"styles":_bea,"titles":_be4,"requires":_be8,"scripts":_be5,"url":url}; +}}); +dojo.provide("struts.widget.BindAnchor"); +dojo.widget.defineWidget("struts.widget.BindAnchor",struts.widget.Bind,{widgetType:"BindAnchor",events:"onclick",postCreate:function(){ +struts.widget.BindAnchor.superclass.postCreate.apply(this); +this.domNode.href="#"; +}}); +dojo.provide("dojo.widget.html.stabile"); +dojo.widget.html.stabile={_sqQuotables:new RegExp("([\\\\'])","g"),_depth:0,_recur:false,depthLimit:2}; +dojo.widget.html.stabile.getState=function(id){ +dojo.widget.html.stabile.setup(); +return dojo.widget.html.stabile.widgetState[id]; +}; +dojo.widget.html.stabile.setState=function(id,_bfd,_bfe){ +dojo.widget.html.stabile.setup(); +dojo.widget.html.stabile.widgetState[id]=_bfd; +if(_bfe){ +dojo.widget.html.stabile.commit(dojo.widget.html.stabile.widgetState); +} +}; +dojo.widget.html.stabile.setup=function(){ +if(!dojo.widget.html.stabile.widgetState){ +var text=dojo.widget.html.stabile._getStorage().value; +dojo.widget.html.stabile.widgetState=text?dj_eval("("+text+")"):{}; +} +}; +dojo.widget.html.stabile.commit=function(_c00){ +dojo.widget.html.stabile._getStorage().value=dojo.widget.html.stabile.description(_c00); +}; +dojo.widget.html.stabile.description=function(v,_c02){ +var _c03=dojo.widget.html.stabile._depth; +var _c04=function(){ +return this.description(this,true); +}; +try{ +if(v===void (0)){ +return "undefined"; +} +if(v===null){ +return "null"; +} +if(typeof (v)=="boolean"||typeof (v)=="number"||v instanceof Boolean||v instanceof Number){ +return v.toString(); +} +if(typeof (v)=="string"||v instanceof String){ +var v1=v.replace(dojo.widget.html.stabile._sqQuotables,"\\$1"); +v1=v1.replace(/\n/g,"\\n"); +v1=v1.replace(/\r/g,"\\r"); +return "'"+v1+"'"; +} +if(v instanceof Date){ +return "new Date("+d.getFullYear+","+d.getMonth()+","+d.getDate()+")"; +} +var d; +if(v instanceof Array||v.push){ +if(_c03>=dojo.widget.html.stabile.depthLimit){ +return "[ ... ]"; +} +d="["; +var _c07=true; +dojo.widget.html.stabile._depth++; +for(var i=0;i=dojo.widget.html.stabile.depthLimit){ +return "{ ... }"; +} +if(typeof (v.hasOwnProperty)!="function"&&v.prototype){ +throw new Error("description: "+v+" not supported by script engine"); +} +var _c07=true; +d="{"; +dojo.widget.html.stabile._depth++; +for(var key in v){ +if(v[key]==void (0)||typeof (v[key])=="function"){ +continue; +} +if(_c07){ +_c07=false; +}else{ +d+=", "; +} +var kd=key; +if(!kd.match(/^[a-zA-Z_][a-zA-Z0-9_]*$/)){ +kd=arguments.callee(key,_c02); +} +d+=kd+": "+arguments.callee(v[key],_c02); +} +return d+"}"; +} +if(_c02){ +if(dojo.widget.html.stabile._recur){ +var _c0b=Object.prototype.toString; +return _c0b.apply(v,[]); +}else{ +dojo.widget.html.stabile._recur=true; +return v.toString(); +} +}else{ +throw new Error("Unknown type: "+v); +return "'unknown'"; +} +} +finally{ +dojo.widget.html.stabile._depth=_c03; +} +}; +dojo.widget.html.stabile._getStorage=function(){ +if(dojo.widget.html.stabile.dataField){ +return dojo.widget.html.stabile.dataField; +} +var form=document.forms._dojo_form; +return dojo.widget.html.stabile.dataField=form?form.stabile:{value:""}; +}; +dojo.provide("dojo.widget.ComboBox"); +dojo.declare("dojo.widget.incrementalComboBoxDataProvider",null,function(_c0d){ +this.searchUrl=_c0d.dataUrl; +this._cache={}; +this._inFlight=false; +this._lastRequest=null; +this.allowCache=false; +},{_addToCache:function(_c0e,data){ +if(this.allowCache){ +this._cache[_c0e]=data; +} +},startSearch:function(_c10,_c11){ +if(this._inFlight){ +} +var tss=encodeURIComponent(_c10); +var _c13=dojo.string.substituteParams(this.searchUrl,{"searchString":tss}); +var _c14=this; +var _c15=this._lastRequest=dojo.io.bind({url:_c13,method:"get",mimetype:"text/json",load:function(type,data,evt){ +_c14._inFlight=false; +if(!dojo.lang.isArray(data)){ +var _c19=[]; +for(var key in data){ +_c19.push([data[key],key]); +} +data=_c19; +} +_c14._addToCache(_c10,data); +if(_c15==_c14._lastRequest){ +_c11(data); +} +}}); +this._inFlight=true; +}}); +dojo.declare("dojo.widget.basicComboBoxDataProvider",null,function(_c1b,node){ +this._data=[]; +this.searchLimit=30; +this.searchType="STARTSTRING"; +this.caseSensitive=false; +if(!dj_undef("dataUrl",_c1b)&&!dojo.string.isBlank(_c1b.dataUrl)){ +this._getData(_c1b.dataUrl); +}else{ +if((node)&&(node.nodeName.toLowerCase()=="select")){ +var opts=node.getElementsByTagName("option"); +var ol=opts.length; +var data=[]; +for(var x=0;x0)&&(ret.length>=this.searchLimit)){ +break; +} +var _c30=new String((!this.caseSensitive)?this._data[x][0].toLowerCase():this._data[x][0]); +if(_c30.length<_c2b.length){ +continue; +} +if(st=="STARTSTRING"){ +if(_c2b==_c30.substr(0,_c2b.length)){ +ret.push(this._data[x]); +} +}else{ +if(st=="SUBSTRING"){ +if(_c30.indexOf(_c2b)>=0){ +ret.push(this._data[x]); +} +}else{ +if(st=="STARTWORD"){ +var idx=_c30.indexOf(_c2b); +if(idx==0){ +ret.push(this._data[x]); +} +if(idx<=0){ +continue; +} +var _c32=false; +while(idx!=-1){ +if(" ,/(".indexOf(_c30.charAt(idx-1))!=-1){ +_c32=true; +break; +} +idx=_c30.indexOf(_c2b,idx+1); +} +if(!_c32){ +continue; +}else{ +ret.push(this._data[x]); +} +} +} +} +} +_c2c(ret); +},setData:function(_c33){ +this._data=_c33; +}}); +dojo.widget.defineWidget("dojo.widget.ComboBox",dojo.widget.HtmlWidget,{forceValidOption:false,searchType:"stringstart",dataProvider:null,autoComplete:true,searchDelay:100,dataUrl:"",fadeTime:200,maxListLength:8,mode:"local",selectedResult:null,dataProviderClass:"",buttonSrc:dojo.uri.moduleUri("dojo.widget","templates/images/combo_box_arrow.png"),dropdownToggle:"fade",templateString:"\r\n",templateCssString:".dojoComboBoxOuter {\r\n\tborder: 0px !important;\r\n\tmargin: 0px !important;\r\n\tpadding: 0px !important;\r\n\tbackground: transparent !important;\r\n\twhite-space: nowrap !important;\r\n}\r\n\r\n.dojoComboBox {\r\n\tborder: 1px inset #afafaf;\r\n\tmargin: 0px;\r\n\tpadding: 0px;\r\n\tvertical-align: middle !important;\r\n\tfloat: none !important;\r\n\tposition: static !important;\r\n\tdisplay: inline !important;\r\n}\r\n\r\n/* the input box */\r\ninput.dojoComboBox {\r\n\tborder-right-width: 0px !important; \r\n\tmargin-right: 0px !important;\r\n\tpadding-right: 0px !important;\r\n}\r\n\r\n/* the down arrow */\r\nimg.dojoComboBox {\r\n\tborder-left-width: 0px !important;\r\n\tpadding-left: 0px !important;\r\n\tmargin-left: 0px !important;\r\n}\r\n\r\n/* IE vertical-alignment calculations can be off by +-1 but these margins are collapsed away */\r\n.dj_ie img.dojoComboBox {\r\n\tmargin-top: 1px; \r\n\tmargin-bottom: 1px; \r\n}\r\n\r\n/* the drop down */\r\n.dojoComboBoxOptions {\r\n\tfont-family: Verdana, Helvetica, Garamond, sans-serif;\r\n\t/* font-size: 0.7em; */\r\n\tbackground-color: white;\r\n\tborder: 1px solid #afafaf;\r\n\tposition: absolute;\r\n\tz-index: 1000; \r\n\toverflow: auto;\r\n\tcursor: default;\r\n}\r\n\r\n.dojoComboBoxItem {\r\n\tpadding-left: 2px;\r\n\tpadding-top: 2px;\r\n\tmargin: 0px;\r\n}\r\n\r\n.dojoComboBoxItemEven {\r\n\tbackground-color: #f4f4f4;\r\n}\r\n\r\n.dojoComboBoxItemOdd {\r\n\tbackground-color: white;\r\n}\r\n\r\n.dojoComboBoxItemHighlight {\r\n\tbackground-color: #63709A;\r\n\tcolor: white;\r\n}\r\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/ComboBox.css"),setValue:function(_c34){ +this.comboBoxValue.value=_c34; +if(this.textInputNode.value!=_c34){ +this.textInputNode.value=_c34; +dojo.widget.html.stabile.setState(this.widgetId,this.getState(),true); +this.onValueChanged(_c34); +} +},onValueChanged:function(_c35){ +},getValue:function(){ +return this.comboBoxValue.value; +},getState:function(){ +return {value:this.getValue()}; +},setState:function(_c36){ +this.setValue(_c36.value); +},enable:function(){ +this.disabled=false; +this.textInputNode.removeAttribute("disabled"); +},disable:function(){ +this.disabled=true; +this.textInputNode.setAttribute("disabled",true); +},_getCaretPos:function(_c37){ +if(dojo.lang.isNumber(_c37.selectionStart)){ +return _c37.selectionStart; +}else{ +if(dojo.render.html.ie){ +var tr=document.selection.createRange().duplicate(); +var ntr=_c37.createTextRange(); +tr.move("character",0); +ntr.move("character",0); +try{ +ntr.setEndPoint("EndToEnd",tr); +return String(ntr.text).replace(/\r/g,"").length; +} +catch(e){ +return 0; +} +} +} +},_setCaretPos:function(_c3a,_c3b){ +_c3b=parseInt(_c3b); +this._setSelectedRange(_c3a,_c3b,_c3b); +},_setSelectedRange:function(_c3c,_c3d,end){ +if(!end){ +end=_c3c.value.length; +} +if(_c3c.setSelectionRange){ +_c3c.focus(); +_c3c.setSelectionRange(_c3d,end); +}else{ +if(_c3c.createTextRange){ +var _c3f=_c3c.createTextRange(); +with(_c3f){ +collapse(true); +moveEnd("character",end); +moveStart("character",_c3d); +select(); +} +}else{ +_c3c.value=_c3c.value; +_c3c.blur(); +_c3c.focus(); +var dist=parseInt(_c3c.value.length)-end; +var _c41=String.fromCharCode(37); +var tcc=_c41.charCodeAt(0); +for(var x=0;x0)){ +var cpos=this._getCaretPos(this.textInputNode); +if((cpos+1)>this.textInputNode.value.length){ +this.textInputNode.value+=_c56[0][0].substr(cpos); +this._setSelectedRange(this.textInputNode,cpos,this.textInputNode.value.length); +} +} +var even=true; +while(_c56.length){ +var tr=_c56.shift(); +if(tr){ +var td=document.createElement("div"); +td.appendChild(document.createTextNode(tr[0])); +td.setAttribute("resultName",tr[0]); +td.setAttribute("resultValue",tr[1]); +td.className="dojoComboBoxItem "+((even)?"dojoComboBoxItemEven":"dojoComboBoxItemOdd"); +even=(!even); +this.optionsListNode.appendChild(td); +} +} +this._showResultList(); +},_onFocusInput:function(){ +this._hasFocus=true; +},_onBlurInput:function(){ +this._hasFocus=false; +this._handleBlurTimer(true,500); +},_handleBlurTimer:function(_c5b,_c5c){ +if(this.blurTimer&&(_c5b||_c5c)){ +clearTimeout(this.blurTimer); +} +if(_c5c){ +this.blurTimer=dojo.lang.setTimeout(this,"_checkBlurred",_c5c); +} +},_onMouseOver:function(evt){ +if(!this._mouseover_list){ +this._handleBlurTimer(true,0); +this._mouseover_list=true; +} +},_onMouseOut:function(evt){ +var _c5f=evt.relatedTarget; +try{ +if(!_c5f||_c5f.parentNode!=this.optionsListNode){ +this._mouseover_list=false; +this._handleBlurTimer(true,100); +this._tryFocus(); +} +} +catch(e){ +} +},_isInputEqualToResult:function(_c60){ +var _c61=this.textInputNode.value; +if(!this.dataProvider.caseSensitive){ +_c61=_c61.toLowerCase(); +_c60=_c60.toLowerCase(); +} +return (_c61==_c60); +},_isValidOption:function(){ +var tgt=dojo.html.firstElement(this.optionsListNode); +var _c63=false; +while(!_c63&&tgt){ +if(this._isInputEqualToResult(tgt.getAttribute("resultName"))){ +_c63=true; +}else{ +tgt=dojo.html.nextElement(tgt); +} +} +return _c63; +},_checkBlurred:function(){ +if(!this._hasFocus&&!this._mouseover_list){ +this._hideResultList(); +if(!this.textInputNode.value.length){ +this.setAllValues("",""); +return; +} +var _c64=this._isValidOption(); +if(this.forceValidOption&&!_c64){ +this.setAllValues("",""); +return; +} +if(!_c64){ +this.setSelectedValue(""); +} +} +},_selectOption:function(evt){ +var tgt=null; +if(!evt){ +evt={target:this._highlighted_option}; +} +if(!dojo.html.isDescendantOf(evt.target,this.optionsListNode)){ +if(!this.textInputNode.value.length){ +return; +} +tgt=dojo.html.firstElement(this.optionsListNode); +if(!tgt||!this._isInputEqualToResult(tgt.getAttribute("resultName"))){ +return; +} +}else{ +tgt=evt.target; +} +while((tgt.nodeType!=1)||(!tgt.getAttribute("resultName"))){ +tgt=tgt.parentNode; +if(tgt===dojo.body()){ +return false; +} +} +this.selectedResult=[tgt.getAttribute("resultName"),tgt.getAttribute("resultValue")]; +this.setAllValues(tgt.getAttribute("resultName"),tgt.getAttribute("resultValue")); +if(!evt.noHide){ +this._hideResultList(); +this._setSelectedRange(this.textInputNode,0,null); +} +this._tryFocus(); +},_clearResultList:function(){ +if(this.optionsListNode.innerHTML){ +this.optionsListNode.innerHTML=""; +} +},_hideResultList:function(){ +this.popupWidget.close(); +},_showResultList:function(){ +var _c67=this.optionsListNode.childNodes; +if(_c67.length){ +var _c68=Math.min(_c67.length,this.maxListLength); +with(this.optionsListNode.style){ +display=""; +if(_c68==_c67.length){ +height=""; +}else{ +height=_c68*dojo.html.getMarginBox(_c67[0]).height+"px"; +} +width=(dojo.html.getMarginBox(this.domNode).width-2)+"px"; +} +this.popupWidget.open(this.domNode,this,this.downArrowNode); +}else{ +this._hideResultList(); +} +},handleArrowClick:function(){ +this._handleBlurTimer(true,0); +this._tryFocus(); +if(this.popupWidget.isShowingNow){ +this._hideResultList(); +}else{ +this._startSearch(""); +} +},_tryFocus:function(){ +try{ +this.textInputNode.focus(); +} +catch(e){ +} +},_startSearchFromInput:function(){ +this._startSearch(this.textInputNode.value); +},_startSearch:function(key){ +this.dataProvider.startSearch(key,dojo.lang.hitch(this,"_openResultList")); +},postCreate:function(){ +this.onResize(); +dojo.event.connect(this.textInputNode,"onblur",this,"_onBlurInput"); +dojo.event.connect(this.textInputNode,"onfocus",this,"_onFocusInput"); +if(this.disabled){ +this.disable(); +} +var s=dojo.widget.html.stabile.getState(this.widgetId); +if(s){ +this.setState(s); +} +}}); +dojo.provide("struts.widget.ComboBox"); +struts.widget.ComboBoxDataProvider=function(_c6b,node){ +this.data=[]; +this.searchLimit=_c6b.searchLimit; +this.searchType="STARTSTRING"; +this.caseSensitive=false; +this._lastSearch=""; +this._lastSearchResults=null; +this.firstRequest=true; +this.cbox=_c6b; +this.formId=this.cbox.formId; +this.formFilter=this.cbox.formFilter; +this.transport=this.cbox.transport; +this.getData=function(url){ +dojo.html.show(this.cbox.indicator); +dojo.io.bind({url:url,formNode:dojo.byId(this.formId),formFilter:window[this.formFilter],transport:this.transport,handler:dojo.lang.hitch(this,function(type,data,evt){ +dojo.html.hide(this.cbox.indicator); +if(!this.firstRequest||type=="error"){ +this.cbox.notify.apply(this.cbox,[data,type,evt]); +} +this.firstRequest=false; +var _c71=null; +var _c72=data[dojo.string.isBlank(this.cbox.dataFieldName)?this.cbox.name:this.cbox.dataFieldName]; +if(!dojo.lang.isArray(data)){ +if(_c72){ +if(dojo.lang.isArray(_c72)){ +_c71=_c72; +}else{ +if(dojo.lang.isObject(_c72)){ +_c71=[]; +for(var key in _c72){ +_c71.push([key,_c72[key]]); +} +} +} +}else{ +var _c74=[]; +for(var key in data){ +if(dojo.string.startsWith(key,this.cbox.name)){ +_c71=data[key]; +break; +}else{ +_c74.push([key,data[key]]); +} +if(!_c71&&dojo.lang.isArray(data[key])&&!dojo.lang.isString(data[key])){ +_c71=data[key]; +} +} +if(!_c71){ +_c71=_c74; +} +} +data=_c71; +} +this.setData(data); +}),mimetype:"text/json"}); +}; +this.startSearch=function(_c75,_c76){ +this._preformSearch(_c75,_c76); +}; +this._preformSearch=function(_c77,_c78){ +var st=this.searchType; +var ret=[]; +if(!this.caseSensitive){ +_c77=_c77.toLowerCase(); +} +for(var x=0;x0)&&(ret.length>=this.searchLimit)){ +break; +} +var _c7c=new String((!this.caseSensitive)?this.data[x][0].toLowerCase():this.data[x][0]); +if(_c7c.length<_c77.length){ +continue; +} +if(st=="STARTSTRING"){ +if(_c77==_c7c.substr(0,_c77.length)){ +ret.push(this.data[x]); +} +}else{ +if(st=="SUBSTRING"){ +if(_c7c.indexOf(_c77)>=0){ +ret.push(this.data[x]); +} +}else{ +if(st=="STARTWORD"){ +var idx=_c7c.indexOf(_c77); +if(idx==0){ +ret.push(this.data[x]); +} +if(idx<=0){ +continue; +} +var _c7e=false; +while(idx!=-1){ +if(" ,/(".indexOf(_c7c.charAt(idx-1))!=-1){ +_c7e=true; +break; +} +idx=_c7c.indexOf(_c77,idx+1); +} +if(!_c7e){ +continue; +}else{ +ret.push(this.data[x]); +} +} +} +} +} +_c78(ret); +}; +this.addData=function(_c7f){ +this.data=this.data.concat(_c7f); +}; +this.setData=function(_c80){ +this.data=_c80; +for(var i=0;i0)){ +var cpos=this._getCaretPos(this.textInputNode); +if((cpos+1)>this.textInputNode.value.length){ +this.textInputNode.value+=_c8b[0][0].substr(cpos); +this._setSelectedRange(this.textInputNode,cpos,this.textInputNode.value.length); +} +} +var _c8d=this.textInputNode.value; +var even=true; +while(_c8b.length){ +var tr=_c8b.shift(); +if(tr){ +var td=document.createElement("div"); +var text=tr[0]; +var i=text.toLowerCase().indexOf(_c8d.toLowerCase()); +if(i>=0){ +var pre=text.substring(0,i); +var _c94=text.substring(i,i+_c8d.length); +var post=text.substring(i+_c8d.length); +if(!dojo.string.isBlank(pre)){ +td.appendChild(document.createTextNode(pre)); +} +var _c96=document.createElement("b"); +td.appendChild(_c96); +_c96.appendChild(document.createTextNode(_c94)); +td.appendChild(document.createTextNode(post)); +}else{ +td.appendChild(document.createTextNode(tr[0])); +} +td.setAttribute("resultName",tr[0]); +td.setAttribute("resultValue",tr[1]); +td.className="dojoComboBoxItem "+((even)?"dojoComboBoxItemEven":"dojoComboBoxItemOdd"); +even=(!even); +this.optionsListNode.appendChild(td); +} +} +this.showResultList(); +},postCreate:function(){ +struts.widget.ComboBox.superclass.postCreate.apply(this); +var self=this; +if(!dojo.string.isBlank(this.listenTopics)){ +var _c98=this.listenTopics.split(","); +for(var i=0;i<_c98.length;i++){ +dojo.event.topic.subscribe(_c98[i],function(){ +var _c9a={cancel:false}; +self.notify(this.widgetId,"before",_c9a); +if(_c9a.cancel){ +return; +} +self.clearValues(); +self.dataProvider.getData(self.dataUrl); +}); +} +} +if(!dojo.string.isBlank(this.notifyTopics)){ +this.notifyTopicsArray=this.notifyTopics.split(","); +} +if(!dojo.string.isBlank(this.beforeNotifyTopics)){ +this.beforeNotifyTopicsArray=this.beforeNotifyTopics.split(","); +} +if(!dojo.string.isBlank(this.afterNotifyTopics)){ +this.afterNotifyTopicsArray=this.afterNotifyTopics.split(","); +} +if(!dojo.string.isBlank(this.errorNotifyTopics)){ +this.errorNotifyTopicsArray=this.errorNotifyTopics.split(","); +} +if(!dojo.string.isBlank(this.valueNotifyTopics)){ +this.valueNotifyTopicsArray=this.valueNotifyTopics.split(","); +} +this.comboBoxSelectionValue.name=dojo.string.isBlank(this.keyName)?this.name+"Key":this.keyName; +this.comboBoxValue.value=this.initialValue; +this.comboBoxSelectionValue.value=this.initialKey; +this.textInputNode.value=this.initialValue; +if(!this.visibleDownArrow){ +dojo.html.hide(this.downArrowNode); +} +if(!dojo.string.isBlank(this.searchType)){ +this.dataProvider.searchType=this.searchType.toUpperCase(); +} +},clearValues:function(){ +this.comboBoxValue.value=""; +this.comboBoxSelectionValue.value=""; +this.textInputNode.value=""; +},onValueChanged:function(data){ +this.notify(data,"valuechanged",null); +},notify:function(data,type,e){ +var self=this; +if(this.notifyTopicsArray){ +dojo.lang.forEach(this.notifyTopicsArray,function(_ca0){ +try{ +dojo.event.topic.publish(_ca0,data,type,e,self); +} +catch(ex){ +self.log(ex); +} +}); +} +var _ca1=null; +switch(type){ +case "before": +this.notifyTo(this.beforeNotifyTopicsArray,[e,this]); +break; +case "load": +this.notifyTo(this.afterNotifyTopicsArray,[data,e,this]); +break; +case "error": +this.notifyTo(this.errorNotifyTopicsArray,[data,e,this]); +break; +case "valuechanged": +this.notifyTo(this.valueNotifyTopicsArray,[this.getSelectedValue(),this.getSelectedKey(),this.getText(),this]); +break; +} +},notifyTo:function(_ca2,_ca3){ +var self=this; +if(_ca2){ +dojo.lang.forEach(_ca2,function(_ca5){ +try{ +dojo.event.topic.publishApply(_ca5,_ca3); +} +catch(ex){ +self.log(ex); +} +}); +} +},log:function(text){ +dojo.debug("["+(this.widgetId?this.widgetId:"unknown")+"] "+text); +},_startSearchFromInput:function(){ +var _ca7=this.textInputNode.value; +if(this.loadOnType){ +if(_ca7.length>=this.loadMinimum){ +var _ca8=this.dataUrl+(this.dataUrl.indexOf("?")>-1?"&":"?"); +_ca8+=this.name+"="+_ca7; +this.dataProvider.getData(_ca8); +this._startSearch(_ca7); +}else{ +this._hideResultList(); +} +}else{ +this._startSearch(_ca7); +} +},setSelectedKey:function(key){ +var data=this.dataProvider.data; +for(element in data){ +var obj=data[element]; +if(obj[1].toString()==key){ +this.setValue(obj[0].toString()); +this.comboBoxSelectionValue.value=obj[1].toString(); +} +} +},getSelectedKey:function(){ +return this.comboBoxSelectionValue.value; +},getSelectedValue:function(){ +return this.comboBoxValue.value; +},getText:function(){ +return this.textInputNode.value; +}}); +dojo.provide("dojo.widget.DropdownContainer"); +dojo.widget.defineWidget("dojo.widget.DropdownContainer",dojo.widget.HtmlWidget,{inputWidth:"7em",id:"",inputId:"",inputName:"",iconURL:dojo.uri.moduleUri("dojo.widget","templates/images/combo_box_arrow.png"),copyClasses:false,iconAlt:"",containerToggle:"plain",containerToggleDuration:150,templateString:" \"${this.iconAlt}\"",templateCssPath:"",isContainer:true,attachTemplateNodes:function(){ +dojo.widget.DropdownContainer.superclass.attachTemplateNodes.apply(this,arguments); +this.popup=dojo.widget.createWidget("PopupContainer",{toggle:this.containerToggle,toggleDuration:this.containerToggleDuration}); +this.containerNode=this.popup.domNode; +},fillInTemplate:function(args,frag){ +this.domNode.appendChild(this.popup.domNode); +if(this.id){ +this.domNode.id=this.id; +} +if(this.inputId){ +this.inputNode.id=this.inputId; +} +if(this.inputName){ +this.inputNode.name=this.inputName; +} +this.inputNode.style.width=this.inputWidth; +this.inputNode.disabled=this.disabled; +if(this.copyClasses){ +this.inputNode.style=""; +this.inputNode.className=this.getFragNodeRef(frag).className; +} +dojo.event.connect(this.inputNode,"onchange",this,"onInputChange"); +},onIconClick:function(evt){ +if(this.disabled){ +return; +} +if(!this.popup.isShowingNow){ +this.popup.open(this.inputNode,this,this.buttonNode); +}else{ +this.popup.close(); +} +},hideContainer:function(){ +if(this.popup.isShowingNow){ +this.popup.close(); +} +},onInputChange:function(){ +},enable:function(){ +this.inputNode.disabled=false; +dojo.widget.DropdownContainer.superclass.enable.apply(this,arguments); +},disable:function(){ +this.inputNode.disabled=true; +dojo.widget.DropdownContainer.superclass.disable.apply(this,arguments); +}}); +dojo.provide("dojo.date.serialize"); +dojo.date.setIso8601=function(_caf,_cb0){ +var _cb1=(_cb0.indexOf("T")==-1)?_cb0.split(" "):_cb0.split("T"); +_caf=dojo.date.setIso8601Date(_caf,_cb1[0]); +if(_cb1.length==2){ +_caf=dojo.date.setIso8601Time(_caf,_cb1[1]); +} +return _caf; +}; +dojo.date.fromIso8601=function(_cb2){ +return dojo.date.setIso8601(new Date(0,0),_cb2); +}; +dojo.date.setIso8601Date=function(_cb3,_cb4){ +var _cb5="^([0-9]{4})((-?([0-9]{2})(-?([0-9]{2}))?)|"+"(-?([0-9]{3}))|(-?W([0-9]{2})(-?([1-7]))?))?$"; +var d=_cb4.match(new RegExp(_cb5)); +if(!d){ +dojo.debug("invalid date string: "+_cb4); +return null; +} +var year=d[1]; +var _cb8=d[4]; +var date=d[6]; +var _cba=d[8]; +var week=d[10]; +var _cbc=d[12]?d[12]:1; +_cb3.setFullYear(year); +if(_cba){ +_cb3.setMonth(0); +_cb3.setDate(Number(_cba)); +}else{ +if(week){ +_cb3.setMonth(0); +_cb3.setDate(1); +var gd=_cb3.getDay(); +var day=gd?gd:7; +var _cbf=Number(_cbc)+(7*Number(week)); +if(day<=4){ +_cb3.setDate(_cbf+1-day); +}else{ +_cb3.setDate(_cbf+8-day); +} +}else{ +if(_cb8){ +_cb3.setDate(1); +_cb3.setMonth(_cb8-1); +} +if(date){ +_cb3.setDate(date); +} +} +} +return _cb3; +}; +dojo.date.fromIso8601Date=function(_cc0){ +return dojo.date.setIso8601Date(new Date(0,0),_cc0); +}; +dojo.date.setIso8601Time=function(_cc1,_cc2){ +var _cc3="Z|(([-+])([0-9]{2})(:?([0-9]{2}))?)$"; +var d=_cc2.match(new RegExp(_cc3)); +var _cc5=0; +if(d){ +if(d[0]!="Z"){ +_cc5=(Number(d[3])*60)+Number(d[5]); +_cc5*=((d[2]=="-")?1:-1); +} +_cc5-=_cc1.getTimezoneOffset(); +_cc2=_cc2.substr(0,_cc2.length-d[0].length); +} +var _cc6="^([0-9]{2})(:?([0-9]{2})(:?([0-9]{2})(.([0-9]+))?)?)?$"; +d=_cc2.match(new RegExp(_cc6)); +if(!d){ +dojo.debug("invalid time string: "+_cc2); +return null; +} +var _cc7=d[1]; +var mins=Number((d[3])?d[3]:0); +var secs=(d[5])?d[5]:0; +var ms=d[7]?(Number("0."+d[7])*1000):0; +_cc1.setHours(_cc7); +_cc1.setMinutes(mins); +_cc1.setSeconds(secs); +_cc1.setMilliseconds(ms); +if(_cc5!==0){ +_cc1.setTime(_cc1.getTime()+_cc5*60000); +} +return _cc1; +}; +dojo.date.fromIso8601Time=function(_ccb){ +return dojo.date.setIso8601Time(new Date(0,0),_ccb); +}; +dojo.date.toRfc3339=function(_ccc,_ccd){ +if(!_ccc){ +_ccc=new Date(); +} +var _=dojo.string.pad; +var _ccf=[]; +if(_ccd!="timeOnly"){ +var date=[_(_ccc.getFullYear(),4),_(_ccc.getMonth()+1,2),_(_ccc.getDate(),2)].join("-"); +_ccf.push(date); +} +if(_ccd!="dateOnly"){ +var time=[_(_ccc.getHours(),2),_(_ccc.getMinutes(),2),_(_ccc.getSeconds(),2)].join(":"); +var _cd2=_ccc.getTimezoneOffset(); +time+=(_cd2>0?"-":"+")+_(Math.floor(Math.abs(_cd2)/60),2)+":"+_(Math.abs(_cd2)%60,2); +_ccf.push(time); +} +return _ccf.join("T"); +}; +dojo.date.fromRfc3339=function(_cd3){ +if(_cd3.indexOf("Tany")!=-1){ +_cd3=_cd3.replace("Tany",""); +} +var _cd4=new Date(); +return dojo.date.setIso8601(_cd4,_cd3); +}; +dojo.provide("dojo.date.common"); +dojo.date.setDayOfYear=function(_cd5,_cd6){ +_cd5.setMonth(0); +_cd5.setDate(_cd6); +return _cd5; +}; +dojo.date.getDayOfYear=function(_cd7){ +var _cd8=_cd7.getFullYear(); +var _cd9=new Date(_cd8-1,11,31); +return Math.floor((_cd7.getTime()-_cd9.getTime())/86400000); +}; +dojo.date.setWeekOfYear=function(_cda,week,_cdc){ +if(arguments.length==1){ +_cdc=0; +} +dojo.unimplemented("dojo.date.setWeekOfYear"); +}; +dojo.date.getWeekOfYear=function(_cdd,_cde){ +if(arguments.length==1){ +_cde=0; +} +var _cdf=new Date(_cdd.getFullYear(),0,1); +var day=_cdf.getDay(); +_cdf.setDate(_cdf.getDate()-day+_cde-(day>_cde?7:0)); +return Math.floor((_cdd.getTime()-_cdf.getTime())/604800000); +}; +dojo.date.setIsoWeekOfYear=function(_ce1,week,_ce3){ +if(arguments.length==1){ +_ce3=1; +} +dojo.unimplemented("dojo.date.setIsoWeekOfYear"); +}; +dojo.date.getIsoWeekOfYear=function(_ce4,_ce5){ +if(arguments.length==1){ +_ce5=1; +} +dojo.unimplemented("dojo.date.getIsoWeekOfYear"); +}; +dojo.date.shortTimezones=["IDLW","BET","HST","MART","AKST","PST","MST","CST","EST","AST","NFT","BST","FST","AT","GMT","CET","EET","MSK","IRT","GST","AFT","AGTT","IST","NPT","ALMT","MMT","JT","AWST","JST","ACST","AEST","LHST","VUT","NFT","NZT","CHAST","PHOT","LINT"]; +dojo.date.timezoneOffsets=[-720,-660,-600,-570,-540,-480,-420,-360,-300,-240,-210,-180,-120,-60,0,60,120,180,210,240,270,300,330,345,360,390,420,480,540,570,600,630,660,690,720,765,780,840]; +dojo.date.getDaysInMonth=function(_ce6){ +var _ce7=_ce6.getMonth(); +var days=[31,28,31,30,31,30,31,31,30,31,30,31]; +if(_ce7==1&&dojo.date.isLeapYear(_ce6)){ +return 29; +}else{ +return days[_ce7]; +} +}; +dojo.date.isLeapYear=function(_ce9){ +var year=_ce9.getFullYear(); +return (year%400==0)?true:(year%100==0)?false:(year%4==0)?true:false; +}; +dojo.date.getTimezoneName=function(_ceb){ +var str=_ceb.toString(); +var tz=""; +var _cee; +var pos=str.indexOf("("); +if(pos>-1){ +pos++; +tz=str.substring(pos,str.indexOf(")")); +}else{ +var pat=/([A-Z\/]+) \d{4}$/; +if((_cee=str.match(pat))){ +tz=_cee[1]; +}else{ +str=_ceb.toLocaleString(); +pat=/ ([A-Z\/]+)$/; +if((_cee=str.match(pat))){ +tz=_cee[1]; +} +} +} +return tz=="AM"||tz=="PM"?"":tz; +}; +dojo.date.getOrdinal=function(_cf1){ +var date=_cf1.getDate(); +if(date%100!=11&&date%10==1){ +return "st"; +}else{ +if(date%100!=12&&date%10==2){ +return "nd"; +}else{ +if(date%100!=13&&date%10==3){ +return "rd"; +}else{ +return "th"; +} +} +} +}; +dojo.date.compareTypes={DATE:1,TIME:2}; +dojo.date.compare=function(_cf3,_cf4,_cf5){ +var dA=_cf3; +var dB=_cf4||new Date(); +var now=new Date(); +with(dojo.date.compareTypes){ +var opt=_cf5||(DATE|TIME); +var d1=new Date((opt&DATE)?dA.getFullYear():now.getFullYear(),(opt&DATE)?dA.getMonth():now.getMonth(),(opt&DATE)?dA.getDate():now.getDate(),(opt&TIME)?dA.getHours():0,(opt&TIME)?dA.getMinutes():0,(opt&TIME)?dA.getSeconds():0); +var d2=new Date((opt&DATE)?dB.getFullYear():now.getFullYear(),(opt&DATE)?dB.getMonth():now.getMonth(),(opt&DATE)?dB.getDate():now.getDate(),(opt&TIME)?dB.getHours():0,(opt&TIME)?dB.getMinutes():0,(opt&TIME)?dB.getSeconds():0); +} +if(d1.valueOf()>d2.valueOf()){ +return 1; +} +if(d1.valueOf()0)?5:-5; +_d01=(incr>0)?((incr-5)/5):((incr+5)/5); +}else{ +days=mod; +_d01=parseInt(incr/5); +} +strt=dt.getDay(); +if(strt==6&&incr>0){ +adj=1; +}else{ +if(strt==0&&incr<0){ +adj=-1; +} +} +trgt=(strt+days); +if(trgt==0||trgt==6){ +adj=(incr>0)?2:-2; +} +sum.setDate(dat+(7*_d01)+days+adj); +break; +case HOUR: +sum.setHours(sum.getHours()+incr); +break; +case MINUTE: +sum.setMinutes(sum.getMinutes()+incr); +break; +case SECOND: +sum.setSeconds(sum.getSeconds()+incr); +break; +case MILLISECOND: +sum.setMilliseconds(sum.getMilliseconds()+incr); +break; +default: +break; +} +} +return sum; +}; +dojo.date.diff=function(dtA,dtB,_d09){ +if(typeof dtA=="number"){ +dtA=new Date(dtA); +} +if(typeof dtB=="number"){ +dtB=new Date(dtB); +} +var _d0a=dtB.getFullYear()-dtA.getFullYear(); +var _d0b=(dtB.getMonth()-dtA.getMonth())+(_d0a*12); +var _d0c=dtB.getTime()-dtA.getTime(); +var _d0d=_d0c/1000; +var _d0e=_d0d/60; +var _d0f=_d0e/60; +var _d10=_d0f/24; +var _d11=_d10/7; +var _d12=0; +with(dojo.date.dateParts){ +switch(_d09){ +case YEAR: +_d12=_d0a; +break; +case QUARTER: +var mA=dtA.getMonth(); +var mB=dtB.getMonth(); +var qA=Math.floor(mA/3)+1; +var qB=Math.floor(mB/3)+1; +qB+=(_d0a*4); +_d12=qB-qA; +break; +case MONTH: +_d12=_d0b; +break; +case WEEK: +_d12=parseInt(_d11); +break; +case DAY: +_d12=_d10; +break; +case WEEKDAY: +var days=Math.round(_d10); +var _d18=parseInt(days/7); +var mod=days%7; +if(mod==0){ +days=_d18*5; +}else{ +var adj=0; +var aDay=dtA.getDay(); +var bDay=dtB.getDay(); +_d18=parseInt(days/7); +mod=days%7; +var _d1d=new Date(dtA); +_d1d.setDate(_d1d.getDate()+(_d18*7)); +var _d1e=_d1d.getDay(); +if(_d10>0){ +switch(true){ +case aDay==6: +adj=-1; +break; +case aDay==0: +adj=0; +break; +case bDay==6: +adj=-1; +break; +case bDay==0: +adj=-2; +break; +case (_d1e+mod)>5: +adj=-2; +break; +default: +break; +} +}else{ +if(_d10<0){ +switch(true){ +case aDay==6: +adj=0; +break; +case aDay==0: +adj=1; +break; +case bDay==6: +adj=2; +break; +case bDay==0: +adj=1; +break; +case (_d1e+mod)<0: +adj=2; +break; +default: +break; +} +} +} +days+=adj; +days-=(_d18*2); +} +_d12=days; +break; +case HOUR: +_d12=_d0f; +break; +case MINUTE: +_d12=_d0e; +break; +case SECOND: +_d12=_d0d; +break; +case MILLISECOND: +_d12=_d0c; +break; +default: +break; +} +} +return Math.round(_d12); +}; +dojo.provide("dojo.date.supplemental"); +dojo.date.getFirstDayOfWeek=function(_d1f){ +var _d20={mv:5,ae:6,af:6,bh:6,dj:6,dz:6,eg:6,er:6,et:6,iq:6,ir:6,jo:6,ke:6,kw:6,lb:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,so:6,tn:6,ye:6,as:0,au:0,az:0,bw:0,ca:0,cn:0,fo:0,ge:0,gl:0,gu:0,hk:0,ie:0,il:0,is:0,jm:0,jp:0,kg:0,kr:0,la:0,mh:0,mo:0,mp:0,mt:0,nz:0,ph:0,pk:0,sg:0,th:0,tt:0,tw:0,um:0,us:0,uz:0,vi:0,za:0,zw:0,et:0,mw:0,ng:0,tj:0,gb:0,sy:4}; +_d1f=dojo.hostenv.normalizeLocale(_d1f); +var _d21=_d1f.split("-")[1]; +var dow=_d20[_d21]; +return (typeof dow=="undefined")?1:dow; +}; +dojo.date.getWeekend=function(_d23){ +var _d24={eg:5,il:5,sy:5,"in":0,ae:4,bh:4,dz:4,iq:4,jo:4,kw:4,lb:4,ly:4,ma:4,om:4,qa:4,sa:4,sd:4,tn:4,ye:4}; +var _d25={ae:5,bh:5,dz:5,iq:5,jo:5,kw:5,lb:5,ly:5,ma:5,om:5,qa:5,sa:5,sd:5,tn:5,ye:5,af:5,ir:5,eg:6,il:6,sy:6}; +_d23=dojo.hostenv.normalizeLocale(_d23); +var _d26=_d23.split("-")[1]; +var _d27=_d24[_d26]; +var end=_d25[_d26]; +if(typeof _d27=="undefined"){ +_d27=6; +} +if(typeof end=="undefined"){ +end=0; +} +return {start:_d27,end:end}; +}; +dojo.date.isWeekend=function(_d29,_d2a){ +var _d2b=dojo.date.getWeekend(_d2a); +var day=(_d29||new Date()).getDay(); +if(_d2b.end<_d2b.start){ +_d2b.end+=7; +if(day<_d2b.start){ +day+=7; +} +} +return day>=_d2b.start&&day<=_d2b.end; +}; +dojo.provide("dojo.i18n.common"); +dojo.i18n.getLocalization=function(_d2d,_d2e,_d2f){ +dojo.hostenv.preloadLocalizations(); +_d2f=dojo.hostenv.normalizeLocale(_d2f); +var _d30=_d2f.split("-"); +var _d31=[_d2d,"nls",_d2e].join("."); +var _d32=dojo.hostenv.findModule(_d31,true); +var _d33; +for(var i=_d30.length;i>0;i--){ +var loc=_d30.slice(0,i).join("_"); +if(_d32[loc]){ +_d33=_d32[loc]; +break; +} +} +if(!_d33){ +_d33=_d32.ROOT; +} +if(_d33){ +var _d36=function(){ +}; +_d36.prototype=_d33; +return new _d36(); +} +dojo.raise("Bundle not found: "+_d2e+" in "+_d2d+" , locale="+_d2f); +}; +dojo.i18n.isLTR=function(_d37){ +var lang=dojo.hostenv.normalizeLocale(_d37).split("-")[0]; +var RTL={ar:true,fa:true,he:true,ur:true,yi:true}; +return !RTL[lang]; +}; +dojo.provide("dojo.date.format"); +(function(){ +dojo.date.format=function(_d3a,_d3b){ +if(typeof _d3b=="string"){ +dojo.deprecated("dojo.date.format","To format dates with POSIX-style strings, please use dojo.date.strftime instead","0.5"); +return dojo.date.strftime(_d3a,_d3b); +} +function formatPattern(_d3c,_d3d){ +return _d3d.replace(/([a-z])\1*/ig,function(_d3e){ +var s; +var c=_d3e.charAt(0); +var l=_d3e.length; +var pad; +var _d43=["abbr","wide","narrow"]; +switch(c){ +case "G": +if(l>3){ +dojo.unimplemented("Era format not implemented"); +} +s=info.eras[_d3c.getFullYear()<0?1:0]; +break; +case "y": +s=_d3c.getFullYear(); +switch(l){ +case 1: +break; +case 2: +s=String(s).substr(-2); +break; +default: +pad=true; +} +break; +case "Q": +case "q": +s=Math.ceil((_d3c.getMonth()+1)/3); +switch(l){ +case 1: +case 2: +pad=true; +break; +case 3: +case 4: +dojo.unimplemented("Quarter format not implemented"); +} +break; +case "M": +case "L": +var m=_d3c.getMonth(); +var _d46; +switch(l){ +case 1: +case 2: +s=m+1; +pad=true; +break; +case 3: +case 4: +case 5: +_d46=_d43[l-3]; +break; +} +if(_d46){ +var type=(c=="L")?"standalone":"format"; +var prop=["months",type,_d46].join("-"); +s=info[prop][m]; +} +break; +case "w": +var _d49=0; +s=dojo.date.getWeekOfYear(_d3c,_d49); +pad=true; +break; +case "d": +s=_d3c.getDate(); +pad=true; +break; +case "D": +s=dojo.date.getDayOfYear(_d3c); +pad=true; +break; +case "E": +case "e": +case "c": +var d=_d3c.getDay(); +var _d46; +switch(l){ +case 1: +case 2: +if(c=="e"){ +var _d4b=dojo.date.getFirstDayOfWeek(_d3b.locale); +d=(d-_d4b+7)%7; +} +if(c!="c"){ +s=d+1; +pad=true; +break; +} +case 3: +case 4: +case 5: +_d46=_d43[l-3]; +break; +} +if(_d46){ +var type=(c=="c")?"standalone":"format"; +var prop=["days",type,_d46].join("-"); +s=info[prop][d]; +} +break; +case "a": +var _d4c=(_d3c.getHours()<12)?"am":"pm"; +s=info[_d4c]; +break; +case "h": +case "H": +case "K": +case "k": +var h=_d3c.getHours(); +switch(c){ +case "h": +s=(h%12)||12; +break; +case "H": +s=h; +break; +case "K": +s=(h%12); +break; +case "k": +s=h||24; +break; +} +pad=true; +break; +case "m": +s=_d3c.getMinutes(); +pad=true; +break; +case "s": +s=_d3c.getSeconds(); +pad=true; +break; +case "S": +s=Math.round(_d3c.getMilliseconds()*Math.pow(10,l-3)); +break; +case "v": +case "z": +s=dojo.date.getTimezoneName(_d3c); +if(s){ +break; +} +l=4; +case "Z": +var _d4e=_d3c.getTimezoneOffset(); +var tz=[(_d4e<=0?"+":"-"),dojo.string.pad(Math.floor(Math.abs(_d4e)/60),2),dojo.string.pad(Math.abs(_d4e)%60,2)]; +if(l==4){ +tz.splice(0,0,"GMT"); +tz.splice(3,0,":"); +} +s=tz.join(""); +break; +case "Y": +case "u": +case "W": +case "F": +case "g": +case "A": +dojo.debug(_d3e+" modifier not yet implemented"); +s="?"; +break; +default: +dojo.raise("dojo.date.format: invalid pattern char: "+_d3d); +} +if(pad){ +s=dojo.string.pad(s,l); +} +return s; +}); +} +_d3b=_d3b||{}; +var _d50=dojo.hostenv.normalizeLocale(_d3b.locale); +var _d51=_d3b.formatLength||"full"; +var info=dojo.date._getGregorianBundle(_d50); +var str=[]; +var _d53=dojo.lang.curry(this,formatPattern,_d3a); +if(_d3b.selector!="timeOnly"){ +var _d54=_d3b.datePattern||info["dateFormat-"+_d51]; +if(_d54){ +str.push(_processPattern(_d54,_d53)); +} +} +if(_d3b.selector!="dateOnly"){ +var _d55=_d3b.timePattern||info["timeFormat-"+_d51]; +if(_d55){ +str.push(_processPattern(_d55,_d53)); +} +} +var _d56=str.join(" "); +return _d56; +}; +dojo.date.parse=function(_d57,_d58){ +_d58=_d58||{}; +var _d59=dojo.hostenv.normalizeLocale(_d58.locale); +var info=dojo.date._getGregorianBundle(_d59); +var _d5b=_d58.formatLength||"full"; +if(!_d58.selector){ +_d58.selector="dateOnly"; +} +var _d5c=_d58.datePattern||info["dateFormat-"+_d5b]; +var _d5d=_d58.timePattern||info["timeFormat-"+_d5b]; +var _d5e; +if(_d58.selector=="dateOnly"){ +_d5e=_d5c; +}else{ +if(_d58.selector=="timeOnly"){ +_d5e=_d5d; +}else{ +if(_d58.selector=="dateTime"){ +_d5e=_d5c+" "+_d5d; +}else{ +var msg="dojo.date.parse: Unknown selector param passed: '"+_d58.selector+"'."; +msg+=" Defaulting to date pattern."; +dojo.debug(msg); +_d5e=_d5c; +} +} +} +var _d60=[]; +var _d61=_processPattern(_d5e,dojo.lang.curry(this,_buildDateTimeRE,_d60,info,_d58)); +var _d62=new RegExp("^"+_d61+"$"); +var _d63=_d62.exec(_d57); +if(!_d63){ +return null; +} +var _d64=["abbr","wide","narrow"]; +var _d65=new Date(1972,0); +var _d66={}; +for(var i=1;i<_d63.length;i++){ +var grp=_d60[i-1]; +var l=grp.length; +var v=_d63[i]; +switch(grp.charAt(0)){ +case "y": +if(l!=2){ +_d65.setFullYear(v); +_d66.year=v; +}else{ +if(v<100){ +v=Number(v); +var year=""+new Date().getFullYear(); +var _d6c=year.substring(0,2)*100; +var _d6d=Number(year.substring(2,4)); +var _d6e=Math.min(_d6d+20,99); +var num=(v<_d6e)?_d6c+v:_d6c-100+v; +_d65.setFullYear(num); +_d66.year=num; +}else{ +if(_d58.strict){ +return null; +} +_d65.setFullYear(v); +_d66.year=v; +} +} +break; +case "M": +if(l>2){ +if(!_d58.strict){ +v=v.replace(/\./g,""); +v=v.toLowerCase(); +} +var _d70=info["months-format-"+_d64[l-3]].concat(); +for(var j=0;j<_d70.length;j++){ +if(!_d58.strict){ +_d70[j]=_d70[j].toLowerCase(); +} +if(v==_d70[j]){ +_d65.setMonth(j); +_d66.month=j; +break; +} +} +if(j==_d70.length){ +dojo.debug("dojo.date.parse: Could not parse month name: '"+v+"'."); +return null; +} +}else{ +_d65.setMonth(v-1); +_d66.month=v-1; +} +break; +case "E": +case "e": +if(!_d58.strict){ +v=v.toLowerCase(); +} +var days=info["days-format-"+_d64[l-3]].concat(); +for(var j=0;j23){ +dojo.debug("dojo.date.parse: Illegal hours value"); +return null; +} +_d65.setHours(v); +break; +case "m": +_d65.setMinutes(v); +break; +case "s": +_d65.setSeconds(v); +break; +case "S": +_d65.setMilliseconds(v); +break; +default: +dojo.unimplemented("dojo.date.parse: unsupported pattern char="+grp.charAt(0)); +} +} +if(_d66.year&&_d65.getFullYear()!=_d66.year){ +dojo.debug("Parsed year: '"+_d65.getFullYear()+"' did not match input year: '"+_d66.year+"'."); +return null; +} +if(_d66.month&&_d65.getMonth()!=_d66.month){ +dojo.debug("Parsed month: '"+_d65.getMonth()+"' did not match input month: '"+_d66.month+"'."); +return null; +} +if(_d66.date&&_d65.getDate()!=_d66.date){ +dojo.debug("Parsed day of month: '"+_d65.getDate()+"' did not match input day of month: '"+_d66.date+"'."); +return null; +} +return _d65; +}; +function _processPattern(_d76,_d77,_d78,_d79){ +var _d7a=function(x){ +return x; +}; +_d77=_d77||_d7a; +_d78=_d78||_d7a; +_d79=_d79||_d7a; +var _d7c=_d76.match(/(''|[^'])+/g); +var _d7d=false; +for(var i=0;i<_d7c.length;i++){ +if(!_d7c[i]){ +_d7c[i]=""; +}else{ +_d7c[i]=(_d7d?_d78:_d77)(_d7c[i]); +_d7d=!_d7d; +} +} +return _d79(_d7c.join("")); +} +function _buildDateTimeRE(_d7f,info,_d81,_d82){ +return _d82.replace(/([a-z])\1*/ig,function(_d83){ +var s; +var c=_d83.charAt(0); +var l=_d83.length; +switch(c){ +case "y": +s="\\d"+((l==2)?"{2,4}":"+"); +break; +case "M": +s=(l>2)?"\\S+":"\\d{1,2}"; +break; +case "d": +s="\\d{1,2}"; +break; +case "E": +s="\\S+"; +break; +case "h": +case "H": +case "K": +case "k": +s="\\d{1,2}"; +break; +case "m": +case "s": +s="[0-5]\\d"; +break; +case "S": +s="\\d{1,3}"; +break; +case "a": +var am=_d81.am||info.am||"AM"; +var pm=_d81.pm||info.pm||"PM"; +if(_d81.strict){ +s=am+"|"+pm; +}else{ +s=am; +s+=(am!=am.toLowerCase())?"|"+am.toLowerCase():""; +s+="|"; +s+=(pm!=pm.toLowerCase())?pm+"|"+pm.toLowerCase():pm; +} +break; +default: +dojo.unimplemented("parse of date format, pattern="+_d82); +} +if(_d7f){ +_d7f.push(_d83); +} +return "\\s*("+s+")\\s*"; +}); +} +})(); +dojo.date.strftime=function(_d89,_d8a,_d8b){ +var _d8c=null; +function _(s,n){ +return dojo.string.pad(s,n||2,_d8c||"0"); +} +var info=dojo.date._getGregorianBundle(_d8b); +function $(_d90){ +switch(_d90){ +case "a": +return dojo.date.getDayShortName(_d89,_d8b); +case "A": +return dojo.date.getDayName(_d89,_d8b); +case "b": +case "h": +return dojo.date.getMonthShortName(_d89,_d8b); +case "B": +return dojo.date.getMonthName(_d89,_d8b); +case "c": +return dojo.date.format(_d89,{locale:_d8b}); +case "C": +return _(Math.floor(_d89.getFullYear()/100)); +case "d": +return _(_d89.getDate()); +case "D": +return $("m")+"/"+$("d")+"/"+$("y"); +case "e": +if(_d8c==null){ +_d8c=" "; +} +return _(_d89.getDate()); +case "f": +if(_d8c==null){ +_d8c=" "; +} +return _(_d89.getMonth()+1); +case "g": +break; +case "G": +dojo.unimplemented("unimplemented modifier 'G'"); +break; +case "F": +return $("Y")+"-"+$("m")+"-"+$("d"); +case "H": +return _(_d89.getHours()); +case "I": +return _(_d89.getHours()%12||12); +case "j": +return _(dojo.date.getDayOfYear(_d89),3); +case "k": +if(_d8c==null){ +_d8c=" "; +} +return _(_d89.getHours()); +case "l": +if(_d8c==null){ +_d8c=" "; +} +return _(_d89.getHours()%12||12); +case "m": +return _(_d89.getMonth()+1); +case "M": +return _(_d89.getMinutes()); +case "n": +return "\n"; +case "p": +return info[_d89.getHours()<12?"am":"pm"]; +case "r": +return $("I")+":"+$("M")+":"+$("S")+" "+$("p"); +case "R": +return $("H")+":"+$("M"); +case "S": +return _(_d89.getSeconds()); +case "t": +return "\t"; +case "T": +return $("H")+":"+$("M")+":"+$("S"); +case "u": +return String(_d89.getDay()||7); +case "U": +return _(dojo.date.getWeekOfYear(_d89)); +case "V": +return _(dojo.date.getIsoWeekOfYear(_d89)); +case "W": +return _(dojo.date.getWeekOfYear(_d89,1)); +case "w": +return String(_d89.getDay()); +case "x": +return dojo.date.format(_d89,{selector:"dateOnly",locale:_d8b}); +case "X": +return dojo.date.format(_d89,{selector:"timeOnly",locale:_d8b}); +case "y": +return _(_d89.getFullYear()%100); +case "Y": +return String(_d89.getFullYear()); +case "z": +var _d91=_d89.getTimezoneOffset(); +return (_d91>0?"-":"+")+_(Math.floor(Math.abs(_d91)/60))+":"+_(Math.abs(_d91)%60); +case "Z": +return dojo.date.getTimezoneName(_d89); +case "%": +return "%"; +} +} +var _d92=""; +var i=0; +var _d94=0; +var _d95=null; +while((_d94=_d8a.indexOf("%",i))!=-1){ +_d92+=_d8a.substring(i,_d94++); +switch(_d8a.charAt(_d94++)){ +case "_": +_d8c=" "; +break; +case "-": +_d8c=""; +break; +case "0": +_d8c="0"; +break; +case "^": +_d95="upper"; +break; +case "*": +_d95="lower"; +break; +case "#": +_d95="swap"; +break; +default: +_d8c=null; +_d94--; +break; +} +var _d96=$(_d8a.charAt(_d94++)); +switch(_d95){ +case "upper": +_d96=_d96.toUpperCase(); +break; +case "lower": +_d96=_d96.toLowerCase(); +break; +case "swap": +var _d97=_d96.toLowerCase(); +var _d98=""; +var j=0; +var ch=""; +while(j<_d96.length){ +ch=_d96.charAt(j); +_d98+=(ch==_d97.charAt(j))?ch.toUpperCase():ch.toLowerCase(); +j++; +} +_d96=_d98; +break; +default: +break; +} +_d95=null; +_d92+=_d96; +i=_d94; +} +_d92+=_d8a.substring(i); +return _d92; +}; +(function(){ +var _d9b=[]; +dojo.date.addCustomFormats=function(_d9c,_d9d){ +_d9b.push({pkg:_d9c,name:_d9d}); +}; +dojo.date._getGregorianBundle=function(_d9e){ +var _d9f={}; +dojo.lang.forEach(_d9b,function(desc){ +var _da1=dojo.i18n.getLocalization(desc.pkg,desc.name,_d9e); +_d9f=dojo.lang.mixin(_d9f,_da1); +},this); +return _d9f; +}; +})(); +dojo.date.addCustomFormats("dojo.i18n.calendar","gregorian"); +dojo.date.addCustomFormats("dojo.i18n.calendar","gregorianExtras"); +dojo.date.getNames=function(item,type,use,_da5){ +var _da6; +var _da7=dojo.date._getGregorianBundle(_da5); +var _da8=[item,use,type]; +if(use=="standAlone"){ +_da6=_da7[_da8.join("-")]; +} +_da8[1]="format"; +return (_da6||_da7[_da8.join("-")]).concat(); +}; +dojo.date.getDayName=function(_da9,_daa){ +return dojo.date.getNames("days","wide","format",_daa)[_da9.getDay()]; +}; +dojo.date.getDayShortName=function(_dab,_dac){ +return dojo.date.getNames("days","abbr","format",_dac)[_dab.getDay()]; +}; +dojo.date.getMonthName=function(_dad,_dae){ +return dojo.date.getNames("months","wide","format",_dae)[_dad.getMonth()]; +}; +dojo.date.getMonthShortName=function(_daf,_db0){ +return dojo.date.getNames("months","abbr","format",_db0)[_daf.getMonth()]; +}; +dojo.date.toRelativeString=function(_db1){ +var now=new Date(); +var diff=(now-_db1)/1000; +var end=" ago"; +var _db5=false; +if(diff<0){ +_db5=true; +end=" from now"; +diff=-diff; +} +if(diff<60){ +diff=Math.round(diff); +return diff+" second"+(diff==1?"":"s")+end; +} +if(diff<60*60){ +diff=Math.round(diff/60); +return diff+" minute"+(diff==1?"":"s")+end; +} +if(diff<60*60*24){ +diff=Math.round(diff/3600); +return diff+" hour"+(diff==1?"":"s")+end; +} +if(diff<60*60*24*7){ +diff=Math.round(diff/(3600*24)); +if(diff==1){ +return _db5?"Tomorrow":"Yesterday"; +}else{ +return diff+" days"+end; +} +} +return dojo.date.format(_db1); +}; +dojo.date.toSql=function(_db6,_db7){ +return dojo.date.strftime(_db6,"%F"+!_db7?" %T":""); +}; +dojo.date.fromSql=function(_db8){ +var _db9=_db8.split(/[\- :]/g); +while(_db9.length<6){ +_db9.push(0); +} +return new Date(_db9[0],(parseInt(_db9[1],10)-1),_db9[2],_db9[3],_db9[4],_db9[5]); +}; +dojo.provide("dojo.widget.TimePicker"); +dojo.widget.defineWidget("dojo.widget.TimePicker",dojo.widget.HtmlWidget,function(){ +this.time=""; +this.useDefaultTime=false; +this.useDefaultMinutes=false; +this.storedTime=""; +this.currentTime={}; +this.classNames={selectedTime:"selectedItem"}; +this.any="any"; +this.selectedTime={hour:"",minute:"",amPm:"",anyTime:false}; +this.hourIndexMap=["",2,4,6,8,10,1,3,5,7,9,11,0]; +this.minuteIndexMap=[0,2,4,6,8,10,1,3,5,7,9,11]; +},{isContainer:false,templateString:"
    \r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t
     ${this.calendar.field-hour}${this.calendar.field-minute} 
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    126
    17
    28
    39
    410
    511
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    0030
    0535
    1040
    1545
    2050
    2555
    \r\n\t\t\t\t
     \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    ${this.calendar.am}${this.calendar.pm}
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    ${this.widgetStrings.any}
    \r\n\t\t\t\t
     
    \r\n
    \r\n",templateCssString:"/*Time Picker */\r\n.timePickerContainer {\r\n\twidth:122px;\r\n\tfont-family:Tahoma, Myriad, Helvetica, Arial, Verdana, sans-serif;\r\n\tfont-size:16px;\r\n}\r\n\r\n.timeContainer {\r\n\tborder-collapse:collapse;\r\n\tborder-spacing:0;\r\n}\r\n\r\n.timeContainer thead {\r\n\tcolor:#293a4b;\r\n\tfont-size:0.9em;\r\n\tfont-weight:700;\r\n}\r\n\r\n.timeContainer thead td {\r\n\tpadding:0.25em;\r\n\tfont-size:0.80em;\r\n\tborder-bottom:1px solid #6782A8;\r\n}\r\n\r\n.timeCorner {\r\n\twidth:10px;\r\n}\r\n\r\n.cornerTopLeft {\r\n\tbackground: url(\"images/dpCurveTL.png\") top left no-repeat;\r\n}\r\n\r\n.cornerTopRight {\r\n\tbackground: url(\"images/dpCurveTR.png\") top right no-repeat;\r\n}\r\n\r\n.timeLabelContainer {\r\n\tbackground: url(\"images/dpMonthBg.png\") top left repeat-x;\r\n}\r\n\r\n.hours, .minutes, .timeBorder {\r\n\tbackground: #7591bc url(\"images/dpBg.gif\") top left repeat-x;\r\n\r\n}\r\n\r\n.hours td, .minutes td {\r\n\tpadding:0.2em;\r\n\ttext-align:center;\r\n\tfont-size:0.7em;\r\n\tfont-weight:bold;\r\n\tcursor:pointer;\r\n\tcursor:hand;\r\n\tcolor:#fff;\r\n}\r\n\r\n.minutes {\r\n\tborder-left:1px solid #f5d1db;\r\n}\r\n\r\n.hours {\r\n\tborder-right:1px solid #6782A8;\r\n}\r\n\r\n.hourSelector {\r\n\tborder-right:1px solid #6782A8;\r\n\tpadding:5px;\r\n\tpadding-right:10px;\r\n}\r\n\r\n.minutesSelector {\r\n\tpadding:5px;\r\n\tborder-left:1px solid #f5c7d4;\r\n\ttext-align:center;\r\n}\r\n\r\n.minutesHeading {\r\n\tpadding-left:9px !important;\r\n}\r\n\r\n.timeOptions {\r\n\tbackground-color:#F9C9D7;\r\n}\r\n\r\n.timeContainer .cornerBottomLeft, .timeContainer .cornerBottomRight, .timeContainer .timeOptions {\r\n\tborder-top:1px solid #6782A8;\r\n}\r\n\r\n.timeContainer .cornerBottomLeft {\r\n\tbackground: url(\"images/dpCurveBL.png\") bottom left no-repeat !important;\r\n\twidth:9px !important;\r\n\tpadding:0;\r\n\tmargin:0;\r\n}\r\n\r\n.timeContainer .cornerBottomRight {\r\n\tbackground: url(\"images/dpCurveBR.png\") bottom right no-repeat !important;\r\n\twidth:9px !important;\r\n\tpadding:0;\r\n\tmargin:0;\r\n}\r\n\r\n.timeOptions {\r\n\tcolor:#fff;\r\n\tbackground:url(\"images/dpYearBg.png\") top left repeat-x;\r\n\r\n}\r\n\r\n.selectedItem {\r\n\tbackground-color:#fff;\r\n\tcolor:#6782a8 !important;\r\n}\r\n\r\n.timeOptions .selectedItem {\r\n\tcolor:#fff !important;\r\n\tbackground-color:#9ec3fb !important;\r\n}\r\n\r\n.anyTimeContainer {\r\n\ttext-align:center;\r\n\tfont-weight:bold;\r\n\tfont-size:0.7em;\r\n\tpadding:0.1em;\r\n\tcursor:pointer;\r\n\tcursor:hand;\r\n\tcolor:#fff !important;\r\n}\r\n\r\n.amPmContainer {\r\n\twidth:100%;\r\n}\r\n\r\n.amPmContainer td {\r\n\ttext-align:center;\r\n\tfont-size:0.7em;\r\n\tfont-weight:bold;\r\n\tcursor:pointer;\r\n\tcursor:hand;\r\n\tcolor:#fff;\r\n}\r\n\r\n\r\n\r\n/*.timePickerContainer {\r\n\tmargin:1.75em 0 0.5em 0;\r\n\twidth:10em;\r\n\tfloat:left;\r\n}\r\n\r\n.timeContainer {\r\n\tborder-collapse:collapse;\r\n\tborder-spacing:0;\r\n}\r\n\r\n.timeContainer thead td{\r\n\tborder-bottom:1px solid #e6e6e6;\r\n\tpadding:0 0.4em 0.2em 0.4em;\r\n}\r\n\r\n.timeContainer td {\r\n\tfont-size:0.9em;\r\n\tpadding:0 0.25em 0 0.25em;\r\n\ttext-align:left;\r\n\tcursor:pointer;cursor:hand;\r\n}\r\n\r\n.timeContainer td.minutesHeading {\r\n\tborder-left:1px solid #e6e6e6;\r\n\tborder-right:1px solid #e6e6e6;\t\r\n}\r\n\r\n.timeContainer .minutes {\r\n\tborder-left:1px solid #e6e6e6;\r\n\tborder-right:1px solid #e6e6e6;\r\n}\r\n\r\n.selectedItem {\r\n\tbackground-color:#3a3a3a;\r\n\tcolor:#ffffff;\r\n}*/\r\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/TimePicker.css"),postMixInProperties:function(_dba,frag){ +dojo.widget.TimePicker.superclass.postMixInProperties.apply(this,arguments); +this.calendar=dojo.i18n.getLocalization("dojo.i18n.calendar","gregorian",this.lang); +this.widgetStrings=dojo.i18n.getLocalization("dojo.widget","TimePicker",this.lang); +},fillInTemplate:function(args,frag){ +var _dbe=this.getFragNodeRef(frag); +dojo.html.copyStyle(this.domNode,_dbe); +if(args.value){ +if(args.value instanceof Date){ +this.storedTime=dojo.date.toRfc3339(args.value); +}else{ +this.storedTime=args.value; +} +} +this.initData(); +this.initUI(); +},initData:function(){ +if(this.storedTime.indexOf("T")!=-1&&this.storedTime.split("T")[1]&&this.storedTime!=" "&&this.storedTime.split("T")[1]!="any"){ +this.time=dojo.widget.TimePicker.util.fromRfcDateTime(this.storedTime,this.useDefaultMinutes,this.selectedTime.anyTime); +}else{ +if(this.useDefaultTime){ +this.time=dojo.widget.TimePicker.util.fromRfcDateTime("",this.useDefaultMinutes,this.selectedTime.anyTime); +}else{ +this.selectedTime.anyTime=true; +this.time=dojo.widget.TimePicker.util.fromRfcDateTime("",0,1); +} +} +},initUI:function(){ +if(!this.selectedTime.anyTime&&this.time){ +var _dbf=dojo.widget.TimePicker.util.toAmPmHour(this.time.getHours()); +var hour=_dbf[0]; +var isAm=_dbf[1]; +var _dc2=this.time.getMinutes(); +var _dc3=parseInt(_dc2/5); +this.onSetSelectedHour(this.hourIndexMap[hour]); +this.onSetSelectedMinute(this.minuteIndexMap[_dc3]); +this.onSetSelectedAmPm(isAm); +}else{ +this.onSetSelectedAnyTime(); +} +},setTime:function(date){ +if(date){ +this.selectedTime.anyTime=false; +this.setDateTime(dojo.date.toRfc3339(date)); +}else{ +this.selectedTime.anyTime=true; +} +this.initData(); +this.initUI(); +},setDateTime:function(_dc5){ +this.storedTime=_dc5; +},onClearSelectedHour:function(evt){ +this.clearSelectedHour(); +},onClearSelectedMinute:function(evt){ +this.clearSelectedMinute(); +},onClearSelectedAmPm:function(evt){ +this.clearSelectedAmPm(); +},onClearSelectedAnyTime:function(evt){ +this.clearSelectedAnyTime(); +if(this.selectedTime.anyTime){ +this.selectedTime.anyTime=false; +this.time=dojo.widget.TimePicker.util.fromRfcDateTime("",this.useDefaultMinutes); +this.initUI(); +} +},clearSelectedHour:function(){ +var _dca=this.hourContainerNode.getElementsByTagName("td"); +for(var i=0;i<_dca.length;i++){ +dojo.html.setClass(_dca.item(i),""); +} +},clearSelectedMinute:function(){ +var _dcc=this.minuteContainerNode.getElementsByTagName("td"); +for(var i=0;i<_dcc.length;i++){ +dojo.html.setClass(_dcc.item(i),""); +} +},clearSelectedAmPm:function(){ +var _dce=this.amPmContainerNode.getElementsByTagName("td"); +for(var i=0;i<_dce.length;i++){ +dojo.html.setClass(_dce.item(i),""); +} +},clearSelectedAnyTime:function(){ +dojo.html.setClass(this.anyTimeContainerNode,"anyTimeContainer"); +},onSetSelectedHour:function(evt){ +this.onClearSelectedAnyTime(); +this.onClearSelectedHour(); +this.setSelectedHour(evt); +this.onSetTime(); +},setSelectedHour:function(evt){ +if(evt&&evt.target){ +if(evt.target.nodeType==dojo.dom.ELEMENT_NODE){ +var _dd2=evt.target; +}else{ +var _dd2=evt.target.parentNode; +} +dojo.event.browser.stopEvent(evt); +dojo.html.setClass(_dd2,this.classNames.selectedTime); +this.selectedTime["hour"]=_dd2.innerHTML; +}else{ +if(!isNaN(evt)){ +var _dd3=this.hourContainerNode.getElementsByTagName("td"); +if(_dd3.item(evt)){ +dojo.html.setClass(_dd3.item(evt),this.classNames.selectedTime); +this.selectedTime["hour"]=_dd3.item(evt).innerHTML; +} +} +} +this.selectedTime.anyTime=false; +},onSetSelectedMinute:function(evt){ +this.onClearSelectedAnyTime(); +this.onClearSelectedMinute(); +this.setSelectedMinute(evt); +this.selectedTime.anyTime=false; +this.onSetTime(); +},setSelectedMinute:function(evt){ +if(evt&&evt.target){ +if(evt.target.nodeType==dojo.dom.ELEMENT_NODE){ +var _dd6=evt.target; +}else{ +var _dd6=evt.target.parentNode; +} +dojo.event.browser.stopEvent(evt); +dojo.html.setClass(_dd6,this.classNames.selectedTime); +this.selectedTime["minute"]=_dd6.innerHTML; +}else{ +if(!isNaN(evt)){ +var _dd7=this.minuteContainerNode.getElementsByTagName("td"); +if(_dd7.item(evt)){ +dojo.html.setClass(_dd7.item(evt),this.classNames.selectedTime); +this.selectedTime["minute"]=_dd7.item(evt).innerHTML; +} +} +} +},onSetSelectedAmPm:function(evt){ +this.onClearSelectedAnyTime(); +this.onClearSelectedAmPm(); +this.setSelectedAmPm(evt); +this.selectedTime.anyTime=false; +this.onSetTime(); +},setSelectedAmPm:function(evt){ +var _dda=evt.target; +if(evt&&_dda){ +if(_dda.nodeType!=dojo.dom.ELEMENT_NODE){ +_dda=_dda.parentNode; +} +dojo.event.browser.stopEvent(evt); +this.selectedTime.amPm=_dda.id; +dojo.html.setClass(_dda,this.classNames.selectedTime); +}else{ +evt=evt?0:1; +var _ddb=this.amPmContainerNode.getElementsByTagName("td"); +if(_ddb.item(evt)){ +this.selectedTime.amPm=_ddb.item(evt).id; +dojo.html.setClass(_ddb.item(evt),this.classNames.selectedTime); +} +} +},onSetSelectedAnyTime:function(evt){ +this.onClearSelectedHour(); +this.onClearSelectedMinute(); +this.onClearSelectedAmPm(); +this.setSelectedAnyTime(); +this.onSetTime(); +},setSelectedAnyTime:function(evt){ +this.selectedTime.anyTime=true; +dojo.html.setClass(this.anyTimeContainerNode,this.classNames.selectedTime+" "+"anyTimeContainer"); +},onClick:function(evt){ +dojo.event.browser.stopEvent(evt); +},onSetTime:function(){ +if(this.selectedTime.anyTime){ +this.time=new Date(); +var _ddf=dojo.widget.TimePicker.util.toRfcDateTime(this.time); +this.setDateTime(_ddf.split("T")[0]); +}else{ +var hour=12; +var _de1=0; +var isAm=false; +if(this.selectedTime["hour"]){ +hour=parseInt(this.selectedTime["hour"],10); +} +if(this.selectedTime["minute"]){ +_de1=parseInt(this.selectedTime["minute"],10); +} +if(this.selectedTime["amPm"]){ +isAm=(this.selectedTime["amPm"].toLowerCase()=="am"); +} +this.time=new Date(); +this.time.setHours(dojo.widget.TimePicker.util.fromAmPmHour(hour,isAm)); +this.time.setMinutes(_de1); +this.setDateTime(dojo.widget.TimePicker.util.toRfcDateTime(this.time)); +} +this.onValueChanged(this.time); +},onValueChanged:function(date){ +}}); +dojo.widget.TimePicker.util=new function(){ +this.toRfcDateTime=function(_de4){ +if(!_de4){ +_de4=new Date(); +} +_de4.setSeconds(0); +return dojo.date.strftime(_de4,"%Y-%m-%dT%H:%M:00%z"); +}; +this.fromRfcDateTime=function(_de5,_de6,_de7){ +var _de8=new Date(); +if(!_de5||_de5.indexOf("T")==-1){ +if(_de6){ +_de8.setMinutes(Math.floor(_de8.getMinutes()/5)*5); +}else{ +_de8.setMinutes(0); +} +}else{ +var _de9=_de5.split("T")[1].split(":"); +var _de8=new Date(); +_de8.setHours(_de9[0]); +_de8.setMinutes(_de9[1]); +} +return _de8; +}; +this.toAmPmHour=function(hour){ +var _deb=hour; +var isAm=true; +if(_deb==0){ +_deb=12; +}else{ +if(_deb>12){ +_deb=_deb-12; +isAm=false; +}else{ +if(_deb==12){ +isAm=false; +} +} +} +return [_deb,isAm]; +}; +this.fromAmPmHour=function(_ded,isAm){ +var hour=parseInt(_ded,10); +if(isAm&&hour==12){ +hour=0; +}else{ +if(!isAm&&hour<12){ +hour=hour+12; +} +} +return hour; +}; +}; +dojo.provide("dojo.widget.DropdownTimePicker"); +dojo.widget.defineWidget("dojo.widget.DropdownTimePicker",dojo.widget.DropdownContainer,{iconURL:dojo.uri.moduleUri("dojo.widget","templates/images/timeIcon.gif"),formatLength:"short",displayFormat:"",timeFormat:"",saveFormat:"",value:"",name:"",postMixInProperties:function(){ +dojo.widget.DropdownTimePicker.superclass.postMixInProperties.apply(this,arguments); +var _df0=dojo.i18n.getLocalization("dojo.widget","DropdownTimePicker",this.lang); +this.iconAlt=_df0.selectTime; +if(typeof (this.value)=="string"&&this.value.toLowerCase()=="today"){ +this.value=new Date(); +} +if(this.value&&isNaN(this.value)){ +var orig=this.value; +this.value=dojo.date.fromRfc3339(this.value); +if(!this.value){ +var d=dojo.date.format(new Date(),{selector:"dateOnly",datePattern:"yyyy-MM-dd"}); +var c=orig.split(":"); +for(var i=0;i\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\"↑\"\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t

    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t

    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\r\n",templateCssString:".datePickerContainer {\r\n\twidth:164px; /* needed for proper user styling */\r\n}\r\n\r\n.calendarContainer {\r\n/*\tborder:1px solid #566f8f;*/\r\n}\r\n\r\n.calendarBodyContainer {\r\n\twidth:100%; /* needed for the explode effect (explain?) */\r\n\tbackground: #7591bc url(\"images/dpBg.gif\") top left repeat-x;\r\n}\r\n\r\n.calendarBodyContainer thead tr td {\r\n\tcolor:#293a4b;\r\n\tfont:bold 0.75em Helvetica, Arial, Verdana, sans-serif;\r\n\ttext-align:center;\r\n\tpadding:0.25em;\r\n\tbackground: url(\"images/dpHorizLine.gif\") bottom left repeat-x;\r\n}\r\n\r\n.calendarBodyContainer tbody tr td {\r\n\tcolor:#fff;\r\n\tfont:bold 0.7em Helvetica, Arial, Verdana, sans-serif;\r\n\ttext-align:center;\r\n\tpadding:0.4em;\r\n\tbackground: url(\"images/dpVertLine.gif\") top right repeat-y;\r\n\tcursor:pointer;\r\n\tcursor:hand;\r\n}\r\n\r\n\r\n.monthWrapper {\r\n\tpadding-bottom:2px;\r\n\tbackground: url(\"images/dpHorizLine.gif\") bottom left repeat-x;\r\n}\r\n\r\n.monthContainer {\r\n\twidth:100%;\r\n}\r\n\r\n.monthLabelContainer {\r\n\ttext-align:center;\r\n\tfont:bold 0.75em Helvetica, Arial, Verdana, sans-serif;\r\n\tbackground: url(\"images/dpMonthBg.png\") repeat-x top left !important;\r\n\tcolor:#293a4b;\r\n\tpadding:0.25em;\r\n}\r\n\r\n.monthCurve {\r\n\twidth:12px;\r\n}\r\n\r\n.monthCurveTL {\r\n\tbackground: url(\"images/dpCurveTL.png\") no-repeat top left !important;\r\n}\r\n\r\n.monthCurveTR {\r\n\t\tbackground: url(\"images/dpCurveTR.png\") no-repeat top right !important;\r\n}\r\n\r\n\r\n.yearWrapper {\r\n\tbackground: url(\"images/dpHorizLineFoot.gif\") top left repeat-x;\r\n\tpadding-top:2px;\r\n}\r\n\r\n.yearContainer {\r\n\twidth:100%;\r\n}\r\n\r\n.yearContainer td {\r\n\tbackground:url(\"images/dpYearBg.png\") top left repeat-x;\r\n}\r\n\r\n.yearContainer .yearLabel {\r\n\tmargin:0;\r\n\tpadding:0.45em 0 0.45em 0;\r\n\tcolor:#fff;\r\n\tfont:bold 0.75em Helvetica, Arial, Verdana, sans-serif;\r\n\ttext-align:center;\r\n}\r\n\r\n.curveBL {\r\n\tbackground: url(\"images/dpCurveBL.png\") bottom left no-repeat !important;\r\n\twidth:9px !important;\r\n\tpadding:0;\r\n\tmargin:0;\r\n}\r\n\r\n.curveBR {\r\n\tbackground: url(\"images/dpCurveBR.png\") bottom right no-repeat !important;\r\n\twidth:9px !important;\r\n\tpadding:0;\r\n\tmargin:0;\r\n}\r\n\r\n\r\n.previousMonth {\r\n\tbackground-color:#6782a8 !important;\r\n}\r\n\r\n.previousMonthDisabled {\r\n\tbackground-color:#a4a5a6 !important;\r\n\tcursor:default !important\r\n}\r\n.currentMonth {\r\n}\r\n\r\n.currentMonthDisabled {\r\n\tbackground-color:#bbbbbc !important;\r\n\tcursor:default !important\r\n}\r\n.nextMonth {\r\n\tbackground-color:#6782a8 !important;\r\n}\r\n.nextMonthDisabled {\r\n\tbackground-color:#a4a5a6 !important;\r\n\tcursor:default !important;\r\n}\r\n\r\n.currentDate {\r\n\ttext-decoration:underline;\r\n\tfont-style:italic;\r\n}\r\n\r\n.selectedDate {\r\n\tbackground-color:#fff !important;\r\n\tcolor:#6782a8 !important;\r\n}\r\n\r\n.yearLabel .selectedYear {\r\n\tpadding:0.2em;\r\n\tbackground-color:#9ec3fb !important;\r\n}\r\n\r\n.nextYear, .previousYear {\r\n\tcursor:pointer;cursor:hand;\r\n\tpadding:0;\r\n}\r\n\r\n.nextYear {\r\n\tmargin:0 0 0 0.55em;\r\n}\r\n\r\n.previousYear {\r\n\tmargin:0 0.55em 0 0;\r\n}\r\n\r\n.incrementControl {\r\n\tcursor:pointer;cursor:hand;\r\n\twidth:1em;\r\n}\r\n\r\n.increase {\r\n\tfloat:right;\r\n}\r\n\r\n.decrease {\r\n\tfloat:left;\r\n}\r\n\r\n.lastColumn {\r\n\tbackground-image:none !important;\r\n}\r\n\r\n\r\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/DatePicker.css"),postMixInProperties:function(){ +dojo.widget.DatePicker.superclass.postMixInProperties.apply(this,arguments); +if(!this.weekStartsOn){ +this.weekStartsOn=dojo.date.getFirstDayOfWeek(this.lang); +} +this.today=new Date(); +this.today.setHours(0,0,0,0); +if(typeof (this.value)=="string"&&this.value.toLowerCase()=="today"){ +this.value=new Date(); +}else{ +if(this.value&&(typeof this.value=="string")&&(this.value.split("-").length>2)){ +this.value=dojo.date.fromRfc3339(this.value); +this.value.setHours(0,0,0,0); +} +} +},fillInTemplate:function(args,frag){ +dojo.widget.DatePicker.superclass.fillInTemplate.apply(this,arguments); +var _e0e=this.getFragNodeRef(frag); +dojo.html.copyStyle(this.domNode,_e0e); +this.weekTemplate=dojo.dom.removeNode(this.calendarWeekTemplate); +this._preInitUI(this.value?this.value:this.today,false,true); +var _e0f=dojo.lang.unnest(dojo.date.getNames("days",this.dayWidth,"standAlone",this.lang)); +if(this.weekStartsOn>0){ +for(var i=0;ithis.endDate){ +_e14=new Date((_e14days){ +this._preInitUI(this.startDate,true,false); +_e17=new Date(this.firstDay); +} +this.curMonth=new Date(_e17); +this.curMonth.setDate(_e17.getDate()+6); +this.curMonth.setDate(1); +var _e1a=(_e17.getMonth()==this.curMonth.getMonth())?"current":"previous"; +} +if(_e16){ +this._initUI(days); +} +},_initUI:function(days){ +dojo.dom.removeChildren(this.calendarDatesContainerNode); +for(var i=0;ithis.endDate){ +_e27=_e29=_e2b=false; +} +if(_e28&&add(d,DAY,-1)this.endDate){ +_e29=_e2b=false; +} +if(_e2a&&add(d2,YEAR,-1)this.endDate){ +_e2b=false; +} +} +function enableControl(node,_e2e){ +dojo.html.setVisibility(node,_e2e?"":"hidden"); +} +enableControl(this.decreaseWeekNode,_e26); +enableControl(this.increaseWeekNode,_e27); +enableControl(this.decreaseMonthNode,_e28); +enableControl(this.increaseMonthNode,_e29); +enableControl(this.previousYearLabelNode,_e2a); +enableControl(this.nextYearLabelNode,_e2b); +},_incrementWeek:function(evt){ +var d=new Date(this.firstDay); +switch(evt.target){ +case this.increaseWeekNode.getElementsByTagName("img").item(0): +case this.increaseWeekNode: +var _e31=dojo.date.add(d,dojo.date.dateParts.WEEK,1); +if(_e31=this.startDate){ +d=dojo.date.add(d,dojo.date.dateParts.WEEK,-1); +} +break; +} +this._preInitUI(d,true,true); +},_incrementMonth:function(evt){ +var d=new Date(this.curMonth); +var _e34=new Date(this.firstDay); +switch(evt.currentTarget){ +case this.increaseMonthNode.getElementsByTagName("img").item(0): +case this.increaseMonthNode: +_e34=dojo.date.add(_e34,dojo.date.dateParts.DAY,this.displayWeeks*7); +if(_e34this.startDate){ +d=dojo.date.add(d,dojo.date.dateParts.MONTH,-1); +}else{ +var _e36=true; +} +break; +} +if(_e36){ +d=new Date(this.startDate); +}else{ +if(_e35){ +d=new Date(this.endDate); +} +} +this._preInitUI(d,false,true); +},_incrementYear:function(evt){ +var year=this.curMonth.getFullYear(); +var _e39=new Date(this.firstDay); +switch(evt.target){ +case this.nextYearLabelNode: +_e39=dojo.date.add(_e39,dojo.date.dateParts.YEAR,1); +if(_e39this.startDate){ +year--; +}else{ +var _e3b=true; +} +break; +} +var d; +if(_e3b){ +d=new Date(this.startDate); +}else{ +if(_e3a){ +d=new Date(this.endDate); +}else{ +d=new Date(year,this.curMonth.getMonth(),1); +} +} +this._preInitUI(d,false,true); +},onIncrementWeek:function(evt){ +evt.stopPropagation(); +if(!this.staticDisplay){ +this._incrementWeek(evt); +} +},onIncrementMonth:function(evt){ +evt.stopPropagation(); +if(!this.staticDisplay){ +this._incrementMonth(evt); +} +},onIncrementYear:function(evt){ +evt.stopPropagation(); +if(!this.staticDisplay){ +this._incrementYear(evt); +} +},_setMonthLabel:function(_e40){ +this.monthLabelNode.innerHTML=dojo.date.getNames("months","wide","standAlone",this.lang)[_e40]; +},_setYearLabels:function(year){ +var y=year-1; +var that=this; +function f(n){ +that[n+"YearLabelNode"].innerHTML=dojo.date.format(new Date(y++,0),{formatLength:"yearOnly",locale:that.lang}); +} +f("previous"); +f("current"); +f("next"); +},_getDateClassName:function(date,_e46){ +var _e47=this.classNames[_e46]; +if((!this.selectedIsUsed&&this.value)&&(Number(date)==Number(this.value))){ +_e47=this.classNames.selectedDate+" "+_e47; +this.selectedIsUsed=true; +} +if((!this.currentIsUsed)&&(Number(date)==Number(this.today))){ +_e47=_e47+" "+this.classNames.currentDate; +this.currentIsUsed=true; +} +return _e47; +},onClick:function(evt){ +dojo.event.browser.stopEvent(evt); +},_handleUiClick:function(evt){ +var _e4a=evt.target; +if(_e4a.nodeType!=dojo.dom.ELEMENT_NODE){ +_e4a=_e4a.parentNode; +} +dojo.event.browser.stopEvent(evt); +this.selectedIsUsed=this.todayIsUsed=false; +if(dojo.html.hasClass(_e4a,this.classNames["disabledPrevious"])||dojo.html.hasClass(_e4a,this.classNames["disabledCurrent"])||dojo.html.hasClass(_e4a,this.classNames["disabledNext"])){ +return; +} +this.clickedNode=_e4a; +this.setDate(new Date(Number(dojo.html.getAttribute(_e4a,"djDateValue")))); +},onValueChanged:function(date){ +},_isDisabledDate:function(_e4c){ +if(_e4cthis.endDate){ +return true; +} +return this.isDisabledDate(_e4c,this.lang); +},isDisabledDate:function(_e4d,_e4e){ +return false; +},_initFirstDay:function(_e4f,adj){ +var d=new Date(_e4f); +if(!adj){ +d.setDate(1); +} +d.setDate(d.getDate()-this._getAdjustedDay(d,this.weekStartsOn)); +d.setHours(0,0,0,0); +return d; +},_getAdjustedDay:function(_e52){ +var days=[0,1,2,3,4,5,6]; +if(this.weekStartsOn>0){ +for(var i=0;ithis.datePicker.endDate){ +this.inputNode.value=""; +} +this._syncValueNode(); +this.onValueChanged(this.getDate()); +this.hideContainer(); +},onValueChanged:function(_e5e){ +},onInputChange:function(){ +var _e5f=dojo.string.trim(this.inputNode.value); +if(_e5f){ +var _e60=dojo.date.parse(_e5f,{formatLength:this.formatLength,datePattern:this.displayFormat,selector:"dateOnly",locale:this.lang}); +if(!this.datePicker._isDisabledDate(_e60)){ +this.setDate(_e60); +} +}else{ +if(_e5f==""){ +this.datePicker.setDate(""); +} +this.valueNode.value=_e5f; +} +if(_e5f){ +this._updateText(); +} +},_syncValueNode:function(){ +var date=this.datePicker.value; +var _e62=""; +switch(this.saveFormat.toLowerCase()){ +case "rfc": +case "iso": +case "": +_e62=dojo.date.toRfc3339(date,"dateOnly"); +break; +case "posix": +case "unix": +_e62=Number(date); +break; +default: +if(date){ +_e62=dojo.date.format(date,{datePattern:this.saveFormat,selector:"dateOnly",locale:this.lang}); +} +} +this.valueNode.value=_e62; +},destroy:function(_e63){ +this.datePicker.destroy(_e63); +dojo.widget.DropdownDatePicker.superclass.destroy.apply(this,arguments); +}}); +dojo.provide("struts.widget.StrutsDatePicker"); +dojo.widget.defineWidget("struts.widget.StrutsDatePicker",dojo.widget.DropdownDatePicker,{widgetType:"StrutsDatePicker",valueNotifyTopics:"",valueNotifyTopicsArray:null,postCreate:function(){ +struts.widget.StrutsDatePicker.superclass.postCreate.apply(this,arguments); +if(this.extraArgs["class"]){ +dojo.html.setClass(this.inputNode,this.extraArgs["class"]); +} +if(this.extraArgs.style){ +dojo.html.setStyleText(this.inputNode,this.extraArgs.style); +} +if(!dojo.string.isBlank(this.valueNotifyTopics)){ +this.valueNotifyTopicsArray=this.valueNotifyTopics.split(","); +} +},_syncValueNode:function(){ +var date=this.datePicker.value; +var _e65=""; +switch(this.saveFormat.toLowerCase()){ +case "rfc": +case "iso": +case "": +_e65=dojo.date.toRfc3339(date); +break; +case "posix": +case "unix": +_e65=Number(date); +break; +default: +if(date){ +_e65=dojo.date.format(date,{datePattern:this.saveFormat,selector:"dateOnly",locale:this.lang}); +} +} +this.valueNode.value=_e65; +},_updateText:function(){ +struts.widget.StrutsDatePicker.superclass._updateText.apply(this,arguments); +if(this.valueNotifyTopicsArray!=null){ +for(var i=0;i",selectedChild:"",fillInTemplate:function(args,frag){ +var _e8d=this.getFragNodeRef(frag); +dojo.html.copyStyle(this.domNode,_e8d); +dojo.widget.PageContainer.superclass.fillInTemplate.apply(this,arguments); +},postCreate:function(args,frag){ +if(this.children.length){ +dojo.lang.forEach(this.children,this._setupChild,this); +var _e90; +if(this.selectedChild){ +this.selectChild(this.selectedChild); +}else{ +for(var i=0;i0){ +this.selectChild(this.children[0],true); +} +} +},selectChild:function(page,_e96){ +page=dojo.widget.byId(page); +this.correspondingPageButton=_e96; +if(this.selectedChildWidget){ +this._hideChild(this.selectedChildWidget); +} +this.selectedChildWidget=page; +this.selectedChild=page.widgetId; +this._showChild(page); +page.isFirstChild=(page==this.children[0]); +page.isLastChild=(page==this.children[this.children.length-1]); +dojo.event.topic.publish(this.widgetId+"-selectChild",page); +},forward:function(){ +var _e97=dojo.lang.find(this.children,this.selectedChildWidget); +this.selectChild(this.children[_e97+1]); +},back:function(){ +var _e98=dojo.lang.find(this.children,this.selectedChildWidget); +this.selectChild(this.children[_e98-1]); +},onResized:function(){ +if(this.doLayout&&this.selectedChildWidget){ +with(this.selectedChildWidget.domNode.style){ +top=dojo.html.getPixelValue(this.containerNode,"padding-top",true); +left=dojo.html.getPixelValue(this.containerNode,"padding-left",true); +} +var _e99=dojo.html.getContentBox(this.containerNode); +this.selectedChildWidget.resizeTo(_e99.width,_e99.height); +} +},_showChild:function(page){ +if(this.doLayout){ +var _e9b=dojo.html.getContentBox(this.containerNode); +page.resizeTo(_e9b.width,_e9b.height); +} +page.selected=true; +page.show(); +},_hideChild:function(page){ +page.selected=false; +page.hide(); +},closeChild:function(page){ +var _e9e=page.onClose(this,page); +if(_e9e){ +this.removeChild(page); +page.destroy(); +} +},destroy:function(){ +this._beingDestroyed=true; +dojo.event.topic.destroy(this.widgetId+"-addChild"); +dojo.event.topic.destroy(this.widgetId+"-removeChild"); +dojo.event.topic.destroy(this.widgetId+"-selectChild"); +dojo.widget.PageContainer.superclass.destroy.apply(this,arguments); +}}); +dojo.widget.defineWidget("dojo.widget.PageController",dojo.widget.HtmlWidget,{templateString:"",isContainer:true,containerId:"",buttonWidget:"PageButton","class":"dojoPageController",fillInTemplate:function(){ +dojo.html.addClass(this.domNode,this["class"]); +dojo.widget.wai.setAttr(this.domNode,"waiRole","role","tablist"); +},postCreate:function(){ +this.pane2button={}; +var _e9f=dojo.widget.byId(this.containerId); +if(_e9f){ +dojo.lang.forEach(_e9f.children,this.onAddChild,this); +} +dojo.event.topic.subscribe(this.containerId+"-addChild",this,"onAddChild"); +dojo.event.topic.subscribe(this.containerId+"-removeChild",this,"onRemoveChild"); +dojo.event.topic.subscribe(this.containerId+"-selectChild",this,"onSelectChild"); +},destroy:function(){ +dojo.event.topic.unsubscribe(this.containerId+"-addChild",this,"onAddChild"); +dojo.event.topic.unsubscribe(this.containerId+"-removeChild",this,"onRemoveChild"); +dojo.event.topic.unsubscribe(this.containerId+"-selectChild",this,"onSelectChild"); +dojo.widget.PageController.superclass.destroy.apply(this,arguments); +},onAddChild:function(page){ +var _ea1=dojo.widget.createWidget(this.buttonWidget,{label:page.label,closeButton:page.closable}); +this.addChild(_ea1); +this.domNode.appendChild(_ea1.domNode); +this.pane2button[page]=_ea1; +page.controlButton=_ea1; +var _ea2=this; +dojo.event.connect(_ea1,"onClick",function(){ +_ea2.onButtonClick(page); +}); +dojo.event.connect(_ea1,"onCloseButtonClick",function(){ +_ea2.onCloseButtonClick(page); +}); +},onRemoveChild:function(page){ +if(this._currentChild==page){ +this._currentChild=null; +} +var _ea4=this.pane2button[page]; +if(_ea4){ +_ea4.destroy(); +} +this.pane2button[page]=null; +},onSelectChild:function(page){ +if(this._currentChild){ +var _ea6=this.pane2button[this._currentChild]; +_ea6.clearSelected(); +} +var _ea7=this.pane2button[page]; +_ea7.setSelected(); +this._currentChild=page; +},onButtonClick:function(page){ +var _ea9=dojo.widget.byId(this.containerId); +_ea9.selectChild(page,false,this); +},onCloseButtonClick:function(page){ +var _eab=dojo.widget.byId(this.containerId); +_eab.closeChild(page); +},onKey:function(evt){ +if((evt.keyCode==evt.KEY_RIGHT_ARROW)||(evt.keyCode==evt.KEY_LEFT_ARROW)){ +var _ead=0; +var next=null; +var _ead=dojo.lang.find(this.children,this.pane2button[this._currentChild]); +if(evt.keyCode==evt.KEY_RIGHT_ARROW){ +next=this.children[(_ead+1)%this.children.length]; +}else{ +next=this.children[(_ead+(this.children.length-1))%this.children.length]; +} +dojo.event.browser.stopEvent(evt); +next.onClick(); +} +}}); +dojo.widget.defineWidget("dojo.widget.PageButton",dojo.widget.HtmlWidget,{templateString:""+"${this.label}"+"[X]"+"",label:"foo",closeButton:false,onClick:function(){ +this.focus(); +},onCloseButtonMouseOver:function(){ +dojo.html.addClass(this.closeButtonNode,"closeHover"); +},onCloseButtonMouseOut:function(){ +dojo.html.removeClass(this.closeButtonNode,"closeHover"); +},onCloseButtonClick:function(evt){ +},setSelected:function(){ +dojo.html.addClass(this.domNode,"current"); +this.titleNode.setAttribute("tabIndex","0"); +},clearSelected:function(){ +dojo.html.removeClass(this.domNode,"current"); +this.titleNode.setAttribute("tabIndex","-1"); +},focus:function(){ +if(this.titleNode.focus){ +this.titleNode.focus(); +} +}}); +dojo.lang.extend(dojo.widget.Widget,{label:"",selected:false,closable:false,onClose:function(){ +return true; +}}); +dojo.provide("dojo.widget.TabContainer"); +dojo.widget.defineWidget("dojo.widget.TabContainer",dojo.widget.PageContainer,{labelPosition:"top",closeButton:"none",templateString:null,templateString:"
    \r\n\t
    \r\n\t
    \r\n
    \r\n",templateCssString:".dojoTabContainer {\r\n\tposition : relative;\r\n}\r\n\r\n.dojoTabPaneWrapper {\r\n\tborder : 1px solid #6290d2;\r\n\t_zoom: 1; /* force IE6 layout mode so top border doesnt disappear */\r\n\tdisplay: block;\r\n\tclear: both;\r\n\toverflow: hidden;\r\n}\r\n\r\n.dojoTabLabels-top {\r\n\tposition : relative;\r\n\ttop : 0px;\r\n\tleft : 0px;\r\n\toverflow : visible;\r\n\tmargin-bottom : -1px;\r\n\twidth : 100%;\r\n\tz-index: 2;\t/* so the bottom of the tab label will cover up the border of dojoTabPaneWrapper */\r\n}\r\n\r\n.dojoTabNoLayout.dojoTabLabels-top .dojoTab {\r\n\tmargin-bottom: -1px;\r\n\t_margin-bottom: 0px; /* IE filter so top border lines up correctly */\r\n}\r\n\r\n.dojoTab {\r\n\tposition : relative;\r\n\tfloat : left;\r\n\tpadding-left : 9px;\r\n\tborder-bottom : 1px solid #6290d2;\r\n\tbackground : url(images/tab_left.gif) no-repeat left top;\r\n\tcursor: pointer;\r\n\twhite-space: nowrap;\r\n\tz-index: 3;\r\n}\r\n\r\n.dojoTab div {\r\n\tdisplay : block;\r\n\tpadding : 4px 15px 4px 6px;\r\n\tbackground : url(images/tab_top_right.gif) no-repeat right top;\r\n\tcolor : #333;\r\n\tfont-size : 90%;\r\n}\r\n\r\n.dojoTab .close {\r\n\tdisplay : inline-block;\r\n\theight : 12px;\r\n\twidth : 12px;\r\n\tpadding : 0 12px 0 0;\r\n\tmargin : 0 -10px 0 10px;\r\n\tcursor : default;\r\n\tfont-size: small;\r\n}\r\n\r\n.dojoTab .closeImage {\r\n\tbackground : url(images/tab_close.gif) no-repeat right top;\r\n}\r\n\r\n.dojoTab .closeHover {\r\n\tbackground-image : url(images/tab_close_h.gif);\r\n}\r\n\r\n.dojoTab.current {\r\n\tpadding-bottom : 1px;\r\n\tborder-bottom : 0;\r\n\tbackground-position : 0 -150px;\r\n}\r\n\r\n.dojoTab.current div {\r\n\tpadding-bottom : 5px;\r\n\tmargin-bottom : -1px;\r\n\tbackground-position : 100% -150px;\r\n}\r\n\r\n/* bottom tabs */\r\n\r\n.dojoTabLabels-bottom {\r\n\tposition : relative;\r\n\tbottom : 0px;\r\n\tleft : 0px;\r\n\toverflow : visible;\r\n\tmargin-top : -1px;\r\n\twidth : 100%;\r\n\tz-index: 2;\r\n}\r\n\r\n.dojoTabNoLayout.dojoTabLabels-bottom {\r\n\tposition : relative;\r\n}\r\n\r\n.dojoTabLabels-bottom .dojoTab {\r\n\tborder-top : 1px solid #6290d2;\r\n\tborder-bottom : 0;\r\n\tbackground : url(images/tab_bot_left.gif) no-repeat left bottom;\r\n}\r\n\r\n.dojoTabLabels-bottom .dojoTab div {\r\n\tbackground : url(images/tab_bot_right.gif) no-repeat right bottom;\r\n}\r\n\r\n.dojoTabLabels-bottom .dojoTab.current {\r\n\tborder-top : 0;\r\n\tbackground : url(images/tab_bot_left_curr.gif) no-repeat left bottom;\r\n}\r\n\r\n.dojoTabLabels-bottom .dojoTab.current div {\r\n\tpadding-top : 4px;\r\n\tbackground : url(images/tab_bot_right_curr.gif) no-repeat right bottom;\r\n}\r\n\r\n/* right-h tabs */\r\n\r\n.dojoTabLabels-right-h {\r\n\toverflow : visible;\r\n\tmargin-left : -1px;\r\n\tz-index: 2;\r\n}\r\n\r\n.dojoTabLabels-right-h .dojoTab {\r\n\tpadding-left : 0;\r\n\tborder-left : 1px solid #6290d2;\r\n\tborder-bottom : 0;\r\n\tbackground : url(images/tab_bot_right.gif) no-repeat right bottom;\r\n\tfloat : none;\r\n}\r\n\r\n.dojoTabLabels-right-h .dojoTab div {\r\n\tpadding : 4px 15px 4px 15px;\r\n}\r\n\r\n.dojoTabLabels-right-h .dojoTab.current {\r\n\tborder-left : 0;\r\n\tborder-bottom : 1px solid #6290d2;\r\n}\r\n\r\n/* left-h tabs */\r\n\r\n.dojoTabLabels-left-h {\r\n\toverflow : visible;\r\n\tmargin-right : -1px;\r\n\tz-index: 2;\r\n}\r\n\r\n.dojoTabLabels-left-h .dojoTab {\r\n\tborder-right : 1px solid #6290d2;\r\n\tborder-bottom : 0;\r\n\tfloat : none;\r\n\tbackground : url(images/tab_top_left.gif) no-repeat left top;\r\n}\r\n\r\n.dojoTabLabels-left-h .dojoTab.current {\r\n\tborder-right : 0;\r\n\tborder-bottom : 1px solid #6290d2;\r\n\tpadding-bottom : 0;\r\n\tbackground : url(images/tab_top_left.gif) no-repeat 0 -150px;\r\n}\r\n\r\n.dojoTabLabels-left-h .dojoTab div {\r\n\tbackground : 0;\r\n\tborder-bottom : 1px solid #6290d2;\r\n}\r\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/TabContainer.css"),selectedTab:"",postMixInProperties:function(){ +if(this.selectedTab){ +dojo.deprecated("selectedTab deprecated, use selectedChild instead, will be removed in","0.5"); +this.selectedChild=this.selectedTab; +} +if(this.closeButton!="none"){ +dojo.deprecated("closeButton deprecated, use closable='true' on each child instead, will be removed in","0.5"); +} +dojo.widget.TabContainer.superclass.postMixInProperties.apply(this,arguments); +},fillInTemplate:function(){ +this.tablist=dojo.widget.createWidget("TabController",{id:this.widgetId+"_tablist",labelPosition:this.labelPosition,doLayout:this.doLayout,containerId:this.widgetId},this.tablistNode); +dojo.widget.TabContainer.superclass.fillInTemplate.apply(this,arguments); +},postCreate:function(args,frag){ +dojo.widget.TabContainer.superclass.postCreate.apply(this,arguments); +this.onResized(); +},_setupChild:function(tab){ +if(this.closeButton=="tab"||this.closeButton=="pane"){ +tab.closable=true; +} +dojo.html.addClass(tab.domNode,"dojoTabPane"); +dojo.widget.TabContainer.superclass._setupChild.apply(this,arguments); +},onResized:function(){ +if(!this.doLayout){ +return; +} +var _eb3=this.labelPosition.replace(/-h/,""); +var _eb4=[{domNode:this.tablist.domNode,layoutAlign:_eb3},{domNode:this.containerNode,layoutAlign:"client"}]; +dojo.widget.html.layout(this.domNode,_eb4); +if(this.selectedChildWidget){ +var _eb5=dojo.html.getContentBox(this.containerNode); +this.selectedChildWidget.resizeTo(_eb5.width,_eb5.height); +} +},selectTab:function(tab,_eb7){ +dojo.deprecated("use selectChild() rather than selectTab(), selectTab() will be removed in","0.5"); +this.selectChild(tab,_eb7); +},onKey:function(e){ +if(e.keyCode==e.KEY_UP_ARROW&&e.ctrlKey){ +var _eb9=this.correspondingTabButton||this.selectedTabWidget.tabButton; +_eb9.focus(); +dojo.event.browser.stopEvent(e); +}else{ +if(e.keyCode==e.KEY_DELETE&&e.altKey){ +if(this.selectedChildWidget.closable){ +this.closeChild(this.selectedChildWidget); +dojo.event.browser.stopEvent(e); +} +} +} +},destroy:function(){ +this.tablist.destroy(); +dojo.widget.TabContainer.superclass.destroy.apply(this,arguments); +}}); +dojo.widget.defineWidget("dojo.widget.TabController",dojo.widget.PageController,{templateString:"
    ",labelPosition:"top",doLayout:true,"class":"",buttonWidget:"TabButton",postMixInProperties:function(){ +if(!this["class"]){ +this["class"]="dojoTabLabels-"+this.labelPosition+(this.doLayout?"":" dojoTabNoLayout"); +} +dojo.widget.TabController.superclass.postMixInProperties.apply(this,arguments); +}}); +dojo.widget.defineWidget("dojo.widget.TabButton",dojo.widget.PageButton,{templateString:"
    "+"
    "+"${this.label}"+""+"
    "+"
    ",postMixInProperties:function(){ +this.closeButtonStyle=this.closeButton?"":"display: none"; +dojo.widget.TabButton.superclass.postMixInProperties.apply(this,arguments); +},fillInTemplate:function(){ +dojo.html.disableSelection(this.titleNode); +dojo.widget.TabButton.superclass.fillInTemplate.apply(this,arguments); +},onCloseButtonClick:function(evt){ +evt.stopPropagation(); +dojo.widget.TabButton.superclass.onCloseButtonClick.apply(this,arguments); +}}); +dojo.widget.defineWidget("dojo.widget.a11y.TabButton",dojo.widget.TabButton,{imgPath:dojo.uri.moduleUri("dojo.widget","templates/images/tab_close.gif"),templateString:"
    "+"
    "+"${this.label}"+"[x]"+"
    "+"
    "}); +dojo.provide("struts.widget.StrutsTabContainer"); +dojo.widget.defineWidget("struts.widget.StrutsTabContainer",dojo.widget.TabContainer,{widgetType:"StrutsTabContainer",afterSelectTabNotifyTopics:"",afterSelectTabNotifyTopicsArray:null,beforeSelectTabNotifyTopics:"",beforeSelectTabNotifyTopicsArray:null,disabledTabCssClass:"strutsDisabledTab",postCreate:function(){ +struts.widget.StrutsTabContainer.superclass.postCreate.apply(this); +if(!dojo.string.isBlank(this.beforeSelectTabNotifyTopics)){ +this.beforeSelectTabNotifyTopicsArray=this.beforeSelectTabNotifyTopics.split(","); +} +if(!dojo.string.isBlank(this.afterSelectTabNotifyTopics)){ +this.afterSelectTabNotifyTopicsArray=this.afterSelectTabNotifyTopics.split(","); +} +if(this.disabledTabCssClass){ +dojo.lang.forEach(this.children,function(div){ +if(div.disabled){ +this.disableTab(div); +} +}); +} +},selectChild:function(tab,_ebd){ +if(!tab.disabled){ +var _ebe={"cancel":false}; +if(this.beforeSelectTabNotifyTopicsArray){ +var self=this; +dojo.lang.forEach(this.beforeSelectTabNotifyTopicsArray,function(_ec0){ +try{ +dojo.event.topic.publish(_ec0,_ebe,tab,self); +} +catch(ex){ +dojo.debug(ex); +} +}); +} +if(!_ebe.cancel){ +struts.widget.StrutsTabContainer.superclass.selectChild.apply(this,[tab,_ebd]); +if(this.afterSelectTabNotifyTopicsArray){ +var self=this; +dojo.lang.forEach(this.afterSelectTabNotifyTopicsArray,function(_ec1){ +try{ +dojo.event.topic.publish(_ec1,tab,self); +} +catch(ex){ +dojo.debug(ex); +} +}); +} +} +} +},disableTab:function(t){ +var _ec3=this.getTabWidget(t); +_ec3.disabled=true; +dojo.html.addClass(_ec3.controlButton.domNode,this.disabledTabCssClass); +},enableTab:function(t){ +var _ec5=this.getTabWidget(t); +_ec5.disabled=false; +dojo.html.removeClass(_ec5.controlButton.domNode,this.disabledTabCssClass); +},getTabWidget:function(t){ +if(dojo.lang.isNumber(t)){ +return this.children[t]; +}else{ +if(dojo.lang.isString(t)){ +return dojo.widget.byId(t); +}else{ +return t; +} +} +}}); +dojo.provide("dojo.widget.TreeNode"); +dojo.widget.defineWidget("dojo.widget.TreeNode",dojo.widget.HtmlWidget,function(){ +this.actionsDisabled=[]; +},{widgetType:"TreeNode",loadStates:{UNCHECKED:"UNCHECKED",LOADING:"LOADING",LOADED:"LOADED"},actions:{MOVE:"MOVE",REMOVE:"REMOVE",EDIT:"EDIT",ADDCHILD:"ADDCHILD"},isContainer:true,lockLevel:0,templateString:("
    "+" "+"\t\t${this.title} "+" "+"${this.afterLabel} "+"
    "+"
    ").replace(/(>|<)\s+/g,"$1"),childIconSrc:"",childIconFolderSrc:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/closed.gif"),childIconDocumentSrc:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/document.gif"),childIcon:null,isTreeNode:true,objectId:"",afterLabel:"",afterLabelNode:null,expandIcon:null,title:"",object:"",isFolder:false,labelNode:null,titleNode:null,imgs:null,expandLevel:"",tree:null,depth:0,isExpanded:false,state:null,domNodeInitialized:false,isFirstChild:function(){ +return this.getParentIndex()==0?true:false; +},isLastChild:function(){ +return this.getParentIndex()==this.parent.children.length-1?true:false; +},lock:function(){ +return this.tree.lock.apply(this,arguments); +},unlock:function(){ +return this.tree.unlock.apply(this,arguments); +},isLocked:function(){ +return this.tree.isLocked.apply(this,arguments); +},cleanLock:function(){ +return this.tree.cleanLock.apply(this,arguments); +},actionIsDisabled:function(_ec7){ +var _ec8=this; +var _ec9=false; +if(this.tree.strictFolders&&_ec7==this.actions.ADDCHILD&&!this.isFolder){ +_ec9=true; +} +if(dojo.lang.inArray(_ec8.actionsDisabled,_ec7)){ +_ec9=true; +} +if(this.isLocked()){ +_ec9=true; +} +return _ec9; +},getInfo:function(){ +var info={widgetId:this.widgetId,objectId:this.objectId,index:this.getParentIndex(),isFolder:this.isFolder}; +return info; +},initialize:function(args,frag){ +this.state=this.loadStates.UNCHECKED; +for(var i=0;i0){ +for(var i=0;i<_ece;i++){ +var img=this.tree.makeBlankImg(); +this.imgs.unshift(img); +dojo.html.insertBefore(this.imgs[0],this.domNode.firstChild); +} +} +if(_ece<0){ +for(var i=0;i<-_ece;i++){ +this.imgs.shift(); +dojo.html.removeNode(this.domNode.firstChild); +} +} +},markLoading:function(){ +this._markLoadingSavedIcon=this.expandIcon.src; +this.expandIcon.src=this.tree.expandIconSrcLoading; +},unMarkLoading:function(){ +if(!this._markLoadingSavedIcon){ +return; +} +var im=new Image(); +im.src=this.tree.expandIconSrcLoading; +if(this.expandIcon.src==im.src){ +this.expandIcon.src=this._markLoadingSavedIcon; +} +this._markLoadingSavedIcon=null; +},setFolder:function(){ +dojo.event.connect(this.expandIcon,"onclick",this,"onTreeClick"); +this.expandIcon.src=this.isExpanded?this.tree.expandIconSrcMinus:this.tree.expandIconSrcPlus; +this.isFolder=true; +},createDOMNode:function(tree,_ed3){ +this.tree=tree; +this.depth=_ed3; +this.imgs=[]; +for(var i=0;i-1?"&":"?")+"nodeId="+this.widgetId; +var self=this; +this.markLoading(); +dojo.io.bind({url:_ee8,useCache:false,preventCache:true,handler:function(type,data,e){ +if(type=="load"){ +if(data){ +dojo.lang.forEach(data,function(_eed){ +var _eee=dojo.widget.createWidget("struts:StrutsTreeNode",{title:_eed.label,isFolder:_eed.hasChildren,widgetId:_eed.id}); +self.addChild(_eee); +}); +} +} +self.unMarkLoading(); +},mimetype:"text/json"}); +} +}}); +dojo.provide("dojo.json"); +dojo.json={jsonRegistry:new dojo.AdapterRegistry(),register:function(name,_ef0,wrap,_ef2){ +dojo.json.jsonRegistry.register(name,_ef0,wrap,_ef2); +},evalJson:function(json){ +try{ +return eval("("+json+")"); +} +catch(e){ +dojo.debug(e); +return json; +} +},serialize:function(o){ +var _ef5=typeof (o); +if(_ef5=="undefined"){ +return "undefined"; +}else{ +if((_ef5=="number")||(_ef5=="boolean")){ +return o+""; +}else{ +if(o===null){ +return "null"; +} +} +} +if(_ef5=="string"){ +return dojo.string.escapeString(o); +} +var me=arguments.callee; +var _ef7; +if(typeof (o.__json__)=="function"){ +_ef7=o.__json__(); +if(o!==_ef7){ +return me(_ef7); +} +} +if(typeof (o.json)=="function"){ +_ef7=o.json(); +if(o!==_ef7){ +return me(_ef7); +} +} +if(_ef5!="function"&&typeof (o.length)=="number"){ +var res=[]; +for(var i=0;i_f29.getParentIndex()){ +_f2b--; +} +return _f2b; +},onDrop:function(e){ +var _f2d=this.position; +this.onDragOut(e); +var _f2e=e.dragObject.treeNode; +if(!dojo.lang.isObject(_f2e)){ +dojo.raise("TreeNode not found in dragObject"); +} +if(_f2d=="onto"){ +return this.controller.move(_f2e,this.treeNode,0); +}else{ +var _f2f=this.getTargetParentIndex(_f2e,_f2d); +return this.controller.move(_f2e,this.treeNode.parent,_f2f); +} +}}); +dojo.dnd.TreeDNDController=function(_f30){ +this.treeController=_f30; +this.dragSources={}; +this.dropTargets={}; +}; +dojo.lang.extend(dojo.dnd.TreeDNDController,{listenTree:function(tree){ +dojo.event.topic.subscribe(tree.eventNames.createDOMNode,this,"onCreateDOMNode"); +dojo.event.topic.subscribe(tree.eventNames.moveFrom,this,"onMoveFrom"); +dojo.event.topic.subscribe(tree.eventNames.moveTo,this,"onMoveTo"); +dojo.event.topic.subscribe(tree.eventNames.addChild,this,"onAddChild"); +dojo.event.topic.subscribe(tree.eventNames.removeNode,this,"onRemoveNode"); +dojo.event.topic.subscribe(tree.eventNames.treeDestroy,this,"onTreeDestroy"); +},unlistenTree:function(tree){ +dojo.event.topic.unsubscribe(tree.eventNames.createDOMNode,this,"onCreateDOMNode"); +dojo.event.topic.unsubscribe(tree.eventNames.moveFrom,this,"onMoveFrom"); +dojo.event.topic.unsubscribe(tree.eventNames.moveTo,this,"onMoveTo"); +dojo.event.topic.unsubscribe(tree.eventNames.addChild,this,"onAddChild"); +dojo.event.topic.unsubscribe(tree.eventNames.removeNode,this,"onRemoveNode"); +dojo.event.topic.unsubscribe(tree.eventNames.treeDestroy,this,"onTreeDestroy"); +},onTreeDestroy:function(_f33){ +this.unlistenTree(_f33.source); +},onCreateDOMNode:function(_f34){ +this.registerDNDNode(_f34.source); +},onAddChild:function(_f35){ +this.registerDNDNode(_f35.child); +},onMoveFrom:function(_f36){ +var _f37=this; +dojo.lang.forEach(_f36.child.getDescendants(),function(node){ +_f37.unregisterDNDNode(node); +}); +},onMoveTo:function(_f39){ +var _f3a=this; +dojo.lang.forEach(_f39.child.getDescendants(),function(node){ +_f3a.registerDNDNode(node); +}); +},registerDNDNode:function(node){ +if(!node.tree.DNDMode){ +return; +} +var _f3d=null; +var _f3e=null; +if(!node.actionIsDisabled(node.actions.MOVE)){ +var _f3d=new dojo.dnd.TreeDragSource(node.labelNode,this,node.tree.widgetId,node); +this.dragSources[node.widgetId]=_f3d; +} +var _f3e=new dojo.dnd.TreeDropTarget(node.labelNode,this.treeController,node.tree.DNDAcceptTypes,node); +this.dropTargets[node.widgetId]=_f3e; +},unregisterDNDNode:function(node){ +if(this.dragSources[node.widgetId]){ +dojo.dnd.dragManager.unregisterDragSource(this.dragSources[node.widgetId]); +delete this.dragSources[node.widgetId]; +} +if(this.dropTargets[node.widgetId]){ +dojo.dnd.dragManager.unregisterDropTarget(this.dropTargets[node.widgetId]); +delete this.dropTargets[node.widgetId]; +} +}}); +dojo.provide("dojo.widget.TreeBasicController"); +dojo.widget.defineWidget("dojo.widget.TreeBasicController",dojo.widget.HtmlWidget,{widgetType:"TreeBasicController",DNDController:"",dieWithTree:false,initialize:function(args,frag){ +if(this.DNDController=="create"){ +this.DNDController=new dojo.dnd.TreeDNDController(this); +} +},listenTree:function(tree){ +dojo.event.topic.subscribe(tree.eventNames.createDOMNode,this,"onCreateDOMNode"); +dojo.event.topic.subscribe(tree.eventNames.treeClick,this,"onTreeClick"); +dojo.event.topic.subscribe(tree.eventNames.treeCreate,this,"onTreeCreate"); +dojo.event.topic.subscribe(tree.eventNames.treeDestroy,this,"onTreeDestroy"); +if(this.DNDController){ +this.DNDController.listenTree(tree); +} +},unlistenTree:function(tree){ +dojo.event.topic.unsubscribe(tree.eventNames.createDOMNode,this,"onCreateDOMNode"); +dojo.event.topic.unsubscribe(tree.eventNames.treeClick,this,"onTreeClick"); +dojo.event.topic.unsubscribe(tree.eventNames.treeCreate,this,"onTreeCreate"); +dojo.event.topic.unsubscribe(tree.eventNames.treeDestroy,this,"onTreeDestroy"); +},onTreeDestroy:function(_f44){ +var tree=_f44.source; +this.unlistenTree(tree); +if(this.dieWithTree){ +this.destroy(); +} +},onCreateDOMNode:function(_f46){ +var node=_f46.source; +if(node.expandLevel>0){ +this.expandToLevel(node,node.expandLevel); +} +},onTreeCreate:function(_f48){ +var tree=_f48.source; +var _f4a=this; +if(tree.expandLevel){ +dojo.lang.forEach(tree.children,function(_f4b){ +_f4a.expandToLevel(_f4b,tree.expandLevel-1); +}); +} +},expandToLevel:function(node,_f4d){ +if(_f4d==0){ +return; +} +var _f4e=node.children; +var _f4f=this; +var _f50=function(node,_f52){ +this.node=node; +this.expandLevel=_f52; +this.process=function(){ +for(var i=0;i",isExpanded:true,isTree:true,objectId:"",controller:"",selector:"",menu:"",expandLevel:"",blankIconSrc:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_blank.gif"),gridIconSrcT:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_grid_t.gif"),gridIconSrcL:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_grid_l.gif"),gridIconSrcV:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_grid_v.gif"),gridIconSrcP:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_grid_p.gif"),gridIconSrcC:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_grid_c.gif"),gridIconSrcX:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_grid_x.gif"),gridIconSrcY:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_grid_y.gif"),gridIconSrcZ:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_grid_z.gif"),expandIconSrcPlus:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_expand_plus.gif"),expandIconSrcMinus:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_expand_minus.gif"),expandIconSrcLoading:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_loading.gif"),iconWidth:18,iconHeight:18,showGrid:true,showRootGrid:true,actionIsDisabled:function(_f7d){ +var _f7e=this; +return dojo.lang.inArray(_f7e.actionsDisabled,_f7d); +},actions:{ADDCHILD:"ADDCHILD"},getInfo:function(){ +var info={widgetId:this.widgetId,objectId:this.objectId}; +return info; +},initializeController:function(){ +if(this.controller!="off"){ +if(this.controller){ +this.controller=dojo.widget.byId(this.controller); +}else{ +this.controller=dojo.widget.createWidget("TreeBasicController",{DNDController:(this.DNDMode?"create":""),dieWithTree:true}); +} +this.controller.listenTree(this); +}else{ +this.controller=null; +} +},initializeSelector:function(){ +if(this.selector!="off"){ +if(this.selector){ +this.selector=dojo.widget.byId(this.selector); +}else{ +this.selector=dojo.widget.createWidget("TreeSelector",{dieWithTree:true}); +} +this.selector.listenTree(this); +}else{ +this.selector=null; +} +},initialize:function(args,frag){ +var _f82=this; +for(name in this.eventNamesDefault){ +if(dojo.lang.isUndefined(this.eventNames[name])){ +this.eventNames[name]=this.widgetId+"/"+this.eventNamesDefault[name]; +} +} +for(var i=0;i0){ +_fa1[_fa2-1].updateExpandGridColumn(); +} +if(_fa0 instanceof dojo.widget.Tree&&_fa2==0&&_fa1.length>0){ +_fa1[0].updateExpandGrid(); +} +_f9f.parent=_f9f.tree=null; +return _f9f; +},markLoading:function(){ +},unMarkLoading:function(){ +},lock:function(){ +!this.lockLevel&&this.markLoading(); +this.lockLevel++; +},unlock:function(){ +if(!this.lockLevel){ +dojo.raise("unlock: not locked"); +} +this.lockLevel--; +!this.lockLevel&&this.unMarkLoading(); +},isLocked:function(){ +var node=this; +while(true){ +if(node.lockLevel){ +return true; +} +if(node instanceof dojo.widget.Tree){ +break; +} +node=node.parent; +} +return false; +},flushLock:function(){ +this.lockLevel=0; +this.unMarkLoading(); +}}); +dojo.provide("struts.widget.StrutsTree"); +dojo.widget.defineWidget("struts.widget.StrutsTree",dojo.widget.Tree,{widgetType:"StrutsTree",href:"",errorNotifyTopics:"",errorNotifyTopicsArray:null,postCreate:function(){ +struts.widget.StrutsTree.superclass.postCreate.apply(this); +if(!dojo.string.isBlank(this.errorNotifyTopics)){ +this.errorNotifyTopicsArray=this.errorNotifyTopics.split(","); +} +var self=this; +if(!dojo.string.isBlank(this.href)){ +dojo.io.bind({url:this.href,useCache:false,preventCache:true,handler:function(type,data,e){ +if(type=="load"){ +if(data){ +dojo.lang.forEach(data,function(_fa8){ +var _fa9=dojo.widget.createWidget("struts:StrutsTreeNode",{title:_fa8.label,isFolder:_fa8.hasChildren,widgetId:_fa8.id}); +self.addChild(_fa9); +}); +} +}else{ +if(self.errorNotifyTopicsArray){ +dojo.lang.forEach(self.errorNotifyTopicsArray,function(_faa){ +try{ +dojo.event.topic.publish(_faa,data,e,self); +} +catch(ex){ +dojo.debug(ex); +} +}); +} +} +},mimetype:"text/json"}); +} +}}); +dojo.kwCompoundRequire({common:["struts.widget.Bind","struts.widget.BindDiv","struts.widget.BindAnchor","struts.widget.ComboBox","struts.widget.StrutsTimePicker","struts.widget.StrutsDatePicker","struts.widget.BindEvent","struts.widget.StrutsTreeSelector","struts.widget.StrutsTabContainer","struts.widget.StrutsTreeNode","struts.widget.StrutsTree"]}); +dojo.provide("struts.widget.*"); + diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js.uncompressed.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js.uncompressed.js index 0f2b46048..2db22a495 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js.uncompressed.js +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js.uncompressed.js @@ -1,31330 +1,31330 @@ -if(typeof dojo == "undefined"){ - -// TODOC: HOW TO DOC THE BELOW? -// @global: djConfig -// summary: -// Application code can set the global 'djConfig' prior to loading -// the library to override certain global settings for how dojo works. -// description: The variables that can be set are as follows: -// - isDebug: false -// - allowQueryConfig: false -// - baseScriptUri: "" -// - baseRelativePath: "" -// - libraryScriptUri: "" -// - iePreventClobber: false -// - ieClobberMinimal: true -// - locale: undefined -// - extraLocale: undefined -// - preventBackButtonFix: true -// - searchIds: [] -// - parseWidgets: true -// TODOC: HOW TO DOC THESE VARIABLES? -// TODOC: IS THIS A COMPLETE LIST? -// note: -// 'djConfig' does not exist under 'dojo.*' so that it can be set before the -// 'dojo' variable exists. -// note: -// Setting any of these variables *after* the library has loaded does nothing at all. -// TODOC: is this still true? Release notes for 0.3 indicated they could be set after load. -// - - -//TODOC: HOW TO DOC THIS? -// @global: dj_global -// summary: -// an alias for the top-level global object in the host environment -// (e.g., the window object in a browser). -// description: -// Refer to 'dj_global' rather than referring to window to ensure your -// code runs correctly in contexts other than web browsers (eg: Rhino on a server). -var dj_global = this; - -//TODOC: HOW TO DOC THIS? -// @global: dj_currentContext -// summary: -// Private global context object. Where 'dj_global' always refers to the boot-time -// global context, 'dj_currentContext' can be modified for temporary context shifting. -// dojo.global() returns dj_currentContext. -// description: -// Refer to dojo.global() rather than referring to dj_global to ensure your -// code runs correctly in managed contexts. -var dj_currentContext = this; - - -// **************************************************************** -// global public utils -// TODOC: DO WE WANT TO NOTE THAT THESE ARE GLOBAL PUBLIC UTILS? -// **************************************************************** - -function dj_undef(/*String*/ name, /*Object?*/ object){ - //summary: Returns true if 'name' is defined on 'object' (or globally if 'object' is null). - //description: Note that 'defined' and 'exists' are not the same concept. - return (typeof (object || dj_currentContext)[name] == "undefined"); // Boolean -} - -// make sure djConfig is defined -if(dj_undef("djConfig", this)){ - var djConfig = {}; -} - -//TODOC: HOW TO DOC THIS? -// dojo is the root variable of (almost all) our public symbols -- make sure it is defined. -if(dj_undef("dojo", this)){ - var dojo = {}; -} - -dojo.global = function(){ - // summary: - // return the current global context object - // (e.g., the window object in a browser). - // description: - // Refer to 'dojo.global()' rather than referring to window to ensure your - // code runs correctly in contexts other than web browsers (eg: Rhino on a server). - return dj_currentContext; -} - -// Override locale setting, if specified -dojo.locale = djConfig.locale; - -//TODOC: HOW TO DOC THIS? -dojo.version = { - // summary: version number of this instance of dojo. - major: 0, minor: 4, patch: 3, flag: "", - revision: Number("$Rev: 8617 $".match(/[0-9]+/)[0]), - toString: function(){ - with(dojo.version){ - return major + "." + minor + "." + patch + flag + " (" + revision + ")"; // String - } - } -} - -dojo.evalProp = function(/*String*/ name, /*Object*/ object, /*Boolean?*/ create){ - // summary: Returns 'object[name]'. If not defined and 'create' is true, will return a new Object. - // description: - // Returns null if 'object[name]' is not defined and 'create' is not true. - // Note: 'defined' and 'exists' are not the same concept. - if((!object)||(!name)) return undefined; // undefined - if(!dj_undef(name, object)) return object[name]; // mixed - return (create ? (object[name]={}) : undefined); // mixed -} - -dojo.parseObjPath = function(/*String*/ path, /*Object?*/ context, /*Boolean?*/ create){ - // summary: Parse string path to an object, and return corresponding object reference and property name. - // description: - // Returns an object with two properties, 'obj' and 'prop'. - // 'obj[prop]' is the reference indicated by 'path'. - // path: Path to an object, in the form "A.B.C". - // context: Object to use as root of path. Defaults to 'dojo.global()'. - // create: If true, Objects will be created at any point along the 'path' that is undefined. - var object = (context || dojo.global()); - var names = path.split('.'); - var prop = names.pop(); - for (var i=0,l=names.length;i 1) { - dh.modulesLoadedListeners.push(function() { - obj[functionName](); - }); - } - - //Added for xdomain loading. dojo.addOnLoad is used to - //indicate callbacks after doing some dojo.require() statements. - //In the xdomain case, if all the requires are loaded (after initial - //page load), then immediately call any listeners. - if(dh.post_load_ && dh.inFlightCount == 0 && !dh.loadNotifying){ - dh.callLoaded(); - } -} - -dojo.addOnUnload = function(/*Object?*/obj, /*String|Function?*/functionName){ -// summary: registers a function to be triggered when the page unloads -// -// usage: -// dojo.addOnLoad(functionPointer) -// dojo.addOnLoad(object, "functionName") - var dh = dojo.hostenv; - if(arguments.length == 1){ - dh.unloadListeners.push(obj); - } else if(arguments.length > 1) { - dh.unloadListeners.push(function() { - obj[functionName](); - }); - } -} - -dojo.hostenv.modulesLoaded = function(){ - if(this.post_load_){ return; } - if(this.loadUriStack.length==0 && this.getTextStack.length==0){ - if(this.inFlightCount > 0){ - dojo.debug("files still in flight!"); - return; - } - dojo.hostenv.callLoaded(); - } -} - -dojo.hostenv.callLoaded = function(){ - //The "object" check is for IE, and the other opera check fixes an issue - //in Opera where it could not find the body element in some widget test cases. - //For 0.9, maybe route all browsers through the setTimeout (need protection - //still for non-browser environments though). This might also help the issue with - //FF 2.0 and freezing issues where we try to do sync xhr while background css images - //are being loaded (trac #2572)? Consider for 0.9. - if(typeof setTimeout == "object" || (djConfig["useXDomain"] && dojo.render.html.opera)){ - setTimeout("dojo.hostenv.loaded();", 0); - }else{ - dojo.hostenv.loaded(); - } -} - -dojo.hostenv.getModuleSymbols = function(/*String*/modulename){ -// summary: -// Converts a module name in dotted JS notation to an array representing the path in the source tree - var syms = modulename.split("."); - for(var i = syms.length; i>0; i--){ - var parentModule = syms.slice(0, i).join("."); - if((i==1) && !this.moduleHasPrefix(parentModule)){ - // Support default module directory (sibling of dojo) for top-level modules - syms[0] = "../" + syms[0]; - }else{ - var parentModulePath = this.getModulePrefix(parentModule); - if(parentModulePath != parentModule){ - syms.splice(0, i, parentModulePath); - break; - } - } - } - return syms; // Array -} - -dojo.hostenv._global_omit_module_check = false; -dojo.hostenv.loadModule = function(/*String*/moduleName, /*Boolean?*/exactOnly, /*Boolean?*/omitModuleCheck){ -// summary: -// loads a Javascript module from the appropriate URI -// -// description: -// loadModule("A.B") first checks to see if symbol A.B is defined. -// If it is, it is simply returned (nothing to do). -// -// If it is not defined, it will look for "A/B.js" in the script root directory, -// followed by "A.js". -// -// It throws if it cannot find a file to load, or if the symbol A.B is not -// defined after loading. -// -// It returns the object A.B. -// -// This does nothing about importing symbols into the current package. -// It is presumed that the caller will take care of that. For example, to import -// all symbols: -// -// with (dojo.hostenv.loadModule("A.B")) { -// ... -// } -// -// And to import just the leaf symbol: -// -// var B = dojo.hostenv.loadModule("A.B"); -// ... -// -// dj_load is an alias for dojo.hostenv.loadModule - - if(!moduleName){ return; } - omitModuleCheck = this._global_omit_module_check || omitModuleCheck; - var module = this.findModule(moduleName, false); - if(module){ - return module; - } - - // protect against infinite recursion from mutual dependencies - if(dj_undef(moduleName, this.loading_modules_)){ - this.addedToLoadingCount.push(moduleName); - } - this.loading_modules_[moduleName] = 1; - - // convert periods to slashes - var relpath = moduleName.replace(/\./g, '/') + '.js'; - - var nsyms = moduleName.split("."); - - // this line allowed loading of a module manifest as if it were a namespace - // it's an interesting idea, but shouldn't be combined with 'namespaces' proper - // and leads to unwanted dependencies - // the effect can be achieved in other (albeit less-flexible) ways now, so I am - // removing this pending further design work - // perhaps we can explicitly define this idea of a 'module manifest', and subclass - // 'namespace manifest' from that - //dojo.getNamespace(nsyms[0]); - - var syms = this.getModuleSymbols(moduleName); - var startedRelative = ((syms[0].charAt(0) != '/') && !syms[0].match(/^\w+:/)); - var last = syms[syms.length - 1]; - var ok; - // figure out if we're looking for a full package, if so, we want to do - // things slightly diffrently - if(last=="*"){ - moduleName = nsyms.slice(0, -1).join('.'); - while(syms.length){ - syms.pop(); - syms.push(this.pkgFileName); - relpath = syms.join("/") + '.js'; - if(startedRelative && relpath.charAt(0)=="/"){ - relpath = relpath.slice(1); - } - ok = this.loadPath(relpath, !omitModuleCheck ? moduleName : null); - if(ok){ break; } - syms.pop(); - } - }else{ - relpath = syms.join("/") + '.js'; - moduleName = nsyms.join('.'); - var modArg = !omitModuleCheck ? moduleName : null; - ok = this.loadPath(relpath, modArg); - if(!ok && !exactOnly){ - syms.pop(); - while(syms.length){ - relpath = syms.join('/') + '.js'; - ok = this.loadPath(relpath, modArg); - if(ok){ break; } - syms.pop(); - relpath = syms.join('/') + '/'+this.pkgFileName+'.js'; - if(startedRelative && relpath.charAt(0)=="/"){ - relpath = relpath.slice(1); - } - ok = this.loadPath(relpath, modArg); - if(ok){ break; } - } - } - - if(!ok && !omitModuleCheck){ - dojo.raise("Could not load '" + moduleName + "'; last tried '" + relpath + "'"); - } - } - - // check that the symbol was defined - //Don't bother if we're doing xdomain (asynchronous) loading. - if(!omitModuleCheck && !this["isXDomain"]){ - // pass in false so we can give better error - module = this.findModule(moduleName, false); - if(!module){ - dojo.raise("symbol '" + moduleName + "' is not defined after loading '" + relpath + "'"); - } - } - - return module; -} - -dojo.hostenv.startPackage = function(/*String*/packageName){ -// summary: -// Creates a JavaScript package -// -// description: -// startPackage("A.B") follows the path, and at each level creates a new empty -// object or uses what already exists. It returns the result. -// -// packageName: the package to be created as a String in dot notation - - //Make sure we have a string. - var fullPkgName = String(packageName); - var strippedPkgName = fullPkgName; - - var syms = packageName.split(/\./); - if(syms[syms.length-1]=="*"){ - syms.pop(); - strippedPkgName = syms.join("."); - } - var evaledPkg = dojo.evalObjPath(strippedPkgName, true); - this.loaded_modules_[fullPkgName] = evaledPkg; - this.loaded_modules_[strippedPkgName] = evaledPkg; - - return evaledPkg; // Object -} - -dojo.hostenv.findModule = function(/*String*/moduleName, /*Boolean?*/mustExist){ -// summary: -// Returns the Object representing the module, if it exists, otherwise null. -// -// moduleName A fully qualified module including package name, like 'A.B'. -// mustExist Optional, default false. throw instead of returning null -// if the module does not currently exist. - - var lmn = String(moduleName); - - if(this.loaded_modules_[lmn]){ - return this.loaded_modules_[lmn]; // Object - } - - if(mustExist){ - dojo.raise("no loaded module named '" + moduleName + "'"); - } - return null; // null -} - -//Start of old bootstrap2: - -dojo.kwCompoundRequire = function(/*Object containing Arrays*/modMap){ -// description: -// This method taks a "map" of arrays which one can use to optionally load dojo -// modules. The map is indexed by the possible dojo.hostenv.name_ values, with -// two additional values: "default" and "common". The items in the "default" -// array will be loaded if none of the other items have been choosen based on -// the hostenv.name_ item. The items in the "common" array will _always_ be -// loaded, regardless of which list is chosen. Here's how it's normally -// called: -// -// dojo.kwCompoundRequire({ -// browser: [ -// ["foo.bar.baz", true, true], // an example that passes multiple args to loadModule() -// "foo.sample.*", -// "foo.test, -// ], -// default: [ "foo.sample.*" ], -// common: [ "really.important.module.*" ] -// }); - - var common = modMap["common"]||[]; - var result = modMap[dojo.hostenv.name_] ? common.concat(modMap[dojo.hostenv.name_]||[]) : common.concat(modMap["default"]||[]); - - for(var x=0; x, - // relative to Dojo root. For example, module acme is mapped to ../acme. - // If you want to use a different module name, use dojo.registerModulePath. - return dojo.hostenv.setModulePrefix(module, prefix); -} - -if(djConfig["modulePaths"]){ - for(var param in djConfig["modulePaths"]){ - dojo.registerModulePath(param, djConfig["modulePaths"][param]); - } -} - -dojo.setModulePrefix = function(/*String*/module, /*String*/prefix){ - // summary: maps a module name to a path - dojo.deprecated('dojo.setModulePrefix("' + module + '", "' + prefix + '")', "replaced by dojo.registerModulePath", "0.5"); - return dojo.registerModulePath(module, prefix); -} - -dojo.exists = function(/*Object*/obj, /*String*/name){ - // summary: determine if an object supports a given method - // description: useful for longer api chains where you have to test each object in the chain - var p = name.split("."); - for(var i = 0; i < p.length; i++){ - if(!obj[p[i]]){ return false; } // Boolean - obj = obj[p[i]]; - } - return true; // Boolean -} - -// Localization routines - -dojo.hostenv.normalizeLocale = function(/*String?*/locale){ -// summary: -// Returns canonical form of locale, as used by Dojo. All variants are case-insensitive and are separated by '-' -// as specified in RFC 3066. If no locale is specified, the user agent's default is returned. - - var result = locale ? locale.toLowerCase() : dojo.locale; - if(result == "root"){ - result = "ROOT"; - } - return result;// String -}; - -dojo.hostenv.searchLocalePath = function(/*String*/locale, /*Boolean*/down, /*Function*/searchFunc){ -// summary: -// A helper method to assist in searching for locale-based resources. Will iterate through -// the variants of a particular locale, either up or down, executing a callback function. -// For example, "en-us" and true will try "en-us" followed by "en" and finally "ROOT". - - locale = dojo.hostenv.normalizeLocale(locale); - - var elements = locale.split('-'); - var searchlist = []; - for(var i = elements.length; i > 0; i--){ - searchlist.push(elements.slice(0, i).join('-')); - } - searchlist.push(false); - if(down){searchlist.reverse();} - - for(var j = searchlist.length - 1; j >= 0; j--){ - var loc = searchlist[j] || "ROOT"; - var stop = searchFunc(loc); - if(stop){ break; } - } -} - -//These two functions are placed outside of preloadLocalizations -//So that the xd loading can use/override them. -dojo.hostenv.localesGenerated =["ROOT","es-es","es","it-it","pt-br","de","fr-fr","zh-cn","pt","en-us","zh","fr","zh-tw","it","en-gb","xx","de-de","ko-kr","ja-jp","ko","en","ja"]; // value will be inserted here at build time, if necessary - -dojo.hostenv.registerNlsPrefix = function(){ -// summary: -// Register module "nls" to point where Dojo can find pre-built localization files - dojo.registerModulePath("nls","nls"); -} - -dojo.hostenv.preloadLocalizations = function(){ -// summary: -// Load built, flattened resource bundles, if available for all locales used in the page. -// Execute only once. Note that this is a no-op unless there is a build. - - if(dojo.hostenv.localesGenerated){ - dojo.hostenv.registerNlsPrefix(); - - function preload(locale){ - locale = dojo.hostenv.normalizeLocale(locale); - dojo.hostenv.searchLocalePath(locale, true, function(loc){ - for(var i=0; i bestLocale.length){ - bestLocale = flatLocales[i]; - } - } - } - if(!bestLocale){ - bestLocale = "ROOT"; - } - } - - //See if the desired locale is already loaded. - var tempLocale = availableFlatLocales ? bestLocale : targetLocale; - var bundle = dojo.hostenv.findModule(bundlePackage); - var localizedBundle = null; - if(bundle){ - if(djConfig.localizationComplete && bundle._built){return;} - var jsLoc = tempLocale.replace('-', '_'); - var translationPackage = bundlePackage+"."+jsLoc; - localizedBundle = dojo.hostenv.findModule(translationPackage); - } - - if(!localizedBundle){ - bundle = dojo.hostenv.startPackage(bundlePackage); - var syms = dojo.hostenv.getModuleSymbols(moduleName); - var modpath = syms.concat("nls").join("/"); - var parent; - - dojo.hostenv.searchLocalePath(tempLocale, availableFlatLocales, function(loc){ - var jsLoc = loc.replace('-', '_'); - var translationPackage = bundlePackage + "." + jsLoc; - var loaded = false; - if(!dojo.hostenv.findModule(translationPackage)){ - // Mark loaded whether it's found or not, so that further load attempts will not be made - dojo.hostenv.startPackage(translationPackage); - var module = [modpath]; - if(loc != "ROOT"){module.push(loc);} - module.push(bundleName); - var filespec = module.join("/") + '.js'; - loaded = dojo.hostenv.loadPath(filespec, null, function(hash){ - // Use singleton with prototype to point to parent bundle, then mix-in result from loadPath - var clazz = function(){}; - clazz.prototype = parent; - bundle[jsLoc] = new clazz(); - for(var j in hash){ bundle[jsLoc][j] = hash[j]; } - }); - }else{ - loaded = true; - } - if(loaded && bundle[jsLoc]){ - parent = bundle[jsLoc]; - }else{ - bundle[jsLoc] = parent; - } - - if(availableFlatLocales){ - //Stop the locale path searching if we know the availableFlatLocales, since - //the first call to this function will load the only bundle that is needed. - return true; - } - }); - } - - //Save the best locale bundle as the target locale bundle when we know the - //the available bundles. - if(availableFlatLocales && targetLocale != bestLocale){ - bundle[targetLocale.replace('-', '_')] = bundle[bestLocale.replace('-', '_')]; - } -}; - -(function(){ - // If other locales are used, dojo.requireLocalization should load them as well, by default. - // Override dojo.requireLocalization to do load the default bundle, then iterate through the - // extraLocale list and load those translations as well, unless a particular locale was requested. - - var extra = djConfig.extraLocale; - if(extra){ - if(!extra instanceof Array){ - extra = [extra]; - } - - var req = dojo.requireLocalization; - dojo.requireLocalization = function(m, b, locale, availableFlatLocales){ - req(m,b,locale, availableFlatLocales); - if(locale){return;} - for(var i=0; i 1){ - var paramStr = params[1]; - var pairs = paramStr.split("&"); - for(var x in pairs){ - var sp = pairs[x].split("="); - // FIXME: is this eval dangerous? - if((sp[0].length > 9)&&(sp[0].substr(0, 9) == "djConfig.")){ - var opt = sp[0].substr(9); - try{ - djConfig[opt]=eval(sp[1]); - }catch(e){ - djConfig[opt]=sp[1]; - } - } - } - } - } - - if( - ((djConfig["baseScriptUri"] == "")||(djConfig["baseRelativePath"] == "")) && - (document && document.getElementsByTagName) - ){ - var scripts = document.getElementsByTagName("script"); - var rePkg = /(__package__|dojo|bootstrap1)\.js([\?\.]|$)/i; - for(var i = 0; i < scripts.length; i++) { - var src = scripts[i].getAttribute("src"); - if(!src) { continue; } - var m = src.match(rePkg); - if(m) { - var root = src.substring(0, m.index); - if(src.indexOf("bootstrap1") > -1) { root += "../"; } - if(!this["djConfig"]) { djConfig = {}; } - if(djConfig["baseScriptUri"] == "") { djConfig["baseScriptUri"] = root; } - if(djConfig["baseRelativePath"] == "") { djConfig["baseRelativePath"] = root; } - break; - } - } - } - - // fill in the rendering support information in dojo.render.* - var dr = dojo.render; - var drh = dojo.render.html; - var drs = dojo.render.svg; - var dua = (drh.UA = navigator.userAgent); - var dav = (drh.AV = navigator.appVersion); - var t = true; - var f = false; - drh.capable = t; - drh.support.builtin = t; - - dr.ver = parseFloat(drh.AV); - dr.os.mac = dav.indexOf("Macintosh") >= 0; - dr.os.win = dav.indexOf("Windows") >= 0; - // could also be Solaris or something, but it's the same browser - dr.os.linux = dav.indexOf("X11") >= 0; - - drh.opera = dua.indexOf("Opera") >= 0; - drh.khtml = (dav.indexOf("Konqueror") >= 0)||(dav.indexOf("Safari") >= 0); - drh.safari = dav.indexOf("Safari") >= 0; - var geckoPos = dua.indexOf("Gecko"); - drh.mozilla = drh.moz = (geckoPos >= 0)&&(!drh.khtml); - if (drh.mozilla) { - // gecko version is YYYYMMDD - drh.geckoVersion = dua.substring(geckoPos + 6, geckoPos + 14); - } - drh.ie = (document.all)&&(!drh.opera); - drh.ie50 = drh.ie && dav.indexOf("MSIE 5.0")>=0; - drh.ie55 = drh.ie && dav.indexOf("MSIE 5.5")>=0; - drh.ie60 = drh.ie && dav.indexOf("MSIE 6.0")>=0; - drh.ie70 = drh.ie && dav.indexOf("MSIE 7.0")>=0; - - var cm = document["compatMode"]; - drh.quirks = (cm == "BackCompat")||(cm == "QuirksMode")||drh.ie55||drh.ie50; - - // TODO: is the HTML LANG attribute relevant? - dojo.locale = dojo.locale || (drh.ie ? navigator.userLanguage : navigator.language).toLowerCase(); - - dr.vml.capable=drh.ie; - drs.capable = f; - drs.support.plugin = f; - drs.support.builtin = f; - var tdoc = window["document"]; - var tdi = tdoc["implementation"]; - - if((tdi)&&(tdi["hasFeature"])&&(tdi.hasFeature("org.w3c.dom.svg", "1.0"))){ - drs.capable = t; - drs.support.builtin = t; - drs.support.plugin = f; - } - // webkits after 420 support SVG natively. The test string is "AppleWebKit/420+" - if(drh.safari){ - var tmp = dua.split("AppleWebKit/")[1]; - var ver = parseFloat(tmp.split(" ")[0]); - if(ver >= 420){ - drs.capable = t; - drs.support.builtin = t; - drs.support.plugin = f; - } - }else{ - } - })(); - - dojo.hostenv.startPackage("dojo.hostenv"); - - dojo.render.name = dojo.hostenv.name_ = 'browser'; - dojo.hostenv.searchIds = []; - - // These are in order of decreasing likelihood; this will change in time. - dojo.hostenv._XMLHTTP_PROGIDS = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0']; - - dojo.hostenv.getXmlhttpObject = function(){ - // summary: does the work of portably generating a new XMLHTTPRequest object. - var http = null; - var last_e = null; - try{ http = new XMLHttpRequest(); }catch(e){} - if(!http){ - for(var i=0; i<3; ++i){ - var progid = dojo.hostenv._XMLHTTP_PROGIDS[i]; - try{ - http = new ActiveXObject(progid); - }catch(e){ - last_e = e; - } - - if(http){ - dojo.hostenv._XMLHTTP_PROGIDS = [progid]; // so faster next time - break; - } - } - - /*if(http && !http.toString) { - http.toString = function() { "[object XMLHttpRequest]"; } - }*/ - } - - if(!http){ - return dojo.raise("XMLHTTP not available", last_e); - } - - return http; // XMLHTTPRequest instance - } - - dojo.hostenv._blockAsync = false; - dojo.hostenv.getText = function(uri, async_cb, fail_ok){ - // summary: Read the contents of the specified uri and return those contents. - // uri: - // A relative or absolute uri. If absolute, it still must be in - // the same "domain" as we are. - // async_cb: - // If not specified, load synchronously. If specified, load - // asynchronously, and use async_cb as the progress handler which - // takes the xmlhttp object as its argument. If async_cb, this - // function returns null. - // fail_ok: - // Default false. If fail_ok and !async_cb and loading fails, - // return null instead of throwing. - - // need to block async callbacks from snatching this thread as the result - // of an async callback might call another sync XHR, this hangs khtml forever - // hostenv._blockAsync must also be checked in BrowserIO's watchInFlight() - // NOTE: must be declared before scope switches ie. this.getXmlhttpObject() - if(!async_cb){ this._blockAsync = true; } - - var http = this.getXmlhttpObject(); - - function isDocumentOk(http){ - var stat = http["status"]; - // allow a 304 use cache, needed in konq (is this compliant with the http spec?) - return Boolean((!stat)||((200 <= stat)&&(300 > stat))||(stat==304)); - } - - if(async_cb){ - var _this = this, timer = null, gbl = dojo.global(); - var xhr = dojo.evalObjPath("dojo.io.XMLHTTPTransport"); - http.onreadystatechange = function(){ - if(timer){ gbl.clearTimeout(timer); timer = null; } - if(_this._blockAsync || (xhr && xhr._blockAsync)){ - timer = gbl.setTimeout(function () { http.onreadystatechange.apply(this); }, 10); - }else{ - if(4==http.readyState){ - if(isDocumentOk(http)){ - // dojo.debug("LOADED URI: "+uri); - async_cb(http.responseText); - } - } - } - } - } - - http.open('GET', uri, async_cb ? true : false); - try{ - http.send(null); - if(async_cb){ - return null; - } - if(!isDocumentOk(http)){ - var err = Error("Unable to load "+uri+" status:"+ http.status); - err.status = http.status; - err.responseText = http.responseText; - throw err; - } - }catch(e){ - this._blockAsync = false; - if((fail_ok)&&(!async_cb)){ - return null; - }else{ - throw e; - } - } - - this._blockAsync = false; - return http.responseText; // String - } - - dojo.hostenv.defaultDebugContainerId = 'dojoDebug'; - dojo.hostenv._println_buffer = []; - dojo.hostenv._println_safe = false; - dojo.hostenv.println = function(/*String*/line){ - // summary: - // prints the provided line to whatever logging container is - // available. If the page isn't loaded yet, the line may be added - // to a buffer for printing later. - if(!dojo.hostenv._println_safe){ - dojo.hostenv._println_buffer.push(line); - }else{ - try { - var console = document.getElementById(djConfig.debugContainerId ? - djConfig.debugContainerId : dojo.hostenv.defaultDebugContainerId); - if(!console) { console = dojo.body(); } - - var div = document.createElement("div"); - div.appendChild(document.createTextNode(line)); - console.appendChild(div); - } catch (e) { - try{ - // safari needs the output wrapped in an element for some reason - document.write("
    " + line + "
    "); - }catch(e2){ - window.status = line; - } - } - } - } - - dojo.addOnLoad(function(){ - dojo.hostenv._println_safe = true; - while(dojo.hostenv._println_buffer.length > 0){ - dojo.hostenv.println(dojo.hostenv._println_buffer.shift()); - } - }); - - function dj_addNodeEvtHdlr(/*DomNode*/node, /*String*/evtName, /*Function*/fp){ - // summary: - // non-destructively adds the specified function to the node's - // evtName handler. - // node: the DomNode to add the handler to - // evtName: should be in the form "click" for "onclick" handlers - var oldHandler = node["on"+evtName] || function(){}; - node["on"+evtName] = function(){ - fp.apply(node, arguments); - oldHandler.apply(node, arguments); - } - return true; - } - - dojo.hostenv._djInitFired = false; - // BEGIN DOMContentLoaded, from Dean Edwards (http://dean.edwards.name/weblog/2006/06/again/) - function dj_load_init(e){ - dojo.hostenv._djInitFired = true; - // allow multiple calls, only first one will take effect - // A bug in khtml calls events callbacks for document for event which isnt supported - // for example a created contextmenu event calls DOMContentLoaded, workaround - var type = (e && e.type) ? e.type.toLowerCase() : "load"; - if(arguments.callee.initialized || (type!="domcontentloaded" && type!="load")){ return; } - arguments.callee.initialized = true; - if(typeof(_timer) != 'undefined'){ - clearInterval(_timer); - delete _timer; - } - - var initFunc = function(){ - //perform initialization - if(dojo.render.html.ie){ - dojo.hostenv.makeWidgets(); - } - }; - - if(dojo.hostenv.inFlightCount == 0){ - initFunc(); - dojo.hostenv.modulesLoaded(); - }else{ - //This else case should be xdomain loading. - //Make sure this is the first thing in the load listener array. - //Part of the dojo.addOnLoad guarantee is that when the listeners are notified, - //It means the DOM (or page) has loaded and that widgets have been parsed. - dojo.hostenv.modulesLoadedListeners.unshift(initFunc); - } - } - - // START DOMContentLoaded - // Mozilla and Opera 9 expose the event we could use - if(document.addEventListener){ - // NOTE: - // due to a threading issue in Firefox 2.0, we can't enable - // DOMContentLoaded on that platform. For more information, see: - // http://trac.dojotoolkit.org/ticket/1704 - if(dojo.render.html.opera || (dojo.render.html.moz && (djConfig["enableMozDomContentLoaded"] === true))){ - document.addEventListener("DOMContentLoaded", dj_load_init, null); - } - - // mainly for Opera 8.5, won't be fired if DOMContentLoaded fired already. - // also used for Mozilla because of trac #1640 - window.addEventListener("load", dj_load_init, null); - } - - // for Internet Explorer. readyState will not be achieved on init call, but dojo doesn't need it - // however, we'll include it because we don't know if there are other functions added that might. - // Note that this has changed because the build process strips all comments--including conditional - // ones. - if(dojo.render.html.ie && dojo.render.os.win){ - document.attachEvent("onreadystatechange", function(e){ - if(document.readyState == "complete"){ - dj_load_init(); - } - }); - } - - if (/(WebKit|khtml)/i.test(navigator.userAgent)) { // sniff - var _timer = setInterval(function() { - if (/loaded|complete/.test(document.readyState)) { - dj_load_init(); // call the onload handler - } - }, 10); - } - // END DOMContentLoaded - - // IE WebControl hosted in an application can fire "beforeunload" and "unload" - // events when control visibility changes, causing Dojo to unload too soon. The - // following code fixes the problem - // Reference: http://support.microsoft.com/default.aspx?scid=kb;en-us;199155 - if(dojo.render.html.ie){ - dj_addNodeEvtHdlr(window, "beforeunload", function(){ - dojo.hostenv._unloading = true; - window.setTimeout(function() { - dojo.hostenv._unloading = false; - }, 0); - }); - } - - dj_addNodeEvtHdlr(window, "unload", function(){ - dojo.hostenv.unloaded(); - if((!dojo.render.html.ie)||(dojo.render.html.ie && dojo.hostenv._unloading)){ - dojo.hostenv.unloaded(); - } - }); - - dojo.hostenv.makeWidgets = function(){ - // you can put searchIds in djConfig and dojo.hostenv at the moment - // we should probably eventually move to one or the other - var sids = []; - if(djConfig.searchIds && djConfig.searchIds.length > 0) { - sids = sids.concat(djConfig.searchIds); - } - if(dojo.hostenv.searchIds && dojo.hostenv.searchIds.length > 0) { - sids = sids.concat(dojo.hostenv.searchIds); - } - - if((djConfig.parseWidgets)||(sids.length > 0)){ - if(dojo.evalObjPath("dojo.widget.Parse")){ - // we must do this on a delay to avoid: - // http://www.shaftek.org/blog/archives/000212.html - // (IE bug) - var parser = new dojo.xml.Parse(); - if(sids.length > 0){ - for(var x=0; x 0, trim from start, if wh < 0, trim from end, else both - if(!str.replace){ return str; } - if(!str.length){ return str; } - var re = (wh > 0) ? (/^\s+/) : (wh < 0) ? (/\s+$/) : (/^\s+|\s+$/g); - return str.replace(re, ""); // string -} - -dojo.string.trimStart = function(/* string */str) { - // summary - // Trim whitespace at the beginning of 'str' - return dojo.string.trim(str, 1); // string -} - -dojo.string.trimEnd = function(/* string */str) { - // summary - // Trim whitespace at the end of 'str' - return dojo.string.trim(str, -1); -} - -dojo.string.repeat = function(/* string */str, /* integer */count, /* string? */separator) { - // summary - // Return 'str' repeated 'count' times, optionally placing 'separator' between each rep - var out = ""; - for(var i = 0; i < count; i++) { - out += str; - if(separator && i < count - 1) { - out += separator; - } - } - return out; // string -} - -dojo.string.pad = function(/* string */str, /* integer */len/*=2*/, /* string */ c/*='0'*/, /* integer */dir/*=1*/) { - // summary - // Pad 'str' to guarantee that it is at least 'len' length with the character 'c' at either the - // start (dir=1) or end (dir=-1) of the string - var out = String(str); - if(!c) { - c = '0'; - } - if(!dir) { - dir = 1; - } - while(out.length < len) { - if(dir > 0) { - out = c + out; - } else { - out += c; - } - } - return out; // string -} - -dojo.string.padLeft = function(/* string */str, /* integer */len, /* string */c) { - // summary - // same as dojo.string.pad(str, len, c, 1) - return dojo.string.pad(str, len, c, 1); // string -} - -dojo.string.padRight = function(/* string */str, /* integer */len, /* string */c) { - // summary - // same as dojo.string.pad(str, len, c, -1) - return dojo.string.pad(str, len, c, -1); // string -} - -dojo.provide("dojo.string"); - - -dojo.provide("dojo.lang.common"); - -dojo.lang.inherits = function(/*Function*/subclass, /*Function*/superclass){ - // summary: Set up inheritance between two classes. - if(!dojo.lang.isFunction(superclass)){ - dojo.raise("dojo.inherits: superclass argument ["+superclass+"] must be a function (subclass: ["+subclass+"']"); - } - subclass.prototype = new superclass(); - subclass.prototype.constructor = subclass; - subclass.superclass = superclass.prototype; - // DEPRECATED: super is a reserved word, use 'superclass' - subclass['super'] = superclass.prototype; -} - -dojo.lang._mixin = function(/*Object*/ obj, /*Object*/ props){ - // summary: - // Adds all properties and methods of props to obj. This addition is - // "prototype extension safe", so that instances of objects will not - // pass along prototype defaults. - var tobj = {}; - for(var x in props){ - // the "tobj" condition avoid copying properties in "props" - // inherited from Object.prototype. For example, if obj has a custom - // toString() method, don't overwrite it with the toString() method - // that props inherited from Object.protoype - if((typeof tobj[x] == "undefined") || (tobj[x] != props[x])){ - obj[x] = props[x]; - } - } - // IE doesn't recognize custom toStrings in for..in - if(dojo.render.html.ie - && (typeof(props["toString"]) == "function") - && (props["toString"] != obj["toString"]) - && (props["toString"] != tobj["toString"])) - { - obj.toString = props.toString; - } - return obj; // Object -} - -dojo.lang.mixin = function(/*Object*/obj, /*Object...*/props){ - // summary: Adds all properties and methods of props to obj. - for(var i=1, l=arguments.length; i -1; // boolean -} - -/** - * Partial implmentation of is* functions from - * http://www.crockford.com/javascript/recommend.html - * NOTE: some of these may not be the best thing to use in all situations - * as they aren't part of core JS and therefore can't work in every case. - * See WARNING messages inline for tips. - * - * The following is* functions are fairly "safe" - */ - -dojo.lang.isObject = function(/*anything*/ it){ - // summary: Return true if it is an Object, Array or Function. - if(typeof it == "undefined"){ return false; } - return (typeof it == "object" || it === null || dojo.lang.isArray(it) || dojo.lang.isFunction(it)); // Boolean -} - -dojo.lang.isArray = function(/*anything*/ it){ - // summary: Return true if it is an Array. - return (it && it instanceof Array || typeof it == "array"); // Boolean -} - -dojo.lang.isArrayLike = function(/*anything*/ it){ - // summary: - // Return true if it can be used as an array (i.e. is an object with - // an integer length property). - if((!it)||(dojo.lang.isUndefined(it))){ return false; } - if(dojo.lang.isString(it)){ return false; } - if(dojo.lang.isFunction(it)){ return false; } // keeps out built-in constructors (Number, String, ...) which have length properties - if(dojo.lang.isArray(it)){ return true; } - // form node itself is ArrayLike, but not always iterable. Use form.elements instead. - if((it.tagName)&&(it.tagName.toLowerCase()=='form')){ return false; } - if(dojo.lang.isNumber(it.length) && isFinite(it.length)){ return true; } - return false; // Boolean -} - -dojo.lang.isFunction = function(/*anything*/ it){ - // summary: Return true if it is a Function. - return (it instanceof Function || typeof it == "function"); // Boolean -}; - -(function(){ - // webkit treats NodeList as a function, which is bad - if((dojo.render.html.capable)&&(dojo.render.html["safari"])){ - dojo.lang.isFunction = function(/*anything*/ it){ - if((typeof(it) == "function") && (it == "[object NodeList]")) { return false; } - return (it instanceof Function || typeof it == "function"); // Boolean - } - } -})(); - -dojo.lang.isString = function(/*anything*/ it){ - // summary: Return true if it is a String. - return (typeof it == "string" || it instanceof String); -} - -dojo.lang.isAlien = function(/*anything*/ it){ - // summary: Return true if it is not a built-in function. False if not. - if(!it){ return false; } - return !dojo.lang.isFunction(it) && /\{\s*\[native code\]\s*\}/.test(String(it)); // Boolean -} - -dojo.lang.isBoolean = function(/*anything*/ it){ - // summary: Return true if it is a Boolean. - return (it instanceof Boolean || typeof it == "boolean"); // Boolean -} - -/** - * The following is***() functions are somewhat "unsafe". Fortunately, - * there are workarounds the the language provides and are mentioned - * in the WARNING messages. - * - */ -dojo.lang.isNumber = function(/*anything*/ it){ - // summary: Return true if it is a number. - // description: - // WARNING - In most cases, isNaN(it) is sufficient to determine whether or not - // something is a number or can be used as such. For example, a number or string - // can be used interchangably when accessing array items (array["1"] is the same as - // array[1]) and isNaN will return false for both values ("1" and 1). However, - // isNumber("1") will return false, which is generally not too useful. - // Also, isNumber(NaN) returns true, again, this isn't generally useful, but there - // are corner cases (like when you want to make sure that two things are really - // the same type of thing). That is really where isNumber "shines". - // - // Recommendation - Use isNaN(it) when possible - - return (it instanceof Number || typeof it == "number"); // Boolean -} - -/* - * FIXME: Should isUndefined go away since it is error prone? - */ -dojo.lang.isUndefined = function(/*anything*/ it){ - // summary: Return true if it is not defined. - // description: - // WARNING - In some cases, isUndefined will not behave as you - // might expect. If you do isUndefined(foo) and there is no earlier - // reference to foo, an error will be thrown before isUndefined is - // called. It behaves correctly if you scope yor object first, i.e. - // isUndefined(foo.bar) where foo is an object and bar isn't a - // property of the object. - // - // Recommendation - Use typeof foo == "undefined" when possible - - return ((typeof(it) == "undefined")&&(it == undefined)); // Boolean -} - -// end Crockford functions - -dojo.provide("dojo.lang.extras"); - - - -dojo.lang.setTimeout = function(/*Function*/func, /*int*/delay /*, ...*/){ - // summary: - // Sets a timeout in milliseconds to execute a function in a given - // context with optional arguments. - // usage: - // dojo.lang.setTimeout(Object context, function func, number delay[, arg1[, ...]]); - // dojo.lang.setTimeout(function func, number delay[, arg1[, ...]]); - - var context = window, argsStart = 2; - if(!dojo.lang.isFunction(func)){ - context = func; - func = delay; - delay = arguments[2]; - argsStart++; - } - - if(dojo.lang.isString(func)){ - func = context[func]; - } - - var args = []; - for (var i = argsStart; i < arguments.length; i++){ - args.push(arguments[i]); - } - return dojo.global().setTimeout(function(){ func.apply(context, args); }, delay); // int -} - -dojo.lang.clearTimeout = function(/*int*/timer){ - // summary: clears timer by number from the execution queue - - // FIXME: - // why do we have this function? It's not portable outside of browser - // environments and it's a stupid wrapper on something that browsers - // provide anyway. - dojo.global().clearTimeout(timer); -} - -dojo.lang.getNameInObj = function(/*Object*/ns, /*unknown*/item){ - // summary: - // looks for a value in the object ns with a value matching item and - // returns the property name - // ns: if null, dj_global is used - // item: value to return a name for - if(!ns){ ns = dj_global; } - - for(var x in ns){ - if(ns[x] === item){ - return new String(x); // String - } - } - return null; // null -} - -dojo.lang.shallowCopy = function(/*Object*/obj, /*Boolean?*/deep){ - // summary: - // copies object obj one level deep, or full depth if deep is true - var i, ret; - - if(obj === null){ /*obj: null*/ return null; } // null - - if(dojo.lang.isObject(obj)){ - // obj: Object - ret = new obj.constructor(); - for(i in obj){ - if(dojo.lang.isUndefined(ret[i])){ - ret[i] = deep ? dojo.lang.shallowCopy(obj[i], deep) : obj[i]; - } - } - }else if(dojo.lang.isArray(obj)){ - // obj: Array - ret = []; - for(i=0; i hacks: - * iframe document hacks allow browsers to communicate asynchronously - * with a server via HTTP POST and GET operations. With significant - * effort and server cooperation, low-latency data transit between - * client and server can be acheived via iframe mechanisms (repubsub). - * - * SVG: - * Adobe's SVG viewer implements helpful primitives for XML-based - * requests, but receipt of arbitrary text data seems unlikely w/o - * sections. - * - * - * A discussion between Dylan, Mark, Tom, and Alex helped to lay down a lot - * the IO API interface. A transcript of it can be found at: - * http://dojotoolkit.org/viewcvs/viewcvs.py/documents/irc/irc_io_api_log.txt?rev=307&view=auto - * - * Also referenced in the design of the API was the DOM 3 L&S spec: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save.html - ******************************************************************************/ - -// a map of the available transport options. Transports should add themselves -// by calling add(name) -dojo.io.transports = []; -dojo.io.hdlrFuncNames = [ "load", "error", "timeout" ]; // we're omitting a progress() event for now - -dojo.io.Request = function(/*String*/ url, /*String*/ mimetype, /*String*/ transport, /*String or Boolean*/ changeUrl){ -// summary: -// Constructs a Request object that is used by dojo.io.bind(). -// description: -// dojo.io.bind() will create one of these for you if -// you call dojo.io.bind() with an plain object containing the bind parameters. -// This method can either take the arguments specified, or an Object containing all of the parameters that you -// want to use to create the dojo.io.Request (similar to how dojo.io.bind() is called. -// The named parameters to this constructor represent the minimum set of parameters need - if((arguments.length == 1)&&(arguments[0].constructor == Object)){ - this.fromKwArgs(arguments[0]); - }else{ - this.url = url; - if(mimetype){ this.mimetype = mimetype; } - if(transport){ this.transport = transport; } - if(arguments.length >= 4){ this.changeUrl = changeUrl; } - } -} - -dojo.lang.extend(dojo.io.Request, { - - /** The URL to hit */ - url: "", - - /** The mime type used to interrpret the response body */ - mimetype: "text/plain", - - /** The HTTP method to use */ - method: "GET", - - /** An Object containing key-value pairs to be included with the request */ - content: undefined, // Object - - /** The transport medium to use */ - transport: undefined, // String - - /** If defined the URL of the page is physically changed */ - changeUrl: undefined, // String - - /** A form node to use in the request */ - formNode: undefined, // HTMLFormElement - - /** Whether the request should be made synchronously */ - sync: false, - - bindSuccess: false, - - /** Cache/look for the request in the cache before attempting to request? - * NOTE: this isn't a browser cache, this is internal and would only cache in-page - */ - useCache: false, - - /** Prevent the browser from caching this by adding a query string argument to the URL */ - preventCache: false, - - jsonFilter: function(value){ - if( (this.mimetype == "text/json-comment-filtered")|| - (this.mimetype == "application/json-comment-filtered") - ){ - var cStartIdx = value.indexOf("\/*"); - var cEndIdx = value.lastIndexOf("*\/"); - if((cStartIdx == -1)||(cEndIdx == -1)){ - dojo.debug("your JSON wasn't comment filtered!"); // FIXME: throw exception instead? - return ""; - } - return value.substring(cStartIdx+2, cEndIdx); - } - dojo.debug("please consider using a mimetype of text/json-comment-filtered to avoid potential security issues with JSON endpoints"); - return value; - }, - - // events stuff - load: function(/*String*/type, /*Object*/data, /*Object*/transportImplementation, /*Object*/kwArgs){ - // summary: - // Called on successful completion of a bind. - // type: String - // A string with value "load" - // data: Object - // The object representing the result of the bind. The actual structure - // of the data object will depend on the mimetype that was given to bind - // in the bind arguments. - // transportImplementation: Object - // The object that implements a particular transport. Structure is depedent - // on the transport. For XMLHTTPTransport (dojo.io.BrowserIO), it will be the - // XMLHttpRequest object from the browser. - // kwArgs: Object - // Object that contains the request parameters that were given to the - // bind call. Useful for storing and retrieving state from when bind - // was called. - }, - error: function(/*String*/type, /*Object*/error, /*Object*/transportImplementation, /*Object*/kwArgs){ - // summary: - // Called when there is an error with a bind. - // type: String - // A string with value "error" - // error: Object - // The error object. Should be a dojo.io.Error object, but not guaranteed. - // transportImplementation: Object - // The object that implements a particular transport. Structure is depedent - // on the transport. For XMLHTTPTransport (dojo.io.BrowserIO), it will be the - // XMLHttpRequest object from the browser. - // kwArgs: Object - // Object that contains the request parameters that were given to the - // bind call. Useful for storing and retrieving state from when bind - // was called. - }, - timeout: function(/*String*/type, /*Object*/empty, /*Object*/transportImplementation, /*Object*/kwArgs){ - // summary: - // Called when there is an error with a bind. Only implemented in certain transports at this time. - // type: String - // A string with value "timeout" - // empty: Object - // Should be null. Just a spacer argument so that load, error, timeout and handle have the - // same signatures. - // transportImplementation: Object - // The object that implements a particular transport. Structure is depedent - // on the transport. For XMLHTTPTransport (dojo.io.BrowserIO), it will be the - // XMLHttpRequest object from the browser. May be null for the timeout case for - // some transports. - // kwArgs: Object - // Object that contains the request parameters that were given to the - // bind call. Useful for storing and retrieving state from when bind - // was called. - }, - handle: function(/*String*/type, /*Object*/data, /*Object*/transportImplementation, /*Object*/kwArgs){ - // summary: - // The handle method can be defined instead of defining separate load, error and timeout - // callbacks. - // type: String - // A string with the type of callback: "load", "error", or "timeout". - // data: Object - // See the above callbacks for what this parameter could be. - // transportImplementation: Object - // The object that implements a particular transport. Structure is depedent - // on the transport. For XMLHTTPTransport (dojo.io.BrowserIO), it will be the - // XMLHttpRequest object from the browser. - // kwArgs: Object - // Object that contains the request parameters that were given to the - // bind call. Useful for storing and retrieving state from when bind - // was called. - }, - - //FIXME: change IframeIO.js to use timeouts? - // The number of seconds to wait until firing a timeout callback. - // If it is zero, that means, don't do a timeout check. - timeoutSeconds: 0, - - // the abort method needs to be filled in by the transport that accepts the - // bind() request - abort: function(){ }, - - // backButton: function(){ }, - // forwardButton: function(){ }, - - fromKwArgs: function(/*Object*/ kwArgs){ - // summary: - // Creates a dojo.io.Request from a simple object (kwArgs object). - - // normalize args - if(kwArgs["url"]){ kwArgs.url = kwArgs.url.toString(); } - if(kwArgs["formNode"]) { kwArgs.formNode = dojo.byId(kwArgs.formNode); } - if(!kwArgs["method"] && kwArgs["formNode"] && kwArgs["formNode"].method) { - kwArgs.method = kwArgs["formNode"].method; - } - - // backwards compatibility - if(!kwArgs["handle"] && kwArgs["handler"]){ kwArgs.handle = kwArgs.handler; } - if(!kwArgs["load"] && kwArgs["loaded"]){ kwArgs.load = kwArgs.loaded; } - if(!kwArgs["changeUrl"] && kwArgs["changeURL"]) { kwArgs.changeUrl = kwArgs.changeURL; } - - // encoding fun! - kwArgs.encoding = dojo.lang.firstValued(kwArgs["encoding"], djConfig["bindEncoding"], ""); - - kwArgs.sendTransport = dojo.lang.firstValued(kwArgs["sendTransport"], djConfig["ioSendTransport"], false); - - var isFunction = dojo.lang.isFunction; - for(var x=0; x 0){ - dojo.io.bind(dojo.io._bindQueue.shift()); - }else{ - dojo.io._queueBindInFlight = false; - } - } -} -dojo.io._bindQueue = []; -dojo.io._queueBindInFlight = false; - -dojo.io.argsFromMap = function(/*Object*/map, /*String?*/encoding, /*String?*/last){ - // summary: - // Converts name/values pairs in the map object to an URL-encoded string - // with format of name1=value1&name2=value2... - // map: Object - // Object that has the contains the names and values. - // encoding: String? - // String to specify how to encode the name and value. If the encoding string - // contains "utf" (case-insensitive), then encodeURIComponent is used. Otherwise - // dojo.string.encodeAscii is used. - // last: String? - // The last parameter in the list. Helps with final string formatting? - var enc = /utf/i.test(encoding||"") ? encodeURIComponent : dojo.string.encodeAscii; - var mapped = []; - var control = new Object(); - for(var name in map){ - var domap = function(elt){ - var val = enc(name)+"="+enc(elt); - mapped[(last == name) ? "push" : "unshift"](val); - } - if(!control[name]){ - var value = map[name]; - // FIXME: should be isArrayLike? - if (dojo.lang.isArray(value)){ - dojo.lang.forEach(value, domap); - }else{ - domap(value); - } - } - } - return mapped.join("&"); //String -} - -dojo.io.setIFrameSrc = function(/*DOMNode*/ iframe, /*String*/ src, /*Boolean*/ replace){ - //summary: - // Sets the URL that is loaded in an IFrame. The replace parameter indicates whether - // location.replace() should be used when changing the location of the iframe. - try{ - var r = dojo.render.html; - // dojo.debug(iframe); - if(!replace){ - if(r.safari){ - iframe.location = src; - }else{ - frames[iframe.name].location = src; - } - }else{ - // Fun with DOM 0 incompatibilities! - var idoc; - if(r.ie){ - idoc = iframe.contentWindow.document; - }else if(r.safari){ - idoc = iframe.document; - }else{ // if(r.moz){ - idoc = iframe.contentWindow; - } - - //For Safari (at least 2.0.3) and Opera, if the iframe - //has just been created but it doesn't have content - //yet, then iframe.document may be null. In that case, - //use iframe.location and return. - if(!idoc){ - iframe.location = src; - return; - }else{ - idoc.location.replace(src); - } - } - }catch(e){ - dojo.debug(e); - dojo.debug("setIFrameSrc: "+e); - } -} - -/* -dojo.io.sampleTranport = new function(){ - this.canHandle = function(kwArgs){ - // canHandle just tells dojo.io.bind() if this is a good transport to - // use for the particular type of request. - if( - ( - (kwArgs["mimetype"] == "text/plain") || - (kwArgs["mimetype"] == "text/html") || - (kwArgs["mimetype"] == "text/javascript") - )&&( - (kwArgs["method"] == "get") || - ( (kwArgs["method"] == "post") && (!kwArgs["formNode"]) ) - ) - ){ - return true; - } - - return false; - } - - this.bind = function(kwArgs){ - var hdlrObj = {}; - - // set up a handler object - for(var x=0; x1; }); - // // returns false - // dojo.lang.every([1, 2, 3, 4], function(item){ return item>0; }); - // // returns true - return this._everyOrSome(true, arr, callback, thisObject); // Boolean - }, - - some: function(/*Array*/arr, /*Function*/callback, /*Object?*/thisObject){ - // summary: - // determines whether or not any item in the array satisfies the - // condition implemented by callback. thisObject may be used to - // scope the call to callback. The function signature is derived - // from the JavaScript 1.6 Array.some() function. More - // information on this can be found here: - // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:some - // examples: - // dojo.lang.some([1, 2, 3, 4], function(item){ return item>1; }); - // // returns true - // dojo.lang.some([1, 2, 3, 4], function(item){ return item<1; }); - // // returns false - return this._everyOrSome(false, arr, callback, thisObject); // Boolean - }, - - filter: function(/*Array*/arr, /*Function*/callback, /*Object?*/thisObject){ - // summary: - // returns a new Array with those items from arr that match the - // condition implemented by callback.thisObject may be used to - // scope the call to callback. The function signature is derived - // from the JavaScript 1.6 Array.filter() function, although - // special accomidation is made in our implementation for strings. - // More information on the JS 1.6 API can be found here: - // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:filter - // examples: - // dojo.lang.some([1, 2, 3, 4], function(item){ return item>1; }); - // // returns [2, 3, 4] - var isString = dojo.lang.isString(arr); - if(isString){ /*arr: String*/arr = arr.split(""); } - var outArr; - if(Array.filter){ - outArr = Array.filter(arr, callback, thisObject); - }else{ - if(!thisObject){ - if(arguments.length >= 3){ dojo.raise("thisObject doesn't exist!"); } - thisObject = dj_global; - } - - outArr = []; - for(var i = 0; i < arr.length; i++){ - if(callback.call(thisObject, arr[i], i, arr)){ - outArr.push(arr[i]); - } - } - } - if(isString){ - return outArr.join(""); // String - } else { - return outArr; // Array - } - }, - - unnest: function(/* ... */){ - // summary: - // Creates a 1-D array out of all the arguments passed, - // unravelling any array-like objects in the process - // usage: - // unnest(1, 2, 3) ==> [1, 2, 3] - // unnest(1, [2, [3], [[[4]]]]) ==> [1, 2, 3, 4] - - var out = []; - for(var i = 0; i < arguments.length; i++){ - if(dojo.lang.isArrayLike(arguments[i])){ - var add = dojo.lang.unnest.apply(this, arguments[i]); - out = out.concat(add); - }else{ - out.push(arguments[i]); - } - } - return out; // Array - }, - - toArray: function(/*Object*/arrayLike, /*Number*/startOffset){ - // summary: - // Converts an array-like object (i.e. arguments, DOMCollection) - // to an array. Returns a new Array object. - var array = []; - for(var i = startOffset||0; i < arrayLike.length; i++){ - array.push(arrayLike[i]); - } - return array; // Array - } -}); - -dojo.provide("dojo.lang.func"); - - -dojo.lang.hitch = function(/*Object*/thisObject, /*Function|String*/method /*, ...*/){ - // summary: - // Returns a function that will only ever execute in the a given scope - // (thisObject). This allows for easy use of object member functions - // in callbacks and other places in which the "this" keyword may - // otherwise not reference the expected scope. Any number of default - // positional arguments may be passed as parameters beyond "method". - // Each of these values will be used to "placehold" (similar to curry) - // for the hitched function. Note that the order of arguments may be - // reversed in a future version. - // thisObject: the scope to run the method in - // method: - // a function to be "bound" to thisObject or the name of the method in - // thisObject to be used as the basis for the binding - // usage: - // dojo.lang.hitch(foo, "bar")(); // runs foo.bar() in the scope of foo - // dojo.lang.hitch(foo, myFunction); // returns a function that runs myFunction in the scope of foo - - var args = []; - for(var x=2; x"' -// Optionally skips escapes for single quotes - - str = str.replace(/&/gm, "&").replace(//gm, ">").replace(/"/gm, """); - if(!noSingleQuotes){ str = str.replace(/'/gm, "'"); } - return str; // string -} - -dojo.string.escapeSql = function(/*string*/str){ -//summary: -// Adds escape sequences for single quotes in SQL expressions - - return str.replace(/'/gm, "''"); //string -} - -dojo.string.escapeRegExp = function(/*string*/str){ -//summary: -// Adds escape sequences for special characters in regular expressions - - return str.replace(/\\/gm, "\\\\").replace(/([\f\b\n\t\r[\^$|?*+(){}])/gm, "\\$1"); // string -} - -//FIXME: should this one also escape backslash? -dojo.string.escapeJavaScript = function(/*string*/str){ -//summary: -// Adds escape sequences for single and double quotes as well -// as non-visible characters in JavaScript string literal expressions - - return str.replace(/(["'\f\b\n\t\r])/gm, "\\$1"); // string -} - -//FIXME: looks a lot like escapeJavaScript, just adds quotes? deprecate one? -dojo.string.escapeString = function(/*string*/str){ -//summary: -// Adds escape sequences for non-visual characters, double quote and backslash -// and surrounds with double quotes to form a valid string literal. - return ('"' + str.replace(/(["\\])/g, '\\$1') + '"' - ).replace(/[\f]/g, "\\f" - ).replace(/[\b]/g, "\\b" - ).replace(/[\n]/g, "\\n" - ).replace(/[\t]/g, "\\t" - ).replace(/[\r]/g, "\\r"); // string -} - -// TODO: make an HTML version -dojo.string.summary = function(/*string*/str, /*number*/len){ -// summary: -// Truncates 'str' after 'len' characters and appends periods as necessary so that it ends with "..." - - if(!len || str.length <= len){ - return str; // string - } - - return str.substring(0, len).replace(/\.+$/, "") + "..."; // string -} - -dojo.string.endsWith = function(/*string*/str, /*string*/end, /*boolean*/ignoreCase){ -// summary: -// Returns true if 'str' ends with 'end' - - if(ignoreCase){ - str = str.toLowerCase(); - end = end.toLowerCase(); - } - if((str.length - end.length) < 0){ - return false; // boolean - } - return str.lastIndexOf(end) == str.length - end.length; // boolean -} - -dojo.string.endsWithAny = function(/*string*/str /* , ... */){ -// summary: -// Returns true if 'str' ends with any of the arguments[2 -> n] - - for(var i = 1; i < arguments.length; i++) { - if(dojo.string.endsWith(str, arguments[i])) { - return true; // boolean - } - } - return false; // boolean -} - -dojo.string.startsWith = function(/*string*/str, /*string*/start, /*boolean*/ignoreCase){ -// summary: -// Returns true if 'str' starts with 'start' - - if(ignoreCase) { - str = str.toLowerCase(); - start = start.toLowerCase(); - } - return str.indexOf(start) == 0; // boolean -} - -dojo.string.startsWithAny = function(/*string*/str /* , ... */){ -// summary: -// Returns true if 'str' starts with any of the arguments[2 -> n] - - for(var i = 1; i < arguments.length; i++) { - if(dojo.string.startsWith(str, arguments[i])) { - return true; // boolean - } - } - return false; // boolean -} - -dojo.string.has = function(/*string*/str /* , ... */) { -// summary: -// Returns true if 'str' contains any of the arguments 2 -> n - - for(var i = 1; i < arguments.length; i++) { - if(str.indexOf(arguments[i]) > -1){ - return true; // boolean - } - } - return false; // boolean -} - -dojo.string.normalizeNewlines = function(/*string*/text, /*string? (\n or \r)*/newlineChar){ -// summary: -// Changes occurences of CR and LF in text to CRLF, or if newlineChar is provided as '\n' or '\r', -// substitutes newlineChar for occurrences of CR/LF and CRLF - - if (newlineChar == "\n"){ - text = text.replace(/\r\n/g, "\n"); - text = text.replace(/\r/g, "\n"); - } else if (newlineChar == "\r"){ - text = text.replace(/\r\n/g, "\r"); - text = text.replace(/\n/g, "\r"); - }else{ - text = text.replace(/([^\r])\n/g, "$1\r\n").replace(/\r([^\n])/g, "\r\n$1"); - } - return text; // string -} - -dojo.string.splitEscaped = function(/*string*/str, /*string of length=1*/charac){ -// summary: -// Splits 'str' into an array separated by 'charac', but skips characters escaped with a backslash - - var components = []; - for (var i = 0, prevcomma = 0; i < str.length; i++){ - if (str.charAt(i) == '\\'){ i++; continue; } - if (str.charAt(i) == charac){ - components.push(str.substring(prevcomma, i)); - prevcomma = i + 1; - } - } - components.push(str.substr(prevcomma)); - return components; // array -} - -dojo.provide("dojo.dom"); - -dojo.dom.ELEMENT_NODE = 1; -dojo.dom.ATTRIBUTE_NODE = 2; -dojo.dom.TEXT_NODE = 3; -dojo.dom.CDATA_SECTION_NODE = 4; -dojo.dom.ENTITY_REFERENCE_NODE = 5; -dojo.dom.ENTITY_NODE = 6; -dojo.dom.PROCESSING_INSTRUCTION_NODE = 7; -dojo.dom.COMMENT_NODE = 8; -dojo.dom.DOCUMENT_NODE = 9; -dojo.dom.DOCUMENT_TYPE_NODE = 10; -dojo.dom.DOCUMENT_FRAGMENT_NODE = 11; -dojo.dom.NOTATION_NODE = 12; - -dojo.dom.dojoml = "http://www.dojotoolkit.org/2004/dojoml"; - -/** - * comprehensive list of XML namespaces -**/ -dojo.dom.xmlns = { - // summary - // aliases for various common XML namespaces - svg : "http://www.w3.org/2000/svg", - smil : "http://www.w3.org/2001/SMIL20/", - mml : "http://www.w3.org/1998/Math/MathML", - cml : "http://www.xml-cml.org", - xlink : "http://www.w3.org/1999/xlink", - xhtml : "http://www.w3.org/1999/xhtml", - xul : "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", - xbl : "http://www.mozilla.org/xbl", - fo : "http://www.w3.org/1999/XSL/Format", - xsl : "http://www.w3.org/1999/XSL/Transform", - xslt : "http://www.w3.org/1999/XSL/Transform", - xi : "http://www.w3.org/2001/XInclude", - xforms : "http://www.w3.org/2002/01/xforms", - saxon : "http://icl.com/saxon", - xalan : "http://xml.apache.org/xslt", - xsd : "http://www.w3.org/2001/XMLSchema", - dt: "http://www.w3.org/2001/XMLSchema-datatypes", - xsi : "http://www.w3.org/2001/XMLSchema-instance", - rdf : "http://www.w3.org/1999/02/22-rdf-syntax-ns#", - rdfs : "http://www.w3.org/2000/01/rdf-schema#", - dc : "http://purl.org/dc/elements/1.1/", - dcq: "http://purl.org/dc/qualifiers/1.0", - "soap-env" : "http://schemas.xmlsoap.org/soap/envelope/", - wsdl : "http://schemas.xmlsoap.org/wsdl/", - AdobeExtensions : "http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/" -}; - -dojo.dom.isNode = function(/* object */wh){ - // summary: - // checks to see if wh is actually a node. - if(typeof Element == "function") { - try { - return wh instanceof Element; // boolean - } catch(e) {} - } else { - // best-guess - return wh && !isNaN(wh.nodeType); // boolean - } -} - -dojo.dom.getUniqueId = function(){ - // summary: - // returns a unique string for use with any DOM element - var _document = dojo.doc(); - do { - var id = "dj_unique_" + (++arguments.callee._idIncrement); - }while(_document.getElementById(id)); - return id; // string -} -dojo.dom.getUniqueId._idIncrement = 0; - -dojo.dom.firstElement = dojo.dom.getFirstChildElement = function(/* Element */parentNode, /* string? */tagName){ - // summary: - // returns the first child element matching tagName - var node = parentNode.firstChild; - while(node && node.nodeType != dojo.dom.ELEMENT_NODE){ - node = node.nextSibling; - } - if(tagName && node && node.tagName && node.tagName.toLowerCase() != tagName.toLowerCase()) { - node = dojo.dom.nextElement(node, tagName); - } - return node; // Element -} - -dojo.dom.lastElement = dojo.dom.getLastChildElement = function(/* Element */parentNode, /* string? */tagName){ - // summary: - // returns the last child element matching tagName - var node = parentNode.lastChild; - while(node && node.nodeType != dojo.dom.ELEMENT_NODE) { - node = node.previousSibling; - } - if(tagName && node && node.tagName && node.tagName.toLowerCase() != tagName.toLowerCase()) { - node = dojo.dom.prevElement(node, tagName); - } - return node; // Element -} - -dojo.dom.nextElement = dojo.dom.getNextSiblingElement = function(/* Node */node, /* string? */tagName){ - // summary: - // returns the next sibling element matching tagName - if(!node) { return null; } - do { - node = node.nextSibling; - } while(node && node.nodeType != dojo.dom.ELEMENT_NODE); - - if(node && tagName && tagName.toLowerCase() != node.tagName.toLowerCase()) { - return dojo.dom.nextElement(node, tagName); - } - return node; // Element -} - -dojo.dom.prevElement = dojo.dom.getPreviousSiblingElement = function(/* Node */node, /* string? */tagName){ - // summary: - // returns the previous sibling element matching tagName - if(!node) { return null; } - if(tagName) { tagName = tagName.toLowerCase(); } - do { - node = node.previousSibling; - } while(node && node.nodeType != dojo.dom.ELEMENT_NODE); - - if(node && tagName && tagName.toLowerCase() != node.tagName.toLowerCase()) { - return dojo.dom.prevElement(node, tagName); - } - return node; // Element -} - -// TODO: hmph -/*this.forEachChildTag = function(node, unaryFunc) { - var child = this.getFirstChildTag(node); - while(child) { - if(unaryFunc(child) == "break") { break; } - child = this.getNextSiblingTag(child); - } -}*/ - -dojo.dom.moveChildren = function(/*Element*/srcNode, /*Element*/destNode, /*boolean?*/trim){ - // summary: - // Moves children from srcNode to destNode and returns the count of - // children moved; will trim off text nodes if trim == true - var count = 0; - if(trim) { - while(srcNode.hasChildNodes() && - srcNode.firstChild.nodeType == dojo.dom.TEXT_NODE) { - srcNode.removeChild(srcNode.firstChild); - } - while(srcNode.hasChildNodes() && - srcNode.lastChild.nodeType == dojo.dom.TEXT_NODE) { - srcNode.removeChild(srcNode.lastChild); - } - } - while(srcNode.hasChildNodes()){ - destNode.appendChild(srcNode.firstChild); - count++; - } - return count; // number -} - -dojo.dom.copyChildren = function(/*Element*/srcNode, /*Element*/destNode, /*boolean?*/trim){ - // summary: - // Copies children from srcNde to destNode and returns the count of - // children copied; will trim off text nodes if trim == true - var clonedNode = srcNode.cloneNode(true); - return this.moveChildren(clonedNode, destNode, trim); // number -} - -dojo.dom.replaceChildren = function(/*Element*/node, /*Node*/newChild){ - // summary: - // Removes all children of node and appends newChild. All the existing - // children will be destroyed. - // FIXME: what if newChild is an array-like object? - var nodes = []; - if(dojo.render.html.ie){ - for(var i=0;i 0){ - return ancestors[0]; // Node - } - - node = node.parentNode; - } - if(returnFirstHit){ return null; } - return ancestors; // array -} - -dojo.dom.getAncestorsByTag = function(/*Node*/node, /*String*/tag, /*boolean?*/returnFirstHit){ - // summary: - // returns all ancestors matching tag (as tagName), will only return - // first one if returnFirstHit - tag = tag.toLowerCase(); - return dojo.dom.getAncestors(node, function(el){ - return ((el.tagName)&&(el.tagName.toLowerCase() == tag)); - }, returnFirstHit); // Node || array -} - -dojo.dom.getFirstAncestorByTag = function(/*Node*/node, /*string*/tag){ - // summary: - // Returns first ancestor of node with tag tagName - return dojo.dom.getAncestorsByTag(node, tag, true); // Node -} - -dojo.dom.isDescendantOf = function(/* Node */node, /* Node */ancestor, /* boolean? */guaranteeDescendant){ - // summary - // Returns boolean if node is a descendant of ancestor - // guaranteeDescendant allows us to be a "true" isDescendantOf function - if(guaranteeDescendant && node) { node = node.parentNode; } - while(node) { - if(node == ancestor){ - return true; // boolean - } - node = node.parentNode; - } - return false; // boolean -} - -dojo.dom.innerXML = function(/*Node*/node){ - // summary: - // Implementation of MS's innerXML function. - if(node.innerXML){ - return node.innerXML; // string - }else if (node.xml){ - return node.xml; // string - }else if(typeof XMLSerializer != "undefined"){ - return (new XMLSerializer()).serializeToString(node); // string - } -} - -dojo.dom.createDocument = function(){ - // summary: - // cross-browser implementation of creating an XML document object. - var doc = null; - var _document = dojo.doc(); - - if(!dj_undef("ActiveXObject")){ - var prefixes = [ "MSXML2", "Microsoft", "MSXML", "MSXML3" ]; - for(var i = 0; i1) { - var _document = dojo.doc(); - dojo.dom.replaceChildren(node, _document.createTextNode(text)); - return text; // string - } else { - if(node.textContent != undefined){ //FF 1.5 - return node.textContent; // string - } - var _result = ""; - if (node == null) { return _result; } - for (var i = 0; i < node.childNodes.length; i++) { - switch (node.childNodes[i].nodeType) { - case 1: // ELEMENT_NODE - case 5: // ENTITY_REFERENCE_NODE - _result += dojo.dom.textContent(node.childNodes[i]); - break; - case 3: // TEXT_NODE - case 2: // ATTRIBUTE_NODE - case 4: // CDATA_SECTION_NODE - _result += node.childNodes[i].nodeValue; - break; - default: - break; - } - } - return _result; // string - } -} - -dojo.dom.hasParent = function(/*Node*/node){ - // summary: - // returns whether or not node is a child of another node. - return Boolean(node && node.parentNode && dojo.dom.isNode(node.parentNode)); // boolean -} - -/** - * Examples: - * - * myFooNode = - * isTag(myFooNode, "foo"); // returns "foo" - * isTag(myFooNode, "bar"); // returns "" - * isTag(myFooNode, "FOO"); // returns "" - * isTag(myFooNode, "hey", "foo", "bar"); // returns "foo" -**/ -dojo.dom.isTag = function(/* Node */node /* ... */){ - // summary: - // determines if node has any of the provided tag names and returns - // the tag name that matches, empty string otherwise. - if(node && node.tagName) { - for(var i=1; i"); - } -}catch(e){/* squelch */} - -if(dojo.render.html.opera){ - dojo.debug("Opera is not supported with dojo.undo.browser, so back/forward detection will not work."); -} - -dojo.undo.browser = { - initialHref: (!dj_undef("window")) ? window.location.href : "", - initialHash: (!dj_undef("window")) ? window.location.hash : "", - - moveForward: false, - historyStack: [], - forwardStack: [], - historyIframe: null, - bookmarkAnchor: null, - locationTimer: null, - - /** - * - */ - setInitialState: function(/*Object*/args){ - //summary: Sets the state object and back callback for the very first page that is loaded. - //description: It is recommended that you call this method as part of an event listener that is registered via - //dojo.addOnLoad(). - //args: Object - // See the addToHistory() function for the list of valid args properties. - this.initialState = this._createState(this.initialHref, args, this.initialHash); - }, - - //FIXME: Would like to support arbitrary back/forward jumps. Have to rework iframeLoaded among other things. - //FIXME: is there a slight race condition in moz using change URL with the timer check and when - // the hash gets set? I think I have seen a back/forward call in quick succession, but not consistent. - addToHistory: function(args){ - //summary: adds a state object (args) to the history list. You must set - //djConfig.preventBackButtonFix = false to use dojo.undo.browser. - - //args: Object - // args can have the following properties: - // To support getting back button notifications, the object argument should implement a - // function called either "back", "backButton", or "handle". The string "back" will be - // passed as the first and only argument to this callback. - // - To support getting forward button notifications, the object argument should implement a - // function called either "forward", "forwardButton", or "handle". The string "forward" will be - // passed as the first and only argument to this callback. - // - If you want the browser location string to change, define "changeUrl" on the object. If the - // value of "changeUrl" is true, then a unique number will be appended to the URL as a fragment - // identifier (http://some.domain.com/path#uniquenumber). If it is any other value that does - // not evaluate to false, that value will be used as the fragment identifier. For example, - // if changeUrl: 'page1', then the URL will look like: http://some.domain.com/path#page1 - // Full example: - // dojo.undo.browser.addToHistory({ - // back: function() { alert('back pressed'); }, - // forward: function() { alert('forward pressed'); }, - // changeUrl: true - // }); - // - // BROWSER NOTES: - // Safari 1.2: - // back button "works" fine, however it's not possible to actually - // DETECT that you've moved backwards by inspecting window.location. - // Unless there is some other means of locating. - // FIXME: perhaps we can poll on history.length? - // Safari 2.0.3+ (and probably 1.3.2+): - // works fine, except when changeUrl is used. When changeUrl is used, - // Safari jumps all the way back to whatever page was shown before - // the page that uses dojo.undo.browser support. - // IE 5.5 SP2: - // back button behavior is macro. It does not move back to the - // previous hash value, but to the last full page load. This suggests - // that the iframe is the correct way to capture the back button in - // these cases. - // Don't test this page using local disk for MSIE. MSIE will not create - // a history list for iframe_history.html if served from a file: URL. - // The XML served back from the XHR tests will also not be properly - // created if served from local disk. Serve the test pages from a web - // server to test in that browser. - // IE 6.0: - // same behavior as IE 5.5 SP2 - // Firefox 1.0+: - // the back button will return us to the previous hash on the same - // page, thereby not requiring an iframe hack, although we do then - // need to run a timer to detect inter-page movement. - - //If addToHistory is called, then that means we prune the - //forward stack -- the user went back, then wanted to - //start a new forward path. - this.forwardStack = []; - - var hash = null; - var url = null; - if(!this.historyIframe){ - if(djConfig["useXDomain"] && !djConfig["dojoIframeHistoryUrl"]){ - dojo.debug("dojo.undo.browser: When using cross-domain Dojo builds," - + " please save iframe_history.html to your domain and set djConfig.dojoIframeHistoryUrl" - + " to the path on your domain to iframe_history.html"); - } - this.historyIframe = window.frames["djhistory"]; - } - if(!this.bookmarkAnchor){ - this.bookmarkAnchor = document.createElement("a"); - dojo.body().appendChild(this.bookmarkAnchor); - this.bookmarkAnchor.style.display = "none"; - } - if(args["changeUrl"]){ - hash = "#"+ ((args["changeUrl"]!==true) ? args["changeUrl"] : (new Date()).getTime()); - - //If the current hash matches the new one, just replace the history object with - //this new one. It doesn't make sense to track different state objects for the same - //logical URL. This matches the browser behavior of only putting in one history - //item no matter how many times you click on the same #hash link, at least in Firefox - //and Safari, and there is no reliable way in those browsers to know if a #hash link - //has been clicked on multiple times. So making this the standard behavior in all browsers - //so that dojo.undo.browser's behavior is the same in all browsers. - if(this.historyStack.length == 0 && this.initialState.urlHash == hash){ - this.initialState = this._createState(url, args, hash); - return; - }else if(this.historyStack.length > 0 && this.historyStack[this.historyStack.length - 1].urlHash == hash){ - this.historyStack[this.historyStack.length - 1] = this._createState(url, args, hash); - return; - } - - this.changingUrl = true; - setTimeout("window.location.href = '"+hash+"'; dojo.undo.browser.changingUrl = false;", 1); - this.bookmarkAnchor.href = hash; - - if(dojo.render.html.ie){ - url = this._loadIframeHistory(); - - var oldCB = args["back"]||args["backButton"]||args["handle"]; - - //The function takes handleName as a parameter, in case the - //callback we are overriding was "handle". In that case, - //we will need to pass the handle name to handle. - var tcb = function(handleName){ - if(window.location.hash != ""){ - setTimeout("window.location.href = '"+hash+"';", 1); - } - //Use apply to set "this" to args, and to try to avoid memory leaks. - oldCB.apply(this, [handleName]); - } - - //Set interceptor function in the right place. - if(args["back"]){ - args.back = tcb; - }else if(args["backButton"]){ - args.backButton = tcb; - }else if(args["handle"]){ - args.handle = tcb; - } - - var oldFW = args["forward"]||args["forwardButton"]||args["handle"]; - - //The function takes handleName as a parameter, in case the - //callback we are overriding was "handle". In that case, - //we will need to pass the handle name to handle. - var tfw = function(handleName){ - if(window.location.hash != ""){ - window.location.href = hash; - } - if(oldFW){ // we might not actually have one - //Use apply to set "this" to args, and to try to avoid memory leaks. - oldFW.apply(this, [handleName]); - } - } - - //Set interceptor function in the right place. - if(args["forward"]){ - args.forward = tfw; - }else if(args["forwardButton"]){ - args.forwardButton = tfw; - }else if(args["handle"]){ - args.handle = tfw; - } - - }else if(dojo.render.html.moz){ - // start the timer - if(!this.locationTimer){ - this.locationTimer = setInterval("dojo.undo.browser.checkLocation();", 200); - } - } - }else{ - url = this._loadIframeHistory(); - } - - this.historyStack.push(this._createState(url, args, hash)); - }, - - checkLocation: function(){ - //summary: private method. Do not call this directly. - if (!this.changingUrl){ - var hsl = this.historyStack.length; - - if((window.location.hash == this.initialHash||window.location.href == this.initialHref)&&(hsl == 1)){ - // FIXME: could this ever be a forward button? - // we can't clear it because we still need to check for forwards. Ugg. - // clearInterval(this.locationTimer); - this.handleBackButton(); - return; - } - - // first check to see if we could have gone forward. We always halt on - // a no-hash item. - if(this.forwardStack.length > 0){ - if(this.forwardStack[this.forwardStack.length-1].urlHash == window.location.hash){ - this.handleForwardButton(); - return; - } - } - - // ok, that didn't work, try someplace back in the history stack - if((hsl >= 2)&&(this.historyStack[hsl-2])){ - if(this.historyStack[hsl-2].urlHash==window.location.hash){ - this.handleBackButton(); - return; - } - } - } - }, - - iframeLoaded: function(evt, ifrLoc){ - //summary: private method. Do not call this directly. - if(!dojo.render.html.opera){ - var query = this._getUrlQuery(ifrLoc.href); - if(query == null){ - // alert("iframeLoaded"); - // we hit the end of the history, so we should go back - if(this.historyStack.length == 1){ - this.handleBackButton(); - } - return; - } - if(this.moveForward){ - // we were expecting it, so it's not either a forward or backward movement - this.moveForward = false; - return; - } - - //Check the back stack first, since it is more likely. - //Note that only one step back or forward is supported. - if(this.historyStack.length >= 2 && query == this._getUrlQuery(this.historyStack[this.historyStack.length-2].url)){ - this.handleBackButton(); - } - else if(this.forwardStack.length > 0 && query == this._getUrlQuery(this.forwardStack[this.forwardStack.length-1].url)){ - this.handleForwardButton(); - } - } - }, - - handleBackButton: function(){ - //summary: private method. Do not call this directly. - - //The "current" page is always at the top of the history stack. - var current = this.historyStack.pop(); - if(!current){ return; } - var last = this.historyStack[this.historyStack.length-1]; - if(!last && this.historyStack.length == 0){ - last = this.initialState; - } - if (last){ - if(last.kwArgs["back"]){ - last.kwArgs["back"](); - }else if(last.kwArgs["backButton"]){ - last.kwArgs["backButton"](); - }else if(last.kwArgs["handle"]){ - last.kwArgs.handle("back"); - } - } - this.forwardStack.push(current); - }, - - handleForwardButton: function(){ - //summary: private method. Do not call this directly. - - var last = this.forwardStack.pop(); - if(!last){ return; } - if(last.kwArgs["forward"]){ - last.kwArgs.forward(); - }else if(last.kwArgs["forwardButton"]){ - last.kwArgs.forwardButton(); - }else if(last.kwArgs["handle"]){ - last.kwArgs.handle("forward"); - } - this.historyStack.push(last); - }, - - _createState: function(url, args, hash){ - //summary: private method. Do not call this directly. - - return {"url": url, "kwArgs": args, "urlHash": hash}; //Object - }, - - _getUrlQuery: function(url){ - //summary: private method. Do not call this directly. - var segments = url.split("?"); - if (segments.length < 2){ - return null; //null - } - else{ - return segments[1]; //String - } - }, - - _loadIframeHistory: function(){ - //summary: private method. Do not call this directly. - var url = (djConfig["dojoIframeHistoryUrl"] || dojo.hostenv.getBaseScriptUri()+'iframe_history.html') - + "?" + (new Date()).getTime(); - this.moveForward = true; - dojo.io.setIFrameSrc(this.historyIframe, url, false); - return url; //String - } -} - -dojo.provide("dojo.io.BrowserIO"); - - - - - - - - -if(!dj_undef("window")) { - -dojo.io.checkChildrenForFile = function(/*DOMNode*/node){ - //summary: Checks any child nodes of node for an input type="file" element. - var hasFile = false; - var inputs = node.getElementsByTagName("input"); - dojo.lang.forEach(inputs, function(input){ - if(hasFile){ return; } - if(input.getAttribute("type")=="file"){ - hasFile = true; - } - }); - return hasFile; //boolean -} - -dojo.io.formHasFile = function(/*DOMNode*/formNode){ - //summary: Just calls dojo.io.checkChildrenForFile(). - return dojo.io.checkChildrenForFile(formNode); //boolean -} - -dojo.io.updateNode = function(/*DOMNode*/node, /*String or Object*/urlOrArgs){ - //summary: Updates a DOMnode with the result of a dojo.io.bind() call. - //node: DOMNode - //urlOrArgs: String or Object - // Either a String that has an URL, or an object containing dojo.io.bind() - // arguments. - node = dojo.byId(node); - var args = urlOrArgs; - if(dojo.lang.isString(urlOrArgs)){ - args = { url: urlOrArgs }; - } - args.mimetype = "text/html"; - args.load = function(t, d, e){ - while(node.firstChild){ - dojo.dom.destroyNode(node.firstChild); - } - node.innerHTML = d; - }; - dojo.io.bind(args); -} - -dojo.io.formFilter = function(/*DOMNode*/node) { - //summary: Returns true if the node is an input element that is enabled, has - //a name, and whose type is one of the following values: ["file", "submit", "image", "reset", "button"] - var type = (node.type||"").toLowerCase(); - return !node.disabled && node.name - && !dojo.lang.inArray(["file", "submit", "image", "reset", "button"], type); //boolean -} - -// TODO: Move to htmlUtils -dojo.io.encodeForm = function(/*DOMNode*/formNode, /*String?*/encoding, /*Function?*/formFilter){ - //summary: Converts the names and values of form elements into an URL-encoded - //string (name=value&name=value...). - //formNode: DOMNode - //encoding: String? - // The encoding to use for the values. Specify a string that starts with - // "utf" (for instance, "utf8"), to use encodeURIComponent() as the encoding - // function. Otherwise, dojo.string.encodeAscii will be used. - //formFilter: Function? - // A function used to filter out form elements. The element node will be passed - // to the formFilter function, and a boolean result is expected (true indicating - // indicating that the element should have its name/value included in the output). - // If no formFilter is specified, then dojo.io.formFilter() will be used. - if((!formNode)||(!formNode.tagName)||(!formNode.tagName.toLowerCase() == "form")){ - dojo.raise("Attempted to encode a non-form element."); - } - if(!formFilter) { formFilter = dojo.io.formFilter; } - var enc = /utf/i.test(encoding||"") ? encodeURIComponent : dojo.string.encodeAscii; - var values = []; - - for(var i = 0; i < formNode.elements.length; i++){ - var elm = formNode.elements[i]; - if(!elm || elm.tagName.toLowerCase() == "fieldset" || !formFilter(elm)) { continue; } - var name = enc(elm.name); - var type = elm.type.toLowerCase(); - - if(type == "select-multiple"){ - for(var j = 0; j < elm.options.length; j++){ - if(elm.options[j].selected) { - values.push(name + "=" + enc(elm.options[j].value)); - } - } - }else if(dojo.lang.inArray(["radio", "checkbox"], type)){ - if(elm.checked){ - values.push(name + "=" + enc(elm.value)); - } - }else{ - values.push(name + "=" + enc(elm.value)); - } - } - - // now collect input type="image", which doesn't show up in the elements array - var inputs = formNode.getElementsByTagName("input"); - for(var i = 0; i < inputs.length; i++) { - var input = inputs[i]; - if(input.type.toLowerCase() == "image" && input.form == formNode - && formFilter(input)) { - var name = enc(input.name); - values.push(name + "=" + enc(input.value)); - values.push(name + ".x=0"); - values.push(name + ".y=0"); - } - } - return values.join("&") + "&"; //String -} - -dojo.io.FormBind = function(/*DOMNode or Object*/args) { - //summary: constructor for a dojo.io.FormBind object. See the Dojo Book for - //some information on usage: http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book23 - //args: DOMNode or Object - // args can either be the DOMNode for a form element, or an object containing - // dojo.io.bind() arguments, one of which should be formNode with the value of - // a form element DOMNode. - this.bindArgs = {}; - - if(args && args.formNode) { - this.init(args); - } else if(args) { - this.init({formNode: args}); - } -} -dojo.lang.extend(dojo.io.FormBind, { - form: null, - - bindArgs: null, - - clickedButton: null, - - init: function(/*DOMNode or Object*/args) { - //summary: Internal function called by the dojo.io.FormBind() constructor - //do not call this method directly. - var form = dojo.byId(args.formNode); - - if(!form || !form.tagName || form.tagName.toLowerCase() != "form") { - throw new Error("FormBind: Couldn't apply, invalid form"); - } else if(this.form == form) { - return; - } else if(this.form) { - throw new Error("FormBind: Already applied to a form"); - } - - dojo.lang.mixin(this.bindArgs, args); - this.form = form; - - this.connect(form, "onsubmit", "submit"); - - for(var i = 0; i < form.elements.length; i++) { - var node = form.elements[i]; - if(node && node.type && dojo.lang.inArray(["submit", "button"], node.type.toLowerCase())) { - this.connect(node, "onclick", "click"); - } - } - - var inputs = form.getElementsByTagName("input"); - for(var i = 0; i < inputs.length; i++) { - var input = inputs[i]; - if(input.type.toLowerCase() == "image" && input.form == form) { - this.connect(input, "onclick", "click"); - } - } - }, - - onSubmit: function(/*DOMNode*/form) { - //summary: Function used to verify that the form is OK to submit. - //Override this function if you want specific form validation done. - return true; //boolean - }, - - submit: function(/*Event*/e) { - //summary: internal function that is connected as a listener to the - //form's onsubmit event. - e.preventDefault(); - if(this.onSubmit(this.form)) { - dojo.io.bind(dojo.lang.mixin(this.bindArgs, { - formFilter: dojo.lang.hitch(this, "formFilter") - })); - } - }, - - click: function(/*Event*/e) { - //summary: internal method that is connected as a listener to the - //form's elements whose click event can submit a form. - var node = e.currentTarget; - if(node.disabled) { return; } - this.clickedButton = node; - }, - - formFilter: function(/*DOMNode*/node) { - //summary: internal function used to know which form element values to include - // in the dojo.io.bind() request. - var type = (node.type||"").toLowerCase(); - var accept = false; - if(node.disabled || !node.name) { - accept = false; - } else if(dojo.lang.inArray(["submit", "button", "image"], type)) { - if(!this.clickedButton) { this.clickedButton = node; } - accept = node == this.clickedButton; - } else { - accept = !dojo.lang.inArray(["file", "submit", "reset", "button"], type); - } - return accept; //boolean - }, - - // in case you don't have dojo.event.* pulled in - connect: function(/*Object*/srcObj, /*Function*/srcFcn, /*Function*/targetFcn) { - //summary: internal function used to connect event listeners to form elements - //that trigger events. Used in case dojo.event is not loaded. - if(dojo.evalObjPath("dojo.event.connect")) { - dojo.event.connect(srcObj, srcFcn, this, targetFcn); - } else { - var fcn = dojo.lang.hitch(this, targetFcn); - srcObj[srcFcn] = function(e) { - if(!e) { e = window.event; } - if(!e.currentTarget) { e.currentTarget = e.srcElement; } - if(!e.preventDefault) { e.preventDefault = function() { window.event.returnValue = false; } } - fcn(e); - } - } - } -}); - -dojo.io.XMLHTTPTransport = new function(){ - //summary: The object that implements the dojo.io.bind transport for XMLHttpRequest. - var _this = this; - - var _cache = {}; // FIXME: make this public? do we even need to? - this.useCache = false; // if this is true, we'll cache unless kwArgs.useCache = false - this.preventCache = false; // if this is true, we'll always force GET requests to cache - - // FIXME: Should this even be a function? or do we just hard code it in the next 2 functions? - function getCacheKey(url, query, method) { - return url + "|" + query + "|" + method.toLowerCase(); - } - - function addToCache(url, query, method, http) { - _cache[getCacheKey(url, query, method)] = http; - } - - function getFromCache(url, query, method) { - return _cache[getCacheKey(url, query, method)]; - } - - this.clearCache = function() { - _cache = {}; - } - - // moved successful load stuff here - function doLoad(kwArgs, http, url, query, useCache) { - if( ((http.status>=200)&&(http.status<300))|| // allow any 2XX response code - (http.status==304)|| // get it out of the cache - (http.status==1223)|| // Internet Explorer mangled the status code - (location.protocol=="file:" && (http.status==0 || http.status==undefined))|| - (location.protocol=="chrome:" && (http.status==0 || http.status==undefined)) - ){ - var ret; - if(kwArgs.method.toLowerCase() == "head"){ - var headers = http.getAllResponseHeaders(); - ret = {}; - ret.toString = function(){ return headers; } - var values = headers.split(/[\r\n]+/g); - for(var i = 0; i < values.length; i++) { - var pair = values[i].match(/^([^:]+)\s*:\s*(.+)$/i); - if(pair) { - ret[pair[1]] = pair[2]; - } - } - }else if(kwArgs.mimetype == "text/javascript"){ - try{ - ret = dj_eval(http.responseText); - }catch(e){ - dojo.debug(e); - dojo.debug(http.responseText); - ret = null; - } - }else if(kwArgs.mimetype.substr(0, 9) == "text/json" || kwArgs.mimetype.substr(0, 16) == "application/json"){ - try{ - ret = dj_eval("("+kwArgs.jsonFilter(http.responseText)+")"); - }catch(e){ - dojo.debug(e); - dojo.debug(http.responseText); - ret = false; - } - }else if((kwArgs.mimetype == "application/xml")|| - (kwArgs.mimetype == "text/xml")){ - ret = http.responseXML; - if(!ret || typeof ret == "string" || !http.getResponseHeader("Content-Type")) { - ret = dojo.dom.createDocumentFromText(http.responseText); - } - }else{ - ret = http.responseText; - } - - if(useCache){ // only cache successful responses - addToCache(url, query, kwArgs.method, http); - } - kwArgs[(typeof kwArgs.load == "function") ? "load" : "handle"]("load", ret, http, kwArgs); - }else{ - var errObj = new dojo.io.Error("XMLHttpTransport Error: "+http.status+" "+http.statusText); - kwArgs[(typeof kwArgs.error == "function") ? "error" : "handle"]("error", errObj, http, kwArgs); - } - } - - // set headers (note: Content-Type will get overriden if kwArgs.contentType is set) - function setHeaders(http, kwArgs){ - if(kwArgs["headers"]) { - for(var header in kwArgs["headers"]) { - if(header.toLowerCase() == "content-type" && !kwArgs["contentType"]) { - kwArgs["contentType"] = kwArgs["headers"][header]; - } else { - http.setRequestHeader(header, kwArgs["headers"][header]); - } - } - } - } - - this.inFlight = []; - this.inFlightTimer = null; - - this.startWatchingInFlight = function(){ - //summary: internal method used to trigger a timer to watch all inflight - //XMLHttpRequests. - if(!this.inFlightTimer){ - // setInterval broken in mozilla x86_64 in some circumstances, see - // https://bugzilla.mozilla.org/show_bug.cgi?id=344439 - // using setTimeout instead - this.inFlightTimer = setTimeout("dojo.io.XMLHTTPTransport.watchInFlight();", 10); - } - } - - this.watchInFlight = function(){ - //summary: internal method that checks each inflight XMLHttpRequest to see - //if it has completed or if the timeout situation applies. - var now = null; - // make sure sync calls stay thread safe, if this callback is called during a sync call - // and this results in another sync call before the first sync call ends the browser hangs - if(!dojo.hostenv._blockAsync && !_this._blockAsync){ - for(var x=this.inFlight.length-1; x>=0; x--){ - try{ - var tif = this.inFlight[x]; - if(!tif || tif.http._aborted || !tif.http.readyState){ - this.inFlight.splice(x, 1); continue; - } - if(4==tif.http.readyState){ - // remove it so we can clean refs - this.inFlight.splice(x, 1); - doLoad(tif.req, tif.http, tif.url, tif.query, tif.useCache); - }else if (tif.startTime){ - //See if this is a timeout case. - if(!now){ - now = (new Date()).getTime(); - } - if(tif.startTime + (tif.req.timeoutSeconds * 1000) < now){ - //Stop the request. - if(typeof tif.http.abort == "function"){ - tif.http.abort(); - } - - // remove it so we can clean refs - this.inFlight.splice(x, 1); - tif.req[(typeof tif.req.timeout == "function") ? "timeout" : "handle"]("timeout", null, tif.http, tif.req); - } - } - }catch(e){ - try{ - var errObj = new dojo.io.Error("XMLHttpTransport.watchInFlight Error: " + e); - tif.req[(typeof tif.req.error == "function") ? "error" : "handle"]("error", errObj, tif.http, tif.req); - }catch(e2){ - dojo.debug("XMLHttpTransport error callback failed: " + e2); - } - } - } - } - - clearTimeout(this.inFlightTimer); - if(this.inFlight.length == 0){ - this.inFlightTimer = null; - return; - } - this.inFlightTimer = setTimeout("dojo.io.XMLHTTPTransport.watchInFlight();", 10); - } - - var hasXmlHttp = dojo.hostenv.getXmlhttpObject() ? true : false; - this.canHandle = function(/*dojo.io.Request*/kwArgs){ - //summary: Tells dojo.io.bind() if this is a good transport to - //use for the particular type of request. This type of transport cannot - //handle forms that have an input type="file" element. - - // FIXME: we need to determine when form values need to be - // multi-part mime encoded and avoid using this transport for those - // requests. - var mlc = kwArgs["mimetype"].toLowerCase()||""; - return hasXmlHttp - && ( - ( - dojo.lang.inArray([ - "text/plain", "text/html", "application/xml", - "text/xml", "text/javascript" - ], mlc - ) - ) || ( - mlc.substr(0, 9) == "text/json" || mlc.substr(0, 16) == "application/json" - ) - ) - && !( kwArgs["formNode"] && dojo.io.formHasFile(kwArgs["formNode"]) ); //boolean - } - - this.multipartBoundary = "45309FFF-BD65-4d50-99C9-36986896A96F"; // unique guid as a boundary value for multipart posts - - this.bind = function(/*dojo.io.Request*/kwArgs){ - //summary: function that sends the request to the server. - - //This function will attach an abort() function to the kwArgs dojo.io.Request object, - //so if you need to abort the request, you can call that method on the request object. - //The following are acceptable properties in kwArgs (in addition to the - //normal dojo.io.Request object properties). - //url: String: URL the server URL to use for the request. - //method: String: the HTTP method to use (GET, POST, etc...). - //mimetype: Specifies what format the result data should be given to the load/handle callback. Valid values are: - // text/javascript, text/json, application/json, application/xml, text/xml. Any other mimetype will give back a text - // string. - //transport: String: specify "XMLHTTPTransport" to force the use of this XMLHttpRequest transport. - //headers: Object: The object property names and values will be sent as HTTP request header - // names and values. - //sendTransport: boolean: If true, then dojo.transport=xmlhttp will be added to the request. - //encoding: String: The type of encoding to use when dealing with the content kwArgs property. - //content: Object: The content object is converted into a name=value&name=value string, by - // using dojo.io.argsFromMap(). The encoding kwArgs property is passed to dojo.io.argsFromMap() - // for use in encoding the names and values. The resulting string is added to the request. - //formNode: DOMNode: a form element node. This should not normally be used. Use new dojo.io.FormBind() instead. - // If formNode is used, then the names and values of the form elements will be converted - // to a name=value&name=value string and added to the request. The encoding kwArgs property is used - // to encode the names and values. - //postContent: String: Raw name=value&name=value string to be included as part of the request. - //back or backButton: Function: A function to be called if the back button is pressed. If this kwArgs property - // is used, then back button support via dojo.undo.browser will be used. See notes for dojo.undo.browser on usage. - // You need to set djConfig.preventBackButtonFix = false to enable back button support. - //changeUrl: boolean or String: Used as part of back button support. See notes for dojo.undo.browser on usage. - //user: String: The user name. Used in conjuction with password. Passed to XMLHttpRequest.open(). - //password: String: The user's password. Used in conjuction with user. Passed to XMLHttpRequest.open(). - //file: Object or Array of Objects: an object simulating a file to be uploaded. file objects should have the following properties: - // name or fileName: the name of the file - // contentType: the MIME content type for the file. - // content: the actual content of the file. - //multipart: boolean: indicates whether this should be a multipart mime request. If kwArgs.file exists, then this - // property is set to true automatically. - //sync: boolean: if true, then a synchronous XMLHttpRequest call is done, - // if false (the default), then an asynchronous call is used. - //preventCache: boolean: If true, then a cache busting parameter is added to the request URL. - // default value is false. - //useCache: boolean: If true, then XMLHttpTransport will keep an internal cache of the server - // response and use that response if a similar request is done again. - // A similar request is one that has the same URL, query string and HTTP method value. - // default is false. - if(!kwArgs["url"]){ - // are we performing a history action? - if( !kwArgs["formNode"] - && (kwArgs["backButton"] || kwArgs["back"] || kwArgs["changeUrl"] || kwArgs["watchForURL"]) - && (!djConfig.preventBackButtonFix)) { - dojo.deprecated("Using dojo.io.XMLHTTPTransport.bind() to add to browser history without doing an IO request", - "Use dojo.undo.browser.addToHistory() instead.", "0.4"); - dojo.undo.browser.addToHistory(kwArgs); - return true; - } - } - - // build this first for cache purposes - var url = kwArgs.url; - var query = ""; - if(kwArgs["formNode"]){ - var ta = kwArgs.formNode.getAttribute("action"); - if((ta)&&(!kwArgs["url"])){ url = ta; } - var tp = kwArgs.formNode.getAttribute("method"); - if((tp)&&(!kwArgs["method"])){ kwArgs.method = tp; } - query += dojo.io.encodeForm(kwArgs.formNode, kwArgs.encoding, kwArgs["formFilter"]); - } - - if(url.indexOf("#") > -1) { - dojo.debug("Warning: dojo.io.bind: stripping hash values from url:", url); - url = url.split("#")[0]; - } - - if(kwArgs["file"]){ - // force post for file transfer - kwArgs.method = "post"; - } - - if(!kwArgs["method"]){ - kwArgs.method = "get"; - } - - // guess the multipart value - if(kwArgs.method.toLowerCase() == "get"){ - // GET cannot use multipart - kwArgs.multipart = false; - }else{ - if(kwArgs["file"]){ - // enforce multipart when sending files - kwArgs.multipart = true; - }else if(!kwArgs["multipart"]){ - // default - kwArgs.multipart = false; - } - } - - if(kwArgs["backButton"] || kwArgs["back"] || kwArgs["changeUrl"]){ - dojo.undo.browser.addToHistory(kwArgs); - } - - var content = kwArgs["content"] || {}; - - if(kwArgs.sendTransport) { - content["dojo.transport"] = "xmlhttp"; - } - - do { // break-block - if(kwArgs.postContent){ - query = kwArgs.postContent; - break; - } - - if(content) { - query += dojo.io.argsFromMap(content, kwArgs.encoding); - } - - if(kwArgs.method.toLowerCase() == "get" || !kwArgs.multipart){ - break; - } - - var t = []; - if(query.length){ - var q = query.split("&"); - for(var i = 0; i < q.length; ++i){ - if(q[i].length){ - var p = q[i].split("="); - t.push( "--" + this.multipartBoundary, - "Content-Disposition: form-data; name=\"" + p[0] + "\"", - "", - p[1]); - } - } - } - - if(kwArgs.file){ - if(dojo.lang.isArray(kwArgs.file)){ - for(var i = 0; i < kwArgs.file.length; ++i){ - var o = kwArgs.file[i]; - t.push( "--" + this.multipartBoundary, - "Content-Disposition: form-data; name=\"" + o.name + "\"; filename=\"" + ("fileName" in o ? o.fileName : o.name) + "\"", - "Content-Type: " + ("contentType" in o ? o.contentType : "application/octet-stream"), - "", - o.content); - } - }else{ - var o = kwArgs.file; - t.push( "--" + this.multipartBoundary, - "Content-Disposition: form-data; name=\"" + o.name + "\"; filename=\"" + ("fileName" in o ? o.fileName : o.name) + "\"", - "Content-Type: " + ("contentType" in o ? o.contentType : "application/octet-stream"), - "", - o.content); - } - } - - if(t.length){ - t.push("--"+this.multipartBoundary+"--", ""); - query = t.join("\r\n"); - } - }while(false); - - // kwArgs.Connection = "close"; - - var async = kwArgs["sync"] ? false : true; - - var preventCache = kwArgs["preventCache"] || - (this.preventCache == true && kwArgs["preventCache"] != false); - var useCache = kwArgs["useCache"] == true || - (this.useCache == true && kwArgs["useCache"] != false ); - - // preventCache is browser-level (add query string junk), useCache - // is for the local cache. If we say preventCache, then don't attempt - // to look in the cache, but if useCache is true, we still want to cache - // the response - if(!preventCache && useCache){ - var cachedHttp = getFromCache(url, query, kwArgs.method); - if(cachedHttp){ - doLoad(kwArgs, cachedHttp, url, query, false); - return; - } - } - - // much of this is from getText, but reproduced here because we need - // more flexibility - var http = dojo.hostenv.getXmlhttpObject(kwArgs); - var received = false; - - // build a handler function that calls back to the handler obj - if(async){ - var startTime = - // FIXME: setting up this callback handler leaks on IE!!! - this.inFlight.push({ - "req": kwArgs, - "http": http, - "url": url, - "query": query, - "useCache": useCache, - "startTime": kwArgs.timeoutSeconds ? (new Date()).getTime() : 0 - }); - this.startWatchingInFlight(); - }else{ - // block async callbacks until sync is in, needed in khtml, others? - _this._blockAsync = true; - } - - if(kwArgs.method.toLowerCase() == "post"){ - // FIXME: need to hack in more flexible Content-Type setting here! - if (!kwArgs.user) { - http.open("POST", url, async); - }else{ - http.open("POST", url, async, kwArgs.user, kwArgs.password); - } - setHeaders(http, kwArgs); - http.setRequestHeader("Content-Type", kwArgs.multipart ? ("multipart/form-data; boundary=" + this.multipartBoundary) : - (kwArgs.contentType || "application/x-www-form-urlencoded")); - try{ - http.send(query); - }catch(e){ - if(typeof http.abort == "function"){ - http.abort(); - } - doLoad(kwArgs, {status: 404}, url, query, useCache); - } - }else{ - var tmpUrl = url; - if(query != "") { - tmpUrl += (tmpUrl.indexOf("?") > -1 ? "&" : "?") + query; - } - if(preventCache) { - tmpUrl += (dojo.string.endsWithAny(tmpUrl, "?", "&") - ? "" : (tmpUrl.indexOf("?") > -1 ? "&" : "?")) + "dojo.preventCache=" + new Date().valueOf(); - } - if (!kwArgs.user) { - http.open(kwArgs.method.toUpperCase(), tmpUrl, async); - }else{ - http.open(kwArgs.method.toUpperCase(), tmpUrl, async, kwArgs.user, kwArgs.password); - } - setHeaders(http, kwArgs); - try { - http.send(null); - }catch(e) { - if(typeof http.abort == "function"){ - http.abort(); - } - doLoad(kwArgs, {status: 404}, url, query, useCache); - } - } - - if( !async ) { - doLoad(kwArgs, http, url, query, useCache); - _this._blockAsync = false; - } - - kwArgs.abort = function(){ - try{// khtml doesent reset readyState on abort, need this workaround - http._aborted = true; - }catch(e){/*squelsh*/} - return http.abort(); - } - - return; - } - dojo.io.transports.addTransport("XMLHTTPTransport"); -} - -} - -dojo.provide("dojo.io.cookie"); - -dojo.io.cookie.setCookie = function(/*String*/name, /*String*/value, - /*Number?*/days, /*String?*/path, - /*String?*/domain, /*boolean?*/secure){ - //summary: sets a cookie. - var expires = -1; - if((typeof days == "number")&&(days >= 0)){ - var d = new Date(); - d.setTime(d.getTime()+(days*24*60*60*1000)); - expires = d.toGMTString(); - } - value = escape(value); - document.cookie = name + "=" + value + ";" - + (expires != -1 ? " expires=" + expires + ";" : "") - + (path ? "path=" + path : "") - + (domain ? "; domain=" + domain : "") - + (secure ? "; secure" : ""); -} - -dojo.io.cookie.set = dojo.io.cookie.setCookie; - -dojo.io.cookie.getCookie = function(/*String*/name){ - //summary: Gets a cookie with the given name. - - // FIXME: Which cookie should we return? - // If there are cookies set for different sub domains in the current - // scope there could be more than one cookie with the same name. - // I think taking the last one in the list takes the one from the - // deepest subdomain, which is what we're doing here. - var idx = document.cookie.lastIndexOf(name+'='); - if(idx == -1) { return null; } - var value = document.cookie.substring(idx+name.length+1); - var end = value.indexOf(';'); - if(end == -1) { end = value.length; } - value = value.substring(0, end); - value = unescape(value); - return value; //String -} - -dojo.io.cookie.get = dojo.io.cookie.getCookie; - -dojo.io.cookie.deleteCookie = function(/*String*/name){ - //summary: Deletes a cookie with the given name. - dojo.io.cookie.setCookie(name, "-", 0); -} - -dojo.io.cookie.setObjectCookie = function( /*String*/name, /*Object*/obj, - /*Number?*/days, /*String?*/path, - /*String?*/domain, /*boolean?*/secure, - /*boolean?*/clearCurrent){ - //summary: Takes an object, serializes it to a cookie value, and either - //sets a cookie with the serialized value. - //description: If clearCurrent is true, then any current cookie value - //for this object will be replaced with the the new serialized object value. - //If clearCurrent is false, then the existing cookie value will be modified - //with any changes from the new object value. - //Objects must be simple name/value pairs where the value is either a string - //or a number. Any other value will be ignored. - if(arguments.length == 5){ // for backwards compat - clearCurrent = domain; - domain = null; - secure = null; - } - var pairs = [], cookie, value = ""; - if(!clearCurrent){ - cookie = dojo.io.cookie.getObjectCookie(name); - } - if(days >= 0){ - if(!cookie){ cookie = {}; } - for(var prop in obj){ - if(obj[prop] == null){ - delete cookie[prop]; - }else if((typeof obj[prop] == "string")||(typeof obj[prop] == "number")){ - cookie[prop] = obj[prop]; - } - } - prop = null; - for(var prop in cookie){ - pairs.push(escape(prop) + "=" + escape(cookie[prop])); - } - value = pairs.join("&"); - } - dojo.io.cookie.setCookie(name, value, days, path, domain, secure); -} - -dojo.io.cookie.getObjectCookie = function(/*String*/name){ - //summary: Gets an object value for the given cookie name. The complement of - //dojo.io.cookie.setObjectCookie(). - var values = null, cookie = dojo.io.cookie.getCookie(name); - if(cookie){ - values = {}; - var pairs = cookie.split("&"); - for(var i = 0; i < pairs.length; i++){ - var pair = pairs[i].split("="); - var value = pair[1]; - if( isNaN(value) ){ value = unescape(pair[1]); } - values[ unescape(pair[0]) ] = value; - } - } - return values; -} - -dojo.io.cookie.isSupported = function(){ - //summary: Tests the browser to see if cookies are enabled. - if(typeof navigator.cookieEnabled != "boolean"){ - dojo.io.cookie.setCookie("__TestingYourBrowserForCookieSupport__", - "CookiesAllowed", 90, null); - var cookieVal = dojo.io.cookie.getCookie("__TestingYourBrowserForCookieSupport__"); - navigator.cookieEnabled = (cookieVal == "CookiesAllowed"); - if(navigator.cookieEnabled){ - // FIXME: should we leave this around? - this.deleteCookie("__TestingYourBrowserForCookieSupport__"); - } - } - return navigator.cookieEnabled; //boolean -} - -// need to leave this in for backwards-compat from 0.1 for when it gets pulled in by dojo.io.* -if(!dojo.io.cookies){ dojo.io.cookies = dojo.io.cookie; } - -dojo.kwCompoundRequire({ - common: ["dojo.io.common"], - rhino: ["dojo.io.RhinoIO"], - browser: ["dojo.io.BrowserIO", "dojo.io.cookie"], - dashboard: ["dojo.io.BrowserIO", "dojo.io.cookie"] -}); -dojo.provide("dojo.io.*"); - -dojo.provide("dojo.event.common"); - - - - - -// TODO: connection filter functions -// these are functions that accept a method invocation (like around -// advice) and return a boolean based on it. That value determines -// whether or not the connection proceeds. It could "feel" like around -// advice for those who know what it is (calling proceed() or not), -// but I think presenting it as a "filter" and/or calling it with the -// function args and not the MethodInvocation might make it more -// palletable to "normal" users than around-advice currently is -// TODO: execution scope mangling -// YUI's event facility by default executes listeners in the context -// of the source object. This is very odd, but should probably be -// supported as an option (both for the source and for the dest). It -// can be thought of as a connection-specific hitch(). -// TODO: more resiliency for 4+ arguments to connect() - -dojo.event = new function(){ - this._canTimeout = dojo.lang.isFunction(dj_global["setTimeout"])||dojo.lang.isAlien(dj_global["setTimeout"]); - - // FIXME: where should we put this method (not here!)? - function interpolateArgs(args, searchForNames){ - var dl = dojo.lang; - var ao = { - srcObj: dj_global, - srcFunc: null, - adviceObj: dj_global, - adviceFunc: null, - aroundObj: null, - aroundFunc: null, - adviceType: (args.length>2) ? args[0] : "after", - precedence: "last", - once: false, - delay: null, - rate: 0, - adviceMsg: false, - maxCalls: -1 - }; - - switch(args.length){ - case 0: return; - case 1: return; - case 2: - ao.srcFunc = args[0]; - ao.adviceFunc = args[1]; - break; - case 3: - if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isString(args[2]))){ - ao.adviceType = "after"; - ao.srcObj = args[0]; - ao.srcFunc = args[1]; - ao.adviceFunc = args[2]; - }else if((dl.isString(args[1]))&&(dl.isString(args[2]))){ - ao.srcFunc = args[1]; - ao.adviceFunc = args[2]; - }else if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isFunction(args[2]))){ - ao.adviceType = "after"; - ao.srcObj = args[0]; - ao.srcFunc = args[1]; - var tmpName = dl.nameAnonFunc(args[2], ao.adviceObj, searchForNames); - ao.adviceFunc = tmpName; - }else if((dl.isFunction(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))){ - ao.adviceType = "after"; - ao.srcObj = dj_global; - var tmpName = dl.nameAnonFunc(args[0], ao.srcObj, searchForNames); - ao.srcFunc = tmpName; - ao.adviceObj = args[1]; - ao.adviceFunc = args[2]; - } - break; - case 4: - if((dl.isObject(args[0]))&&(dl.isObject(args[2]))){ - // we can assume that we've got an old-style "connect" from - // the sigslot school of event attachment. We therefore - // assume after-advice. - ao.adviceType = "after"; - ao.srcObj = args[0]; - ao.srcFunc = args[1]; - ao.adviceObj = args[2]; - ao.adviceFunc = args[3]; - }else if((dl.isString(args[0]))&&(dl.isString(args[1]))&&(dl.isObject(args[2]))){ - ao.adviceType = args[0]; - ao.srcObj = dj_global; - ao.srcFunc = args[1]; - ao.adviceObj = args[2]; - ao.adviceFunc = args[3]; - }else if((dl.isString(args[0]))&&(dl.isFunction(args[1]))&&(dl.isObject(args[2]))){ - ao.adviceType = args[0]; - ao.srcObj = dj_global; - var tmpName = dl.nameAnonFunc(args[1], dj_global, searchForNames); - ao.srcFunc = tmpName; - ao.adviceObj = args[2]; - ao.adviceFunc = args[3]; - }else if((dl.isString(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))&&(dl.isFunction(args[3]))){ - ao.srcObj = args[1]; - ao.srcFunc = args[2]; - var tmpName = dl.nameAnonFunc(args[3], dj_global, searchForNames); - ao.adviceObj = dj_global; - ao.adviceFunc = tmpName; - }else if(dl.isObject(args[1])){ - ao.srcObj = args[1]; - ao.srcFunc = args[2]; - ao.adviceObj = dj_global; - ao.adviceFunc = args[3]; - }else if(dl.isObject(args[2])){ - ao.srcObj = dj_global; - ao.srcFunc = args[1]; - ao.adviceObj = args[2]; - ao.adviceFunc = args[3]; - }else{ - ao.srcObj = ao.adviceObj = ao.aroundObj = dj_global; - ao.srcFunc = args[1]; - ao.adviceFunc = args[2]; - ao.aroundFunc = args[3]; - } - break; - case 6: - ao.srcObj = args[1]; - ao.srcFunc = args[2]; - ao.adviceObj = args[3] - ao.adviceFunc = args[4]; - ao.aroundFunc = args[5]; - ao.aroundObj = dj_global; - break; - default: - ao.srcObj = args[1]; - ao.srcFunc = args[2]; - ao.adviceObj = args[3] - ao.adviceFunc = args[4]; - ao.aroundObj = args[5]; - ao.aroundFunc = args[6]; - ao.once = args[7]; - ao.delay = args[8]; - ao.rate = args[9]; - ao.adviceMsg = args[10]; - ao.maxCalls = (!isNaN(parseInt(args[11]))) ? args[11] : -1; - break; - } - - if(dl.isFunction(ao.aroundFunc)){ - var tmpName = dl.nameAnonFunc(ao.aroundFunc, ao.aroundObj, searchForNames); - ao.aroundFunc = tmpName; - } - - if(dl.isFunction(ao.srcFunc)){ - ao.srcFunc = dl.getNameInObj(ao.srcObj, ao.srcFunc); - } - - if(dl.isFunction(ao.adviceFunc)){ - ao.adviceFunc = dl.getNameInObj(ao.adviceObj, ao.adviceFunc); - } - - if((ao.aroundObj)&&(dl.isFunction(ao.aroundFunc))){ - ao.aroundFunc = dl.getNameInObj(ao.aroundObj, ao.aroundFunc); - } - - if(!ao.srcObj){ - dojo.raise("bad srcObj for srcFunc: "+ao.srcFunc); - } - if(!ao.adviceObj){ - dojo.raise("bad adviceObj for adviceFunc: "+ao.adviceFunc); - } - - if(!ao.adviceFunc){ - dojo.debug("bad adviceFunc for srcFunc: "+ao.srcFunc); - dojo.debugShallow(ao); - } - - return ao; - } - - this.connect = function(/*...*/){ - // summary: - // dojo.event.connect is the glue that holds most Dojo-based - // applications together. Most combinations of arguments are - // supported, with the connect() method attempting to disambiguate - // the implied types of positional parameters. The following will - // all work: - // dojo.event.connect("globalFunctionName1", "globalFunctionName2"); - // dojo.event.connect(functionReference1, functionReference2); - // dojo.event.connect("globalFunctionName1", functionReference2); - // dojo.event.connect(functionReference1, "globalFunctionName2"); - // dojo.event.connect(scope1, "functionName1", "globalFunctionName2"); - // dojo.event.connect("globalFunctionName1", scope2, "functionName2"); - // dojo.event.connect(scope1, "functionName1", scope2, "functionName2"); - // dojo.event.connect("after", scope1, "functionName1", scope2, "functionName2"); - // dojo.event.connect("before", scope1, "functionName1", scope2, "functionName2"); - // dojo.event.connect("around", scope1, "functionName1", - // scope2, "functionName2", - // aroundFunctionReference); - // dojo.event.connect("around", scope1, "functionName1", - // scope2, "functionName2", - // scope3, "aroundFunctionName"); - // dojo.event.connect("before-around", scope1, "functionName1", - // scope2, "functionName2", - // aroundFunctionReference); - // dojo.event.connect("after-around", scope1, "functionName1", - // scope2, "functionName2", - // aroundFunctionReference); - // dojo.event.connect("after-around", scope1, "functionName1", - // scope2, "functionName2", - // scope3, "aroundFunctionName"); - // dojo.event.connect("around", scope1, "functionName1", - // scope2, "functionName2", - // scope3, "aroundFunctionName", true, 30); - // dojo.event.connect("around", scope1, "functionName1", - // scope2, "functionName2", - // scope3, "aroundFunctionName", null, null, 10); - // adviceType: - // Optional. String. One of "before", "after", "around", - // "before-around", or "after-around". FIXME - // srcObj: - // the scope in which to locate/execute the named srcFunc. Along - // with srcFunc, this creates a way to dereference the function to - // call. So if the function in question is "foo.bar", the - // srcObj/srcFunc pair would be foo and "bar", where "bar" is a - // string and foo is an object reference. - // srcFunc: - // the name of the function to connect to. When it is executed, - // the listener being registered with this call will be called. - // The adviceType defines the call order between the source and - // the target functions. - // adviceObj: - // the scope in which to locate/execute the named adviceFunc. - // adviceFunc: - // the name of the function being conected to srcObj.srcFunc - // aroundObj: - // the scope in which to locate/execute the named aroundFunc. - // aroundFunc: - // the name of, or a reference to, the function that will be used - // to mediate the advice call. Around advice requires a special - // unary function that will be passed a "MethodInvocation" object. - // These objects have several important properties, namely: - // - args - // a mutable array of arguments to be passed into the - // wrapped function - // - proceed - // a function that "continues" the invocation. The result - // of this function is the return of the wrapped function. - // You can then manipulate this return before passing it - // back out (or take further action based on it). - // once: - // boolean that determines whether or not this connect() will - // create a new connection if an identical connect() has already - // been made. Defaults to "false". - // delay: - // an optional delay (in ms), as an integer, for dispatch of a - // listener after the source has been fired. - // rate: - // an optional rate throttling parameter (integer, in ms). When - // specified, this particular connection will not fire more than - // once in the interval specified by the rate - // adviceMsg: - // boolean. Should the listener have all the parameters passed in - // as a single argument? - - /* - ao.adviceType = args[0]; - ao.srcObj = args[1]; - ao.srcFunc = args[2]; - ao.adviceObj = args[3] - ao.adviceFunc = args[4]; - ao.aroundObj = args[5]; - ao.aroundFunc = args[6]; - ao.once = args[7]; - ao.delay = args[8]; - ao.rate = args[9]; - ao.adviceMsg = args[10]; - ao.maxCalls = args[11]; - */ - if(arguments.length == 1){ - var ao = arguments[0]; - }else{ - var ao = interpolateArgs(arguments, true); - } - if(dojo.lang.isString(ao.srcFunc) && (ao.srcFunc.toLowerCase() == "onkey") ){ - if(dojo.render.html.ie){ - ao.srcFunc = "onkeydown"; - this.connect(ao); - } - ao.srcFunc = "onkeypress"; - } - - if(dojo.lang.isArray(ao.srcObj) && ao.srcObj!=""){ - var tmpAO = {}; - for(var x in ao){ - tmpAO[x] = ao[x]; - } - var mjps = []; - dojo.lang.forEach(ao.srcObj, function(src){ - if((dojo.render.html.capable)&&(dojo.lang.isString(src))){ - src = dojo.byId(src); - // dojo.debug(src); - } - tmpAO.srcObj = src; - // dojo.debug(tmpAO.srcObj, tmpAO.srcFunc); - // dojo.debug(tmpAO.adviceObj, tmpAO.adviceFunc); - mjps.push(dojo.event.connect.call(dojo.event, tmpAO)); - }); - return mjps; - } - - // FIXME: just doing a "getForMethod()" seems to be enough to put this into infinite recursion!! - var mjp = dojo.event.MethodJoinPoint.getForMethod(ao.srcObj, ao.srcFunc); - if(ao.adviceFunc){ - var mjp2 = dojo.event.MethodJoinPoint.getForMethod(ao.adviceObj, ao.adviceFunc); - } - - mjp.kwAddAdvice(ao); - - // advanced users might want to fsck w/ the join point manually - return mjp; // a MethodJoinPoint object - } - - this.log = function(/*object or funcName*/ a1, /*funcName*/ a2){ - // summary: - // a function that will wrap and log all calls to the specified - // a1.a2() function. If only a1 is passed, it'll be used as a - // function or function name on the global context. Logging will - // be sent to dojo.debug - // a1: - // if a2 is passed, this should be an object. If not, it can be a - // function or function name. - // a2: - // a function name - var kwArgs; - if((arguments.length == 1)&&(typeof a1 == "object")){ - kwArgs = a1; - }else{ - kwArgs = { - srcObj: a1, - srcFunc: a2 - }; - } - kwArgs.adviceFunc = function(){ - var argsStr = []; - for(var x=0; x= this.jp_.around.length){ - return this.jp_.object[this.jp_.methodname].apply(this.jp_.object, this.args); - // return this.jp_.run_before_after(this.object, this.args); - }else{ - var ti = this.jp_.around[this.around_index]; - var mobj = ti[0]||dj_global; - var meth = ti[1]; - return mobj[meth].call(mobj, this); - } -} - - -dojo.event.MethodJoinPoint = function(/*Object*/obj, /*String*/funcName){ - this.object = obj||dj_global; - this.methodname = funcName; - this.methodfunc = this.object[funcName]; - this.squelch = false; - // this.before = []; - // this.after = []; - // this.around = []; -} - -dojo.event.MethodJoinPoint.getForMethod = function(/*Object*/obj, /*String*/funcName){ - // summary: - // "static" class function for returning a MethodJoinPoint from a - // scoped function. If one doesn't exist, one is created. - // obj: - // the scope to search for the function in - // funcName: - // the name of the function to return a MethodJoinPoint for - if(!obj){ obj = dj_global; } - var ofn = obj[funcName]; - if(!ofn){ - // supply a do-nothing method implementation - ofn = obj[funcName] = function(){}; - if(!obj[funcName]){ - // e.g. cannot add to inbuilt objects in IE6 - dojo.raise("Cannot set do-nothing method on that object "+funcName); - } - }else if((typeof ofn != "function")&&(!dojo.lang.isFunction(ofn))&&(!dojo.lang.isAlien(ofn))){ - // FIXME: should we throw an exception here instead? - return null; - } - // we hide our joinpoint instance in obj[funcName + '$joinpoint'] - var jpname = funcName + "$joinpoint"; - var jpfuncname = funcName + "$joinpoint$method"; - var joinpoint = obj[jpname]; - if(!joinpoint){ - var isNode = false; - if(dojo.event["browser"]){ - if( (obj["attachEvent"])|| - (obj["nodeType"])|| - (obj["addEventListener"]) ){ - isNode = true; - dojo.event.browser.addClobberNodeAttrs(obj, [jpname, jpfuncname, funcName]); - } - } - var origArity = ofn.length; - obj[jpfuncname] = ofn; - // joinpoint = obj[jpname] = new dojo.event.MethodJoinPoint(obj, funcName); - joinpoint = obj[jpname] = new dojo.event.MethodJoinPoint(obj, jpfuncname); - - if(!isNode){ - obj[funcName] = function(){ - // var args = []; - // for(var x=0; x -1){ - if(maxCount == 0){ - return; - } - marr[7]--; - } - var undef; - - var to = { - args: [], - jp_: this, - object: obj, - proceed: function(){ - return callObj[callFunc].apply(callObj, to.args); - } - }; - to.args = aargs; - - var delay = parseInt(marr[4]); - var hasDelay = ((!isNaN(delay))&&(marr[4]!==null)&&(typeof marr[4] != "undefined")); - if(marr[5]){ - var rate = parseInt(marr[5]); - var cur = new Date(); - var timerSet = false; - if((marr["last"])&&((cur-marr.last)<=rate)){ - if(dojo.event._canTimeout){ - if(marr["delayTimer"]){ - clearTimeout(marr.delayTimer); - } - var tod = parseInt(rate*2); // is rate*2 naive? - var mcpy = dojo.lang.shallowCopy(marr); - marr.delayTimer = setTimeout(function(){ - // FIXME: on IE at least, event objects from the - // browser can go out of scope. How (or should?) we - // deal with it? - mcpy[5] = 0; - unrollAdvice(mcpy); - }, tod); - } - return; - }else{ - marr.last = cur; - } - } - - // FIXME: need to enforce rates for a connection here! - - if(aroundFunc){ - // NOTE: around advice can't delay since we might otherwise depend - // on execution order! - aroundObj[aroundFunc].call(aroundObj, to); - }else{ - // var tmjp = dojo.event.MethodJoinPoint.getForMethod(obj, methname); - if((hasDelay)&&((dojo.render.html)||(dojo.render.svg))){ // FIXME: the render checks are grotty! - dj_global["setTimeout"](function(){ - if(msg){ - callObj[callFunc].call(callObj, to); - }else{ - callObj[callFunc].apply(callObj, args); - } - }, delay); - }else{ // many environments can't support delay! - if(msg){ - callObj[callFunc].call(callObj, to); - }else{ - callObj[callFunc].apply(callObj, args); - } - } - } - }; - - var unRollSquelch = function(){ - if(this.squelch){ - try{ - return unrollAdvice.apply(this, arguments); - }catch(e){ - dojo.debug(e); - } - }else{ - return unrollAdvice.apply(this, arguments); - } - }; - - if((this["before"])&&(this.before.length>0)){ - // pass a cloned array, if this event disconnects this event forEach on this.before wont work - dojo.lang.forEach(this.before.concat(new Array()), unRollSquelch); - } - - var result; - try{ - if((this["around"])&&(this.around.length>0)){ - var mi = new dojo.event.MethodInvocation(this, obj, args); - result = mi.proceed(); - }else if(this.methodfunc){ - result = this.object[this.methodname].apply(this.object, args); - } - }catch(e){ - if(!this.squelch){ - dojo.debug(e,"when calling",this.methodname,"on",this.object,"with arguments",args); - dojo.raise(e); - } - } - - if((this["after"])&&(this.after.length>0)){ - // see comment on this.before above - dojo.lang.forEach(this.after.concat(new Array()), unRollSquelch); - } - - return (this.methodfunc) ? result : null; - }, - - getArr: function(/*String*/kind){ - // summary: return a list of listeners of the past "kind" - // kind: - // can be one of: "before", "after", "around", "before-around", or - // "after-around" - var type = "after"; - // FIXME: we should be able to do this through props or Array.in() - if((typeof kind == "string")&&(kind.indexOf("before")!=-1)){ - type = "before"; - }else if(kind=="around"){ - type = "around"; - } - if(!this[type]){ this[type] = []; } - return this[type]; // Array - }, - - kwAddAdvice: function(/*Object*/args){ - // summary: - // adds advice to the joinpoint with arguments in a map - // args: - // An object that can have the following properties: - // - adviceType - // - adviceObj - // - adviceFunc - // - aroundObj - // - aroundFunc - // - once - // - delay - // - rate - // - adviceMsg - // - maxCalls - this.addAdvice( args["adviceObj"], args["adviceFunc"], - args["aroundObj"], args["aroundFunc"], - args["adviceType"], args["precedence"], - args["once"], args["delay"], args["rate"], - args["adviceMsg"], args["maxCalls"]); - }, - - addAdvice: function( thisAdviceObj, thisAdvice, - thisAroundObj, thisAround, - adviceType, precedence, - once, delay, rate, asMessage, - maxCalls){ - // summary: - // add advice to this joinpoint using positional parameters - // thisAdviceObj: - // the scope in which to locate/execute the named adviceFunc. - // thisAdviceFunc: - // the name of the function being conected - // thisAroundObj: - // the scope in which to locate/execute the named aroundFunc. - // thisAroundFunc: - // the name of the function that will be used to mediate the - // advice call. - // adviceType: - // Optional. String. One of "before", "after", "around", - // "before-around", or "after-around". FIXME - // once: - // boolean that determines whether or not this advice will create - // a new connection if an identical advice set has already been - // provided. Defaults to "false". - // delay: - // an optional delay (in ms), as an integer, for dispatch of a - // listener after the source has been fired. - // rate: - // an optional rate throttling parameter (integer, in ms). When - // specified, this particular connection will not fire more than - // once in the interval specified by the rate - // adviceMsg: - // boolean. Should the listener have all the parameters passed in - // as a single argument? - // maxCalls: - // Integer. The maximum number of times this connection can be - // used before being auto-disconnected. -1 signals that the - // connection should never be disconnected. - var arr = this.getArr(adviceType); - if(!arr){ - dojo.raise("bad this: " + this); - } - - var ao = [thisAdviceObj, thisAdvice, thisAroundObj, thisAround, delay, rate, asMessage, maxCalls]; - - if(once){ - if(this.hasAdvice(thisAdviceObj, thisAdvice, adviceType, arr) >= 0){ - return; - } - } - - if(precedence == "first"){ - arr.unshift(ao); - }else{ - arr.push(ao); - } - }, - - hasAdvice: function(thisAdviceObj, thisAdvice, adviceType, arr){ - // summary: - // returns the array index of the first existing connection - // betweened the passed advice and this joinpoint. Will be -1 if - // none exists. - // thisAdviceObj: - // the scope in which to locate/execute the named adviceFunc. - // thisAdviceFunc: - // the name of the function being conected - // adviceType: - // Optional. String. One of "before", "after", "around", - // "before-around", or "after-around". FIXME - // arr: - // Optional. The list of advices to search. Will be found via - // adviceType if not passed - if(!arr){ arr = this.getArr(adviceType); } - var ind = -1; - for(var x=0; x=0; i=i-1){ - var el = na[i]; - try{ - if(el && el["__clobberAttrs__"]){ - for(var j=0; j= 65 && unifiedCharCode <= 90 && evt.shiftKey == false){ - unifiedCharCode += 32; - } - if(unifiedCharCode >= 1 && unifiedCharCode <= 26 && evt.ctrlKey){ - unifiedCharCode += 96; // 001-032 = ctrl+[a-z] - } - evt.key = String.fromCharCode(unifiedCharCode); - } - } - } else if(evt["type"] == "keypress"){ - if(dojo.render.html.opera){ - if(evt.which == 0){ - evt.key = evt.keyCode; - }else if(evt.which > 0){ - switch(evt.which){ - case evt.KEY_SHIFT: - case evt.KEY_CTRL: - case evt.KEY_ALT: - case evt.KEY_CAPS_LOCK: - case evt.KEY_NUM_LOCK: - case evt.KEY_SCROLL_LOCK: - break; - case evt.KEY_PAUSE: - case evt.KEY_TAB: - case evt.KEY_BACKSPACE: - case evt.KEY_ENTER: - case evt.KEY_ESCAPE: - evt.key = evt.which; - break; - default: - var unifiedCharCode = evt.which; - if((evt.ctrlKey || evt.altKey || evt.metaKey) && (evt.which >= 65 && evt.which <= 90 && evt.shiftKey == false)){ - unifiedCharCode += 32; - } - evt.key = String.fromCharCode(unifiedCharCode); - } - } - }else if(dojo.render.html.ie){ // catch some IE keys that are hard to get in keyDown - // key combinations were handled in onKeyDown - if(!evt.ctrlKey && !evt.altKey && evt.keyCode >= evt.KEY_SPACE){ - evt.key = String.fromCharCode(evt.keyCode); - } - }else if(dojo.render.html.safari){ - switch(evt.keyCode){ - case 25: evt.key = evt.KEY_TAB; evt.shift = true;break; - case 63232: evt.key = evt.KEY_UP_ARROW; break; - case 63233: evt.key = evt.KEY_DOWN_ARROW; break; - case 63234: evt.key = evt.KEY_LEFT_ARROW; break; - case 63235: evt.key = evt.KEY_RIGHT_ARROW; break; - case 63236: evt.key = evt.KEY_F1; break; - case 63237: evt.key = evt.KEY_F2; break; - case 63238: evt.key = evt.KEY_F3; break; - case 63239: evt.key = evt.KEY_F4; break; - case 63240: evt.key = evt.KEY_F5; break; - case 63241: evt.key = evt.KEY_F6; break; - case 63242: evt.key = evt.KEY_F7; break; - case 63243: evt.key = evt.KEY_F8; break; - case 63244: evt.key = evt.KEY_F9; break; - case 63245: evt.key = evt.KEY_F10; break; - case 63246: evt.key = evt.KEY_F11; break; - case 63247: evt.key = evt.KEY_F12; break; - case 63250: evt.key = evt.KEY_PAUSE; break; - case 63272: evt.key = evt.KEY_DELETE; break; - case 63273: evt.key = evt.KEY_HOME; break; - case 63275: evt.key = evt.KEY_END; break; - case 63276: evt.key = evt.KEY_PAGE_UP; break; - case 63277: evt.key = evt.KEY_PAGE_DOWN; break; - case 63302: evt.key = evt.KEY_INSERT; break; - case 63248://prtscr - case 63249://scrolllock - case 63289://numlock - break; - default: - evt.key = evt.charCode >= evt.KEY_SPACE ? String.fromCharCode(evt.charCode) : evt.keyCode; - } - }else{ - evt.key = evt.charCode > 0 ? String.fromCharCode(evt.charCode) : evt.keyCode; - } - } - } - if(dojo.render.html.ie){ - if(!evt.target){ evt.target = evt.srcElement; } - if(!evt.currentTarget){ evt.currentTarget = (sender ? sender : evt.srcElement); } - if(!evt.layerX){ evt.layerX = evt.offsetX; } - if(!evt.layerY){ evt.layerY = evt.offsetY; } - // FIXME: scroll position query is duped from dojo.html to avoid dependency on that entire module - // DONOT replace the following to use dojo.body(), in IE, document.documentElement should be used - // here rather than document.body - var doc = (evt.srcElement && evt.srcElement.ownerDocument) ? evt.srcElement.ownerDocument : document; - var docBody = ((dojo.render.html.ie55)||(doc["compatMode"] == "BackCompat")) ? doc.body : doc.documentElement; - if(!evt.pageX){ evt.pageX = evt.clientX + (docBody.scrollLeft || 0) } - if(!evt.pageY){ evt.pageY = evt.clientY + (docBody.scrollTop || 0) } - // mouseover - if(evt.type == "mouseover"){ evt.relatedTarget = evt.fromElement; } - // mouseout - if(evt.type == "mouseout"){ evt.relatedTarget = evt.toElement; } - this.currentEvent = evt; - evt.callListener = this.callListener; - evt.stopPropagation = this._stopPropagation; - evt.preventDefault = this._preventDefault; - } - return evt; // Event - } - - this.stopEvent = function(/*Event*/evt){ - // summary: - // prevents propigation and clobbers the default action of the - // passed event - // evt: Optional for IE. The native event object. - if(window.event){ - evt.cancelBubble = true; - evt.returnValue = false; - }else{ - evt.preventDefault(); - evt.stopPropagation(); - } - } -} - -dojo.kwCompoundRequire({ - common: ["dojo.event.common", "dojo.event.topic"], - browser: ["dojo.event.browser"], - dashboard: ["dojo.event.browser"] -}); -dojo.provide("dojo.event.*"); - -dojo.provide("dojo.gfx.color"); - - - -// TODO: rewrite the "x2y" methods to take advantage of the parsing -// abilities of the Color object. Also, beef up the Color -// object (as possible) to parse most common formats - -// takes an r, g, b, a(lpha) value, [r, g, b, a] array, "rgb(...)" string, hex string (#aaa, #aaaaaa, aaaaaaa) -dojo.gfx.color.Color = function(r, g, b, a) { - // dojo.debug("r:", r[0], "g:", r[1], "b:", r[2]); - if(dojo.lang.isArray(r)){ - this.r = r[0]; - this.g = r[1]; - this.b = r[2]; - this.a = r[3]||1.0; - }else if(dojo.lang.isString(r)){ - var rgb = dojo.gfx.color.extractRGB(r); - this.r = rgb[0]; - this.g = rgb[1]; - this.b = rgb[2]; - this.a = g||1.0; - }else if(r instanceof dojo.gfx.color.Color){ - // why does this create a new instance if we were passed one? - this.r = r.r; - this.b = r.b; - this.g = r.g; - this.a = r.a; - }else{ - this.r = r; - this.g = g; - this.b = b; - this.a = a; - } -} - -dojo.gfx.color.Color.fromArray = function(arr) { - return new dojo.gfx.color.Color(arr[0], arr[1], arr[2], arr[3]); -} - -dojo.extend(dojo.gfx.color.Color, { - toRgb: function(includeAlpha) { - if(includeAlpha) { - return this.toRgba(); - } else { - return [this.r, this.g, this.b]; - } - }, - toRgba: function() { - return [this.r, this.g, this.b, this.a]; - }, - toHex: function() { - return dojo.gfx.color.rgb2hex(this.toRgb()); - }, - toCss: function() { - return "rgb(" + this.toRgb().join() + ")"; - }, - toString: function() { - return this.toHex(); // decent default? - }, - blend: function(color, weight){ - var rgb = null; - if(dojo.lang.isArray(color)){ - rgb = color; - }else if(color instanceof dojo.gfx.color.Color){ - rgb = color.toRgb(); - }else{ - rgb = new dojo.gfx.color.Color(color).toRgb(); - } - return dojo.gfx.color.blend(this.toRgb(), rgb, weight); - } -}); - -dojo.gfx.color.named = { - white: [255,255,255], - black: [0,0,0], - red: [255,0,0], - green: [0,255,0], - lime: [0,255,0], - blue: [0,0,255], - navy: [0,0,128], - gray: [128,128,128], - silver: [192,192,192] -}; - -dojo.gfx.color.blend = function(a, b, weight){ - // summary: - // blend colors a and b (both as RGB array or hex strings) with weight - // from -1 to +1, 0 being a 50/50 blend - if(typeof a == "string"){ - return dojo.gfx.color.blendHex(a, b, weight); - } - if(!weight){ - weight = 0; - } - weight = Math.min(Math.max(-1, weight), 1); - - // alex: this interface blows. - // map -1 to 1 to the range 0 to 1 - weight = ((weight + 1)/2); - - var c = []; - - // var stop = (1000*weight); - for(var x = 0; x < 3; x++){ - c[x] = parseInt( b[x] + ( (a[x] - b[x]) * weight) ); - } - return c; -} - -// very convenient blend that takes and returns hex values -// (will get called automatically by blend when blend gets strings) -dojo.gfx.color.blendHex = function(a, b, weight) { - return dojo.gfx.color.rgb2hex(dojo.gfx.color.blend(dojo.gfx.color.hex2rgb(a), dojo.gfx.color.hex2rgb(b), weight)); -} - -// get RGB array from css-style color declarations -dojo.gfx.color.extractRGB = function(color) { - var hex = "0123456789abcdef"; - color = color.toLowerCase(); - if( color.indexOf("rgb") == 0 ) { - var matches = color.match(/rgba*\((\d+), *(\d+), *(\d+)/i); - var ret = matches.splice(1, 3); - return ret; - } else { - var colors = dojo.gfx.color.hex2rgb(color); - if(colors) { - return colors; - } else { - // named color (how many do we support?) - return dojo.gfx.color.named[color] || [255, 255, 255]; - } - } -} - -dojo.gfx.color.hex2rgb = function(hex) { - var hexNum = "0123456789ABCDEF"; - var rgb = new Array(3); - if( hex.indexOf("#") == 0 ) { hex = hex.substring(1); } - hex = hex.toUpperCase(); - if(hex.replace(new RegExp("["+hexNum+"]", "g"), "") != "") { - return null; - } - if( hex.length == 3 ) { - rgb[0] = hex.charAt(0) + hex.charAt(0) - rgb[1] = hex.charAt(1) + hex.charAt(1) - rgb[2] = hex.charAt(2) + hex.charAt(2); - } else { - rgb[0] = hex.substring(0, 2); - rgb[1] = hex.substring(2, 4); - rgb[2] = hex.substring(4); - } - for(var i = 0; i < rgb.length; i++) { - rgb[i] = hexNum.indexOf(rgb[i].charAt(0)) * 16 + hexNum.indexOf(rgb[i].charAt(1)); - } - return rgb; -} - -dojo.gfx.color.rgb2hex = function(r, g, b) { - if(dojo.lang.isArray(r)) { - g = r[1] || 0; - b = r[2] || 0; - r = r[0] || 0; - } - var ret = dojo.lang.map([r, g, b], function(x) { - x = new Number(x); - var s = x.toString(16); - while(s.length < 2) { s = "0" + s; } - return s; - }); - ret.unshift("#"); - return ret.join(""); -} - -dojo.provide("dojo.lfx.Animation"); - - - -/* - Animation package based on Dan Pupius' work: http://pupius.co.uk/js/Toolkit.Drawing.js -*/ -dojo.lfx.Line = function(/*int*/ start, /*int*/ end){ - // summary: dojo.lfx.Line is the object used to generate values - // from a start value to an end value - this.start = start; - this.end = end; - if(dojo.lang.isArray(start)){ - /* start: Array - end: Array - pId: a */ - var diff = []; - dojo.lang.forEach(this.start, function(s,i){ - diff[i] = this.end[i] - s; - }, this); - - this.getValue = function(/*float*/ n){ - var res = []; - dojo.lang.forEach(this.start, function(s, i){ - res[i] = (diff[i] * n) + s; - }, this); - return res; // Array - } - }else{ - var diff = end - start; - - this.getValue = function(/*float*/ n){ - // summary: returns the point on the line - // n: a floating point number greater than 0 and less than 1 - return (diff * n) + this.start; // Decimal - } - } -} - -if((dojo.render.html.khtml)&&(!dojo.render.html.safari)){ - // the cool kids are obviously not using konqueror... - // found a very wierd bug in floats constants, 1.5 evals as 1 - // seems somebody mixed up ints and floats in 3.5.4 ?? - // FIXME: investigate more and post a KDE bug (Fredrik) - dojo.lfx.easeDefault = function(/*Decimal?*/ n){ - // summary: Returns the point for point n on a sin wave. - return (parseFloat("0.5")+((Math.sin( (n+parseFloat("1.5")) * Math.PI))/2)); - } -}else{ - dojo.lfx.easeDefault = function(/*Decimal?*/ n){ - return (0.5+((Math.sin( (n+1.5) * Math.PI))/2)); - } -} - -dojo.lfx.easeIn = function(/*Decimal?*/ n){ - // summary: returns the point on an easing curve - // n: a floating point number greater than 0 and less than 1 - return Math.pow(n, 3); -} - -dojo.lfx.easeOut = function(/*Decimal?*/ n){ - // summary: returns the point on the line - // n: a floating point number greater than 0 and less than 1 - return ( 1 - Math.pow(1 - n, 3) ); -} - -dojo.lfx.easeInOut = function(/*Decimal?*/ n){ - // summary: returns the point on the line - // n: a floating point number greater than 0 and less than 1 - return ( (3 * Math.pow(n, 2)) - (2 * Math.pow(n, 3)) ); -} - -dojo.lfx.IAnimation = function(){ - // summary: dojo.lfx.IAnimation is an interface that implements - // commonly used functions of animation objects -} -dojo.lang.extend(dojo.lfx.IAnimation, { - // public properties - curve: null, - duration: 1000, - easing: null, - repeatCount: 0, - rate: 10, - - // events - handler: null, - beforeBegin: null, - onBegin: null, - onAnimate: null, - onEnd: null, - onPlay: null, - onPause: null, - onStop: null, - - // public methods - play: null, - pause: null, - stop: null, - - connect: function(/*Event*/ evt, /*Object*/ scope, /*Function*/ newFunc){ - // summary: Convenience function. Quickly connect to an event - // of this object and save the old functions connected to it. - // evt: The name of the event to connect to. - // scope: the scope in which to run newFunc. - // newFunc: the function to run when evt is fired. - if(!newFunc){ - /* scope: Function - newFunc: null - pId: f */ - newFunc = scope; - scope = this; - } - newFunc = dojo.lang.hitch(scope, newFunc); - var oldFunc = this[evt]||function(){}; - this[evt] = function(){ - var ret = oldFunc.apply(this, arguments); - newFunc.apply(this, arguments); - return ret; - } - return this; // dojo.lfx.IAnimation - }, - - fire: function(/*Event*/ evt, /*Array*/ args){ - // summary: Convenience function. Fire event "evt" and pass it - // the arguments specified in "args". - // evt: The event to fire. - // args: The arguments to pass to the event. - if(this[evt]){ - this[evt].apply(this, (args||[])); - } - return this; // dojo.lfx.IAnimation - }, - - repeat: function(/*int*/ count){ - // summary: Set the repeat count of this object. - // count: How many times to repeat the animation. - this.repeatCount = count; - return this; // dojo.lfx.IAnimation - }, - - // private properties - _active: false, - _paused: false -}); - -dojo.lfx.Animation = function( /*Object*/ handlers, - /*int*/ duration, - /*dojo.lfx.Line*/ curve, - /*function*/ easing, - /*int*/ repeatCount, - /*int*/ rate){ - // summary - // a generic animation object that fires callbacks into it's handlers - // object at various states - // handlers: { handler: Function?, onstart: Function?, onstop: Function?, onanimate: Function? } - dojo.lfx.IAnimation.call(this); - if(dojo.lang.isNumber(handlers)||(!handlers && duration.getValue)){ - // no handlers argument: - rate = repeatCount; - repeatCount = easing; - easing = curve; - curve = duration; - duration = handlers; - handlers = null; - }else if(handlers.getValue||dojo.lang.isArray(handlers)){ - // no handlers or duration: - rate = easing; - repeatCount = curve; - easing = duration; - curve = handlers; - duration = null; - handlers = null; - } - if(dojo.lang.isArray(curve)){ - /* curve: Array - pId: a */ - this.curve = new dojo.lfx.Line(curve[0], curve[1]); - }else{ - this.curve = curve; - } - if(duration != null && duration > 0){ this.duration = duration; } - if(repeatCount){ this.repeatCount = repeatCount; } - if(rate){ this.rate = rate; } - if(handlers){ - dojo.lang.forEach([ - "handler", "beforeBegin", "onBegin", - "onEnd", "onPlay", "onStop", "onAnimate" - ], function(item){ - if(handlers[item]){ - this.connect(item, handlers[item]); - } - }, this); - } - if(easing && dojo.lang.isFunction(easing)){ - this.easing=easing; - } -} -dojo.inherits(dojo.lfx.Animation, dojo.lfx.IAnimation); -dojo.lang.extend(dojo.lfx.Animation, { - // "private" properties - _startTime: null, - _endTime: null, - _timer: null, - _percent: 0, - _startRepeatCount: 0, - - // public methods - play: function(/*int?*/ delay, /*bool?*/ gotoStart){ - // summary: Start the animation. - // delay: How many milliseconds to delay before starting. - // gotoStart: If true, starts the animation from the beginning; otherwise, - // starts it from its current position. - if(gotoStart){ - clearTimeout(this._timer); - this._active = false; - this._paused = false; - this._percent = 0; - }else if(this._active && !this._paused){ - return this; // dojo.lfx.Animation - } - - this.fire("handler", ["beforeBegin"]); - this.fire("beforeBegin"); - - if(delay > 0){ - setTimeout(dojo.lang.hitch(this, function(){ this.play(null, gotoStart); }), delay); - return this; // dojo.lfx.Animation - } - - this._startTime = new Date().valueOf(); - if(this._paused){ - this._startTime -= (this.duration * this._percent / 100); - } - this._endTime = this._startTime + this.duration; - - this._active = true; - this._paused = false; - - var step = this._percent / 100; - var value = this.curve.getValue(step); - if(this._percent == 0 ){ - if(!this._startRepeatCount){ - this._startRepeatCount = this.repeatCount; - } - this.fire("handler", ["begin", value]); - this.fire("onBegin", [value]); - } - - this.fire("handler", ["play", value]); - this.fire("onPlay", [value]); - - this._cycle(); - return this; // dojo.lfx.Animation - }, - - pause: function(){ - // summary: Pauses a running animation. - clearTimeout(this._timer); - if(!this._active){ return this; /*dojo.lfx.Animation*/} - this._paused = true; - var value = this.curve.getValue(this._percent / 100); - this.fire("handler", ["pause", value]); - this.fire("onPause", [value]); - return this; // dojo.lfx.Animation - }, - - gotoPercent: function(/*Decimal*/ pct, /*bool?*/ andPlay){ - // summary: Sets the progress of the animation. - // pct: A percentage in decimal notation (between and including 0.0 and 1.0). - // andPlay: If true, play the animation after setting the progress. - clearTimeout(this._timer); - this._active = true; - this._paused = true; - this._percent = pct; - if(andPlay){ this.play(); } - return this; // dojo.lfx.Animation - }, - - stop: function(/*bool?*/ gotoEnd){ - // summary: Stops a running animation. - // gotoEnd: If true, the animation will end. - clearTimeout(this._timer); - var step = this._percent / 100; - if(gotoEnd){ - step = 1; - } - var value = this.curve.getValue(step); - this.fire("handler", ["stop", value]); - this.fire("onStop", [value]); - this._active = false; - this._paused = false; - return this; // dojo.lfx.Animation - }, - - status: function(){ - // summary: Returns a string representation of the status of - // the animation. - if(this._active){ - return this._paused ? "paused" : "playing"; // String - }else{ - return "stopped"; // String - } - return this; - }, - - // "private" methods - _cycle: function(){ - clearTimeout(this._timer); - if(this._active){ - var curr = new Date().valueOf(); - var step = (curr - this._startTime) / (this._endTime - this._startTime); - - if(step >= 1){ - step = 1; - this._percent = 100; - }else{ - this._percent = step * 100; - } - - // Perform easing - if((this.easing)&&(dojo.lang.isFunction(this.easing))){ - step = this.easing(step); - } - - var value = this.curve.getValue(step); - this.fire("handler", ["animate", value]); - this.fire("onAnimate", [value]); - - if( step < 1 ){ - this._timer = setTimeout(dojo.lang.hitch(this, "_cycle"), this.rate); - }else{ - this._active = false; - this.fire("handler", ["end"]); - this.fire("onEnd"); - - if(this.repeatCount > 0){ - this.repeatCount--; - this.play(null, true); - }else if(this.repeatCount == -1){ - this.play(null, true); - }else{ - if(this._startRepeatCount){ - this.repeatCount = this._startRepeatCount; - this._startRepeatCount = 0; - } - } - } - } - return this; // dojo.lfx.Animation - } -}); - -dojo.lfx.Combine = function(/*dojo.lfx.IAnimation...*/ animations){ - // summary: An animation object to play animations passed to it at the same time. - dojo.lfx.IAnimation.call(this); - this._anims = []; - this._animsEnded = 0; - - var anims = arguments; - if(anims.length == 1 && (dojo.lang.isArray(anims[0]) || dojo.lang.isArrayLike(anims[0]))){ - /* animations: dojo.lfx.IAnimation[] - pId: a */ - anims = anims[0]; - } - - dojo.lang.forEach(anims, function(anim){ - this._anims.push(anim); - anim.connect("onEnd", dojo.lang.hitch(this, "_onAnimsEnded")); - }, this); -} -dojo.inherits(dojo.lfx.Combine, dojo.lfx.IAnimation); -dojo.lang.extend(dojo.lfx.Combine, { - // private members - _animsEnded: 0, - - // public methods - play: function(/*int?*/ delay, /*bool?*/ gotoStart){ - // summary: Start the animations. - // delay: How many milliseconds to delay before starting. - // gotoStart: If true, starts the animations from the beginning; otherwise, - // starts them from their current position. - if( !this._anims.length ){ return this; /*dojo.lfx.Combine*/} - - this.fire("beforeBegin"); - - if(delay > 0){ - setTimeout(dojo.lang.hitch(this, function(){ this.play(null, gotoStart); }), delay); - return this; // dojo.lfx.Combine - } - - if(gotoStart || this._anims[0].percent == 0){ - this.fire("onBegin"); - } - this.fire("onPlay"); - this._animsCall("play", null, gotoStart); - return this; // dojo.lfx.Combine - }, - - pause: function(){ - // summary: Pauses the running animations. - this.fire("onPause"); - this._animsCall("pause"); - return this; // dojo.lfx.Combine - }, - - stop: function(/*bool?*/ gotoEnd){ - // summary: Stops the running animations. - // gotoEnd: If true, the animations will end. - this.fire("onStop"); - this._animsCall("stop", gotoEnd); - return this; // dojo.lfx.Combine - }, - - // private methods - _onAnimsEnded: function(){ - this._animsEnded++; - if(this._animsEnded >= this._anims.length){ - this.fire("onEnd"); - } - return this; // dojo.lfx.Combine - }, - - _animsCall: function(/*String*/ funcName){ - var args = []; - if(arguments.length > 1){ - for(var i = 1 ; i < arguments.length ; i++){ - args.push(arguments[i]); - } - } - var _this = this; - dojo.lang.forEach(this._anims, function(anim){ - anim[funcName](args); - }, _this); - return this; // dojo.lfx.Combine - } -}); - -dojo.lfx.Chain = function(/*dojo.lfx.IAnimation...*/ animations) { - // summary: An animation object to play animations passed to it - // one after another. - dojo.lfx.IAnimation.call(this); - this._anims = []; - this._currAnim = -1; - - var anims = arguments; - if(anims.length == 1 && (dojo.lang.isArray(anims[0]) || dojo.lang.isArrayLike(anims[0]))){ - /* animations: dojo.lfx.IAnimation[] - pId: a */ - anims = anims[0]; - } - - var _this = this; - dojo.lang.forEach(anims, function(anim, i, anims_arr){ - this._anims.push(anim); - if(i < anims_arr.length - 1){ - anim.connect("onEnd", dojo.lang.hitch(this, "_playNext") ); - }else{ - anim.connect("onEnd", dojo.lang.hitch(this, function(){ this.fire("onEnd"); }) ); - } - }, this); -} -dojo.inherits(dojo.lfx.Chain, dojo.lfx.IAnimation); -dojo.lang.extend(dojo.lfx.Chain, { - // private members - _currAnim: -1, - - // public methods - play: function(/*int?*/ delay, /*bool?*/ gotoStart){ - // summary: Start the animation sequence. - // delay: How many milliseconds to delay before starting. - // gotoStart: If true, starts the sequence from the beginning; otherwise, - // starts it from its current position. - if( !this._anims.length ) { return this; /*dojo.lfx.Chain*/} - if( gotoStart || !this._anims[this._currAnim] ) { - this._currAnim = 0; - } - - var currentAnimation = this._anims[this._currAnim]; - - this.fire("beforeBegin"); - if(delay > 0){ - setTimeout(dojo.lang.hitch(this, function(){ this.play(null, gotoStart); }), delay); - return this; // dojo.lfx.Chain - } - - if(currentAnimation){ - if(this._currAnim == 0){ - this.fire("handler", ["begin", this._currAnim]); - this.fire("onBegin", [this._currAnim]); - } - this.fire("onPlay", [this._currAnim]); - currentAnimation.play(null, gotoStart); - } - return this; // dojo.lfx.Chain - }, - - pause: function(){ - // summary: Pauses the running animation sequence. - if( this._anims[this._currAnim] ) { - this._anims[this._currAnim].pause(); - this.fire("onPause", [this._currAnim]); - } - return this; // dojo.lfx.Chain - }, - - playPause: function(){ - // summary: If the animation sequence is playing, pause it; otherwise, - // play it. - if(this._anims.length == 0){ return this; } - if(this._currAnim == -1){ this._currAnim = 0; } - var currAnim = this._anims[this._currAnim]; - if( currAnim ) { - if( !currAnim._active || currAnim._paused ) { - this.play(); - } else { - this.pause(); - } - } - return this; // dojo.lfx.Chain - }, - - stop: function(){ - // summary: Stops the running animations. - var currAnim = this._anims[this._currAnim]; - if(currAnim){ - currAnim.stop(); - this.fire("onStop", [this._currAnim]); - } - return currAnim; // dojo.lfx.IAnimation - }, - - // private methods - _playNext: function(){ - if( this._currAnim == -1 || this._anims.length == 0 ) { return this; } - this._currAnim++; - if( this._anims[this._currAnim] ){ - this._anims[this._currAnim].play(null, true); - } - return this; // dojo.lfx.Chain - } -}); - -dojo.lfx.combine = function(/*dojo.lfx.IAnimation...*/ animations){ - // summary: Convenience function. Returns a dojo.lfx.Combine created - // using the animations passed in. - var anims = arguments; - if(dojo.lang.isArray(arguments[0])){ - /* animations: dojo.lfx.IAnimation[] - pId: a */ - anims = arguments[0]; - } - if(anims.length == 1){ return anims[0]; } - return new dojo.lfx.Combine(anims); // dojo.lfx.Combine -} - -dojo.lfx.chain = function(/*dojo.lfx.IAnimation...*/ animations){ - // summary: Convenience function. Returns a dojo.lfx.Chain created - // using the animations passed in. - var anims = arguments; - if(dojo.lang.isArray(arguments[0])){ - /* animations: dojo.lfx.IAnimation[] - pId: a */ - anims = arguments[0]; - } - if(anims.length == 1){ return anims[0]; } - return new dojo.lfx.Chain(anims); // dojo.lfx.Combine -} - -dojo.provide("dojo.html.common"); - - - -dojo.lang.mixin(dojo.html, dojo.dom); - -dojo.html.body = function(){ - dojo.deprecated("dojo.html.body() moved to dojo.body()", "0.5"); - return dojo.body(); -} - -// FIXME: we are going to assume that we can throw any and every rendering -// engine into the IE 5.x box model. In Mozilla, we do this w/ CSS. -// Need to investigate for KHTML and Opera - -dojo.html.getEventTarget = function(/* DOMEvent */evt){ - // summary - // Returns the target of an event - if(!evt) { evt = dojo.global().event || {} }; - var t = (evt.srcElement ? evt.srcElement : (evt.target ? evt.target : null)); - while((t)&&(t.nodeType!=1)){ t = t.parentNode; } - return t; // HTMLElement -} - -dojo.html.getViewport = function(){ - // summary - // Returns the dimensions of the viewable area of a browser window - var _window = dojo.global(); - var _document = dojo.doc(); - var w = 0; - var h = 0; - - if(dojo.render.html.mozilla){ - // mozilla - w = _document.documentElement.clientWidth; - h = _window.innerHeight; - }else if(!dojo.render.html.opera && _window.innerWidth){ - //in opera9, dojo.body().clientWidth should be used, instead - //of window.innerWidth/document.documentElement.clientWidth - //so we have to check whether it is opera - w = _window.innerWidth; - h = _window.innerHeight; - } else if (!dojo.render.html.opera && dojo.exists(_document, "documentElement.clientWidth")){ - // IE6 Strict - var w2 = _document.documentElement.clientWidth; - // this lets us account for scrollbars - if(!w || w2 && w2 < w) { - w = w2; - } - h = _document.documentElement.clientHeight; - } else if (dojo.body().clientWidth){ - // IE, Opera - w = dojo.body().clientWidth; - h = dojo.body().clientHeight; - } - return { width: w, height: h }; // object -} - -dojo.html.getScroll = function(){ - // summary - // Returns the scroll position of the document - var _window = dojo.global(); - var _document = dojo.doc(); - var top = _window.pageYOffset || _document.documentElement.scrollTop || dojo.body().scrollTop || 0; - var left = _window.pageXOffset || _document.documentElement.scrollLeft || dojo.body().scrollLeft || 0; - return { - top: top, - left: left, - offset:{ x: left, y: top } // note the change, NOT an Array with added properties. - }; // object -} - -dojo.html.getParentByType = function(/* HTMLElement */node, /* string */type) { - // summary - // Returns the first ancestor of node with tagName type. - var _document = dojo.doc(); - var parent = dojo.byId(node); - type = type.toLowerCase(); - while((parent)&&(parent.nodeName.toLowerCase()!=type)){ - if(parent==(_document["body"]||_document["documentElement"])){ - return null; - } - parent = parent.parentNode; - } - return parent; // HTMLElement -} - -dojo.html.getAttribute = function(/* HTMLElement */node, /* string */attr){ - // summary - // Returns the value of attribute attr from node. - node = dojo.byId(node); - // FIXME: need to add support for attr-specific accessors - if((!node)||(!node.getAttribute)){ - // if(attr !== 'nwType'){ - // alert("getAttr of '" + attr + "' with bad node"); - // } - return null; - } - var ta = typeof attr == 'string' ? attr : new String(attr); - - // first try the approach most likely to succeed - var v = node.getAttribute(ta.toUpperCase()); - if((v)&&(typeof v == 'string')&&(v!="")){ - return v; // string - } - - // try returning the attributes value, if we couldn't get it as a string - if(v && v.value){ - return v.value; // string - } - - // this should work on Opera 7, but it's a little on the crashy side - if((node.getAttributeNode)&&(node.getAttributeNode(ta))){ - return (node.getAttributeNode(ta)).value; // string - }else if(node.getAttribute(ta)){ - return node.getAttribute(ta); // string - }else if(node.getAttribute(ta.toLowerCase())){ - return node.getAttribute(ta.toLowerCase()); // string - } - return null; // string -} - -dojo.html.hasAttribute = function(/* HTMLElement */node, /* string */attr){ - // summary - // Determines whether or not the specified node carries a value for the attribute in question. - return dojo.html.getAttribute(dojo.byId(node), attr) ? true : false; // boolean -} - -dojo.html.getCursorPosition = function(/* DOMEvent */e){ - // summary - // Returns the mouse position relative to the document (not the viewport). - // For example, if you have a document that is 10000px tall, - // but your browser window is only 100px tall, - // if you scroll to the bottom of the document and call this function it - // will return {x: 0, y: 10000} - // NOTE: for events delivered via dojo.event.connect() and/or dojoAttachEvent (for widgets), - // you can just access evt.pageX and evt.pageY, rather than calling this function. - e = e || dojo.global().event; - var cursor = {x:0, y:0}; - if(e.pageX || e.pageY){ - cursor.x = e.pageX; - cursor.y = e.pageY; - }else{ - var de = dojo.doc().documentElement; - var db = dojo.body(); - cursor.x = e.clientX + ((de||db)["scrollLeft"]) - ((de||db)["clientLeft"]); - cursor.y = e.clientY + ((de||db)["scrollTop"]) - ((de||db)["clientTop"]); - } - return cursor; // object -} - -dojo.html.isTag = function(/* HTMLElement */node) { - // summary - // Like dojo.dom.isTag, except case-insensitive - node = dojo.byId(node); - if(node && node.tagName) { - for (var i=1; i, - //which will be treated as an external javascript file in IE - var xscript = dojo.doc().createElement('script'); - xscript.src = "javascript:'dojo.html.createExternalElement=function(doc, tag){ return doc.createElement(tag); }'"; - dojo.doc().getElementsByTagName("head")[0].appendChild(xscript); - })(); - } -}else{ - //for other browsers, simply use document.createElement - //is enough - dojo.html.createExternalElement = function(/* HTMLDocument */doc, /* string */tag){ - // summary - // Creates an element in the HTML document, here for ActiveX activation workaround. - return doc.createElement(tag); // HTMLElement - } -} - -dojo.html._callDeprecated = function(inFunc, replFunc, args, argName, retValue){ - dojo.deprecated("dojo.html." + inFunc, - "replaced by dojo.html." + replFunc + "(" + (argName ? "node, {"+ argName + ": " + argName + "}" : "" ) + ")" + (retValue ? "." + retValue : ""), "0.5"); - var newArgs = []; - if(argName){ var argsIn = {}; argsIn[argName] = args[1]; newArgs.push(args[0]); newArgs.push(argsIn); } - else { newArgs = args } - var ret = dojo.html[replFunc].apply(dojo.html, args); - if(retValue){ return ret[retValue]; } - else { return ret; } -} - -dojo.html.getViewportWidth = function(){ - return dojo.html._callDeprecated("getViewportWidth", "getViewport", arguments, null, "width"); -} -dojo.html.getViewportHeight = function(){ - return dojo.html._callDeprecated("getViewportHeight", "getViewport", arguments, null, "height"); -} -dojo.html.getViewportSize = function(){ - return dojo.html._callDeprecated("getViewportSize", "getViewport", arguments); -} -dojo.html.getScrollTop = function(){ - return dojo.html._callDeprecated("getScrollTop", "getScroll", arguments, null, "top"); -} -dojo.html.getScrollLeft = function(){ - return dojo.html._callDeprecated("getScrollLeft", "getScroll", arguments, null, "left"); -} -dojo.html.getScrollOffset = function(){ - return dojo.html._callDeprecated("getScrollOffset", "getScroll", arguments, null, "offset"); -} - -dojo.provide("dojo.uri.Uri"); - -dojo.uri = new function() { - this.dojoUri = function (/*dojo.uri.Uri||String*/uri) { - // summary: returns a Uri object resolved relative to the dojo root - return new dojo.uri.Uri(dojo.hostenv.getBaseScriptUri(), uri); - } - - this.moduleUri = function(/*String*/module, /*dojo.uri.Uri||String*/uri){ - // summary: returns a Uri object relative to a module - // description: Examples: dojo.uri.moduleUri("dojo.widget","templates/template.html"), or dojo.uri.moduleUri("acme","images/small.png") - var loc = dojo.hostenv.getModuleSymbols(module).join('/'); - if(!loc){ - return null; - } - if(loc.lastIndexOf("/") != loc.length-1){ - loc += "/"; - } - - //If the path is an absolute path (starts with a / or is on another domain/xdomain) - //then don't add the baseScriptUri. - var colonIndex = loc.indexOf(":"); - var slashIndex = loc.indexOf("/"); - if(loc.charAt(0) != "/" && (colonIndex == -1 || colonIndex > slashIndex)){ - loc = dojo.hostenv.getBaseScriptUri() + loc; - } - - return new dojo.uri.Uri(loc,uri); - } - - this.Uri = function (/*dojo.uri.Uri||String...*/) { - // summary: Constructor to create an object representing a URI. - // description: - // Each argument is evaluated in order relative to the next until - // a canonical uri is produced. To get an absolute Uri relative - // to the current document use - // new dojo.uri.Uri(document.baseURI, uri) - - // TODO: support for IPv6, see RFC 2732 - - // resolve uri components relative to each other - var uri = arguments[0]; - for (var i = 1; i < arguments.length; i++) { - if(!arguments[i]) { continue; } - - // Safari doesn't support this.constructor so we have to be explicit - var relobj = new dojo.uri.Uri(arguments[i].toString()); - var uriobj = new dojo.uri.Uri(uri.toString()); - - if ((relobj.path=="")&&(relobj.scheme==null)&&(relobj.authority==null)&&(relobj.query==null)) { - if (relobj.fragment != null) { uriobj.fragment = relobj.fragment; } - relobj = uriobj; - } else if (relobj.scheme == null) { - relobj.scheme = uriobj.scheme; - - if (relobj.authority == null) { - relobj.authority = uriobj.authority; - - if (relobj.path.charAt(0) != "/") { - var path = uriobj.path.substring(0, - uriobj.path.lastIndexOf("/") + 1) + relobj.path; - - var segs = path.split("/"); - for (var j = 0; j < segs.length; j++) { - if (segs[j] == ".") { - if (j == segs.length - 1) { segs[j] = ""; } - else { segs.splice(j, 1); j--; } - } else if (j > 0 && !(j == 1 && segs[0] == "") && - segs[j] == ".." && segs[j-1] != "..") { - - if (j == segs.length - 1) { segs.splice(j, 1); segs[j - 1] = ""; } - else { segs.splice(j - 1, 2); j -= 2; } - } - } - relobj.path = segs.join("/"); - } - } - } - - uri = ""; - if (relobj.scheme != null) { uri += relobj.scheme + ":"; } - if (relobj.authority != null) { uri += "//" + relobj.authority; } - uri += relobj.path; - if (relobj.query != null) { uri += "?" + relobj.query; } - if (relobj.fragment != null) { uri += "#" + relobj.fragment; } - } - - this.uri = uri.toString(); - - // break the uri into its main components - var regexp = "^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"; - var r = this.uri.match(new RegExp(regexp)); - - this.scheme = r[2] || (r[1] ? "" : null); - this.authority = r[4] || (r[3] ? "" : null); - this.path = r[5]; // can never be undefined - this.query = r[7] || (r[6] ? "" : null); - this.fragment = r[9] || (r[8] ? "" : null); - - if (this.authority != null) { - // server based naming authority - regexp = "^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$"; - r = this.authority.match(new RegExp(regexp)); - - this.user = r[3] || null; - this.password = r[4] || null; - this.host = r[5]; - this.port = r[7] || null; - } - - this.toString = function(){ return this.uri; } - } -}; - -dojo.provide("dojo.html.style"); - - - -dojo.html.getClass = function(/* HTMLElement */node){ - // summary - // Returns the string value of the list of CSS classes currently assigned directly - // to the node in question. Returns an empty string if no class attribute is found; - node = dojo.byId(node); - if(!node){ return ""; } - var cs = ""; - if(node.className){ - cs = node.className; - }else if(dojo.html.hasAttribute(node, "class")){ - cs = dojo.html.getAttribute(node, "class"); - } - return cs.replace(/^\s+|\s+$/g, ""); // string -} - -dojo.html.getClasses = function(/* HTMLElement */node) { - // summary - // Returns an array of CSS classes currently assigned directly to the node in question. - // Returns an empty array if no classes are found; - var c = dojo.html.getClass(node); - return (c == "") ? [] : c.split(/\s+/g); // array -} - -dojo.html.hasClass = function(/* HTMLElement */node, /* string */classname){ - // summary - // Returns whether or not the specified classname is a portion of the - // class list currently applied to the node. Does not cover cascaded - // styles, only classes directly applied to the node. - return (new RegExp('(^|\\s+)'+classname+'(\\s+|$)')).test(dojo.html.getClass(node)) // boolean -} - -dojo.html.prependClass = function(/* HTMLElement */node, /* string */classStr){ - // summary - // Adds the specified class to the beginning of the class list on the - // passed node. This gives the specified class the highest precidence - // when style cascading is calculated for the node. Returns true or - // false; indicating success or failure of the operation, respectively. - classStr += " " + dojo.html.getClass(node); - return dojo.html.setClass(node, classStr); // boolean -} - -dojo.html.addClass = function(/* HTMLElement */node, /* string */classStr){ - // summary - // Adds the specified class to the end of the class list on the - // passed &node;. Returns &true; or &false; indicating success or failure. - if (dojo.html.hasClass(node, classStr)) { - return false; - } - classStr = (dojo.html.getClass(node) + " " + classStr).replace(/^\s+|\s+$/g,""); - return dojo.html.setClass(node, classStr); // boolean -} - -dojo.html.setClass = function(/* HTMLElement */node, /* string */classStr){ - // summary - // Clobbers the existing list of classes for the node, replacing it with - // the list given in the 2nd argument. Returns true or false - // indicating success or failure. - node = dojo.byId(node); - var cs = new String(classStr); - try{ - if(typeof node.className == "string"){ - node.className = cs; - }else if(node.setAttribute){ - node.setAttribute("class", classStr); - node.className = cs; - }else{ - return false; - } - }catch(e){ - dojo.debug("dojo.html.setClass() failed", e); - } - return true; -} - -dojo.html.removeClass = function(/* HTMLElement */node, /* string */classStr, /* boolean? */allowPartialMatches){ - // summary - // Removes the className from the node;. Returns true or false indicating success or failure. - try{ - if (!allowPartialMatches) { - var newcs = dojo.html.getClass(node).replace(new RegExp('(^|\\s+)'+classStr+'(\\s+|$)'), "$1$2"); - } else { - var newcs = dojo.html.getClass(node).replace(classStr,''); - } - dojo.html.setClass(node, newcs); - }catch(e){ - dojo.debug("dojo.html.removeClass() failed", e); - } - return true; // boolean -} - -dojo.html.replaceClass = function(/* HTMLElement */node, /* string */newClass, /* string */oldClass) { - // summary - // Replaces 'oldClass' and adds 'newClass' to node - dojo.html.removeClass(node, oldClass); - dojo.html.addClass(node, newClass); -} - -// Enum type for getElementsByClass classMatchType arg: -dojo.html.classMatchType = { - ContainsAll : 0, // all of the classes are part of the node's class (default) - ContainsAny : 1, // any of the classes are part of the node's class - IsOnly : 2 // only all of the classes are part of the node's class -} - - -dojo.html.getElementsByClass = function( - /* string */classStr, - /* HTMLElement? */parent, - /* string? */nodeType, - /* integer? */classMatchType, - /* boolean? */useNonXpath -){ - // summary - // Returns an array of nodes for the given classStr, children of a - // parent, and optionally of a certain nodeType - // FIXME: temporarily set to false because of several dojo tickets related - // to the xpath version not working consistently in firefox. - useNonXpath = false; - var _document = dojo.doc(); - parent = dojo.byId(parent) || _document; - var classes = classStr.split(/\s+/g); - var nodes = []; - if( classMatchType != 1 && classMatchType != 2 ) classMatchType = 0; // make it enum - var reClass = new RegExp("(\\s|^)((" + classes.join(")|(") + "))(\\s|$)"); - var srtLength = classes.join(" ").length; - var candidateNodes = []; - - if(!useNonXpath && _document.evaluate) { // supports dom 3 xpath - var xpath = ".//" + (nodeType || "*") + "[contains("; - if(classMatchType != dojo.html.classMatchType.ContainsAny){ - xpath += "concat(' ',@class,' '), ' " + - classes.join(" ') and contains(concat(' ',@class,' '), ' ") + - " ')"; - if (classMatchType == 2) { - xpath += " and string-length(@class)="+srtLength+"]"; - }else{ - xpath += "]"; - } - }else{ - xpath += "concat(' ',@class,' '), ' " + - classes.join(" ') or contains(concat(' ',@class,' '), ' ") + - " ')]"; - } - var xpathResult = _document.evaluate(xpath, parent, null, XPathResult.ANY_TYPE, null); - var result = xpathResult.iterateNext(); - while(result){ - try{ - candidateNodes.push(result); - result = xpathResult.iterateNext(); - }catch(e){ break; } - } - return candidateNodes; // NodeList - }else{ - if(!nodeType){ - nodeType = "*"; - } - candidateNodes = parent.getElementsByTagName(nodeType); - - var node, i = 0; - outer: - while(node = candidateNodes[i++]){ - var nodeClasses = dojo.html.getClasses(node); - if(nodeClasses.length == 0){ continue outer; } - var matches = 0; - - for(var j = 0; j < nodeClasses.length; j++){ - if(reClass.test(nodeClasses[j])){ - if(classMatchType == dojo.html.classMatchType.ContainsAny){ - nodes.push(node); - continue outer; - }else{ - matches++; - } - }else{ - if(classMatchType == dojo.html.classMatchType.IsOnly){ - continue outer; - } - } - } - - if(matches == classes.length){ - if( (classMatchType == dojo.html.classMatchType.IsOnly)&& - (matches == nodeClasses.length)){ - nodes.push(node); - }else if(classMatchType == dojo.html.classMatchType.ContainsAll){ - nodes.push(node); - } - } - } - return nodes; // NodeList - } -} -dojo.html.getElementsByClassName = dojo.html.getElementsByClass; - -dojo.html.toCamelCase = function(/* string */selector){ - // summary - // Translates a CSS selector string to a camel-cased one. - var arr = selector.split('-'), cc = arr[0]; - for(var i = 1; i < arr.length; i++) { - cc += arr[i].charAt(0).toUpperCase() + arr[i].substring(1); - } - return cc; // string -} - -dojo.html.toSelectorCase = function(/* string */selector){ - // summary - // Translates a camel cased string to a selector cased one. - return selector.replace(/([A-Z])/g, "-$1" ).toLowerCase(); // string -} - -if (dojo.render.html.ie) { - // IE branch - dojo.html.getComputedStyle = function(/*HTMLElement|String*/node, /*String*/property, /*String*/value) { - // summary - // Get the computed style value for style "property" on "node" (IE). - node = dojo.byId(node); // FIXME: remove ability to access nodes by id for this time-critical function - if(!node || !node.currentStyle){return value;} - // FIXME: standardize on camel-case input to improve speed - return node.currentStyle[dojo.html.toCamelCase(property)]; // String - } - // SJM: getComputedStyle should be abandoned and replaced with the below function. - // All our supported browsers can return CSS2 compliant CssStyleDeclaration objects - // which can be queried directly for multiple styles. - dojo.html.getComputedStyles = function(/*HTMLElement*/node) { - // summary - // Get a style object containing computed styles for HTML Element node (IE). - return node.currentStyle; // CSSStyleDeclaration - } -} else { - // non-IE branch - dojo.html.getComputedStyle = function(/*HTMLElement|String*/node, /*String*/property, /*Any*/value) { - // summary - // Get the computed style value for style "property" on "node" (non-IE). - node = dojo.byId(node); - if(!node || !node.style){return value;} - var s = document.defaultView.getComputedStyle(node, null); - // s may be null on Safari - return (s&&s[dojo.html.toCamelCase(property)])||''; // String - } - // SJM: getComputedStyle should be abandoned and replaced with the below function. - // All our supported browsers can return CSS2 compliant CssStyleDeclaration objects - // which can be queried directly for multiple styles. - dojo.html.getComputedStyles = function(node) { - // summary - // Get a style object containing computed styles for HTML Element node (non-IE). - return document.defaultView.getComputedStyle(node, null); // CSSStyleDeclaration - } -} - -dojo.html.getStyleProperty = function(/* HTMLElement */node, /* string */cssSelector){ - // summary - // Returns the value of the passed style - node = dojo.byId(node); - return (node && node.style ? node.style[dojo.html.toCamelCase(cssSelector)] : undefined); // string -} - -dojo.html.getStyle = function(/* HTMLElement */node, /* string */cssSelector){ - // summary - // Returns the computed value of the passed style - var value = dojo.html.getStyleProperty(node, cssSelector); - return (value ? value : dojo.html.getComputedStyle(node, cssSelector)); // string || integer -} - -dojo.html.setStyle = function(/* HTMLElement */node, /* string */cssSelector, /* string */value){ - // summary - // Set the value of passed style on node - node = dojo.byId(node); - if(node && node.style){ - var camelCased = dojo.html.toCamelCase(cssSelector); - node.style[camelCased] = value; - } -} - -dojo.html.setStyleText = function (/* HTMLElement */target, /* string */text) { - // summary - // Try to set the entire cssText property of the passed target; equiv of setting style attribute. - try { - target.style.cssText = text; - } catch (e) { - target.setAttribute("style", text); - } -} - -dojo.html.copyStyle = function(/* HTMLElement */target, /* HTMLElement */source){ - // summary - // work around for opera which doesn't have cssText, and for IE which fails on setAttribute - if(!source.style.cssText){ - target.setAttribute("style", source.getAttribute("style")); - }else{ - target.style.cssText = source.style.cssText; - } - dojo.html.addClass(target, dojo.html.getClass(source)); -} - -dojo.html.getUnitValue = function(/* HTMLElement */node, /* string */cssSelector, /* boolean? */autoIsZero){ - // summary - // Get the value of passed selector, with the specific units used - var s = dojo.html.getComputedStyle(node, cssSelector); - if((!s)||((s == 'auto')&&(autoIsZero))){ - return { value: 0, units: 'px' }; // object - } - // FIXME: is regex inefficient vs. parseInt or some manual test? - var match = s.match(/(\-?[\d.]+)([a-z%]*)/i); - if (!match){return dojo.html.getUnitValue.bad;} - return { value: Number(match[1]), units: match[2].toLowerCase() }; // object -} -dojo.html.getUnitValue.bad = { value: NaN, units: '' }; - -if (dojo.render.html.ie) { - // IE branch - dojo.html.toPixelValue = function(/* HTMLElement */element, /* String */styleValue){ - // summary - // Extract value in pixels from styleValue (IE version). - // If a value cannot be extracted, zero is returned. - if(!styleValue){return 0;} - if(styleValue.slice(-2) == 'px'){return parseFloat(styleValue);} - var pixelValue = 0; - with(element){ - var sLeft = style.left; - var rsLeft = runtimeStyle.left; - runtimeStyle.left = currentStyle.left; - try { - style.left = styleValue || 0; - pixelValue = style.pixelLeft; - style.left = sLeft; - runtimeStyle.left = rsLeft; - }catch(e){ - // FIXME: it's possible for styleValue to be incompatible with - // style.left. In particular, border width values of - // "thick", "medium", or "thin" will provoke an exception. - } - } - return pixelValue; // Number - } -} else { - // non-IE branch - dojo.html.toPixelValue = function(/* HTMLElement */element, /* String */styleValue){ - // summary - // Extract value in pixels from styleValue (non-IE version). - // If a value cannot be extracted, zero is returned. - return (styleValue && (styleValue.slice(-2)=='px') ? parseFloat(styleValue) : 0); // Number - } -} - -dojo.html.getPixelValue = function(/* HTMLElement */node, /* string */styleProperty, /* boolean? */autoIsZero){ - // summary - // Get a computed style value, in pixels. - // node: HTMLElement - // Node to interrogate - // styleProperty: String - // Style property to query, in either css-selector or camelCase (property) format. - // autoIsZero: Boolean - // Deprecated. Any value that cannot be converted to pixels is returned as zero. - // - // summary - // Get the value of passed selector in pixels. - // - return dojo.html.toPixelValue(node, dojo.html.getComputedStyle(node, styleProperty)); -} - -dojo.html.setPositivePixelValue = function(/* HTMLElement */node, /* string */selector, /* integer */value){ - // summary - // Attempt to set the value of selector on node as a positive pixel value. - if(isNaN(value)){return false;} - node.style[selector] = Math.max(0, value) + 'px'; - return true; // boolean -} - -dojo.html.styleSheet = null; - -// FIXME: this is a really basic stub for adding and removing cssRules, but -// it assumes that you know the index of the cssRule that you want to add -// or remove, making it less than useful. So we need something that can -// search for the selector that you you want to remove. -dojo.html.insertCssRule = function(/* string */selector, /* string */declaration, /* integer? */index) { - // summary - // Attempt to insert declaration as selector on the internal stylesheet; if index try to set it there. - if (!dojo.html.styleSheet) { - if (document.createStyleSheet) { // IE - dojo.html.styleSheet = document.createStyleSheet(); - } else if (document.styleSheets[0]) { // rest - // FIXME: should create a new style sheet here - // fall back on an exsiting style sheet - dojo.html.styleSheet = document.styleSheets[0]; - } else { - return null; // integer - } // fail - } - - if (arguments.length < 3) { // index may == 0 - if (dojo.html.styleSheet.cssRules) { // W3 - index = dojo.html.styleSheet.cssRules.length; - } else if (dojo.html.styleSheet.rules) { // IE - index = dojo.html.styleSheet.rules.length; - } else { - return null; // integer - } // fail - } - - if (dojo.html.styleSheet.insertRule) { // W3 - var rule = selector + " { " + declaration + " }"; - return dojo.html.styleSheet.insertRule(rule, index); // integer - } else if (dojo.html.styleSheet.addRule) { // IE - return dojo.html.styleSheet.addRule(selector, declaration, index); // integer - } else { - return null; // integer - } // fail -} - -dojo.html.removeCssRule = function(/* integer? */index){ - // summary - // Attempt to remove the rule at index. - if(!dojo.html.styleSheet){ - dojo.debug("no stylesheet defined for removing rules"); - return false; - } - if(dojo.render.html.ie){ - if(!index){ - index = dojo.html.styleSheet.rules.length; - dojo.html.styleSheet.removeRule(index); - } - }else if(document.styleSheets[0]){ - if(!index){ - index = dojo.html.styleSheet.cssRules.length; - } - dojo.html.styleSheet.deleteRule(index); - } - return true; // boolean -} - -dojo.html._insertedCssFiles = []; // cache container needed because IE reformats cssText when added to DOM -dojo.html.insertCssFile = function(/* string */URI, /* HTMLDocument? */doc, /* boolean? */checkDuplicates, /* boolean */fail_ok){ - // summary - // calls css by XmlHTTP and inserts it into DOM as - if(!URI){ return; } - if(!doc){ doc = document; } - var cssStr = dojo.hostenv.getText(URI, false, fail_ok); - if(cssStr===null){ return; } - cssStr = dojo.html.fixPathsInCssText(cssStr, URI); - - if(checkDuplicates){ - var idx = -1, node, ent = dojo.html._insertedCssFiles; - for(var i = 0; i < ent.length; i++){ - if((ent[i].doc == doc) && (ent[i].cssText == cssStr)){ - idx = i; node = ent[i].nodeRef; - break; - } - } - // make sure we havent deleted our node - if(node){ - var styles = doc.getElementsByTagName("style"); - for(var i = 0; i < styles.length; i++){ - if(styles[i] == node){ - return; - } - } - // delete this entry - dojo.html._insertedCssFiles.shift(idx, 1); - } - } - - var style = dojo.html.insertCssText(cssStr, doc); - dojo.html._insertedCssFiles.push({'doc': doc, 'cssText': cssStr, 'nodeRef': style}); - - // insert custom attribute ex dbgHref="../foo.css" usefull when debugging in DOM inspectors, no? - if(style && djConfig.isDebug){ - style.setAttribute("dbgHref", URI); - } - return style; // HTMLStyleElement -} - -dojo.html.insertCssText = function(/* string */cssStr, /* HTMLDocument? */doc, /* string? */URI){ - // summary - // Attempt to insert CSS rules into the document through inserting a style element - // DomNode Style = insertCssText(String ".dojoMenu {color: green;}"[, DomDoc document, dojo.uri.Uri Url ]) - if(!cssStr){ - return; // HTMLStyleElement - } - if(!doc){ doc = document; } - if(URI){// fix paths in cssStr - cssStr = dojo.html.fixPathsInCssText(cssStr, URI); - } - var style = doc.createElement("style"); - style.setAttribute("type", "text/css"); - // IE is b0rken enough to require that we add the element to the doc - // before changing it's properties - var head = doc.getElementsByTagName("head")[0]; - if(!head){ // must have a head tag - dojo.debug("No head tag in document, aborting styles"); - return; // HTMLStyleElement - }else{ - head.appendChild(style); - } - if(style.styleSheet){// IE - var setFunc = function(){ - try{ - style.styleSheet.cssText = cssStr; - }catch(e){ dojo.debug(e); } - }; - if(style.styleSheet.disabled){ - setTimeout(setFunc, 10); - }else{ - setFunc(); - } - }else{ // w3c - var cssText = doc.createTextNode(cssStr); - style.appendChild(cssText); - } - return style; // HTMLStyleElement -} - -dojo.html.fixPathsInCssText = function(/* string */cssStr, /* string */URI){ - // summary - // usage: cssText comes from dojoroot/src/widget/templates/Foobar.css - // it has .dojoFoo { background-image: url(images/bar.png);} then uri should point to dojoroot/src/widget/templates/ - if(!cssStr || !URI){ return; } - var match, str = "", url = "", urlChrs = "[\\t\\s\\w\\(\\)\\/\\.\\\\'\"-:#=&?~]+"; - var regex = new RegExp('url\\(\\s*('+urlChrs+')\\s*\\)'); - var regexProtocol = /(file|https?|ftps?):\/\//; - regexTrim = new RegExp("^[\\s]*(['\"]?)("+urlChrs+")\\1[\\s]*?$"); - if(dojo.render.html.ie55 || dojo.render.html.ie60){ - var regexIe = new RegExp("AlphaImageLoader\\((.*)src\=['\"]("+urlChrs+")['\"]"); - // TODO: need to decide how to handle relative paths and AlphaImageLoader see #1441 - // current implementation breaks on build with intern_strings - while(match = regexIe.exec(cssStr)){ - url = match[2].replace(regexTrim, "$2"); - if(!regexProtocol.exec(url)){ - url = (new dojo.uri.Uri(URI, url).toString()); - } - str += cssStr.substring(0, match.index) + "AlphaImageLoader(" + match[1] + "src='" + url + "'"; - cssStr = cssStr.substr(match.index + match[0].length); - } - cssStr = str + cssStr; - str = ""; - } - - while(match = regex.exec(cssStr)){ - url = match[1].replace(regexTrim, "$2"); - if(!regexProtocol.exec(url)){ - url = (new dojo.uri.Uri(URI, url).toString()); - } - str += cssStr.substring(0, match.index) + "url(" + url + ")"; - cssStr = cssStr.substr(match.index + match[0].length); - } - return str + cssStr; // string -} - -dojo.html.setActiveStyleSheet = function(/* string */title){ - // summary - // Activate style sheet with specified title. - var i = 0, a, els = dojo.doc().getElementsByTagName("link"); - while (a = els[i++]) { - if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")){ - a.disabled = true; - if (a.getAttribute("title") == title) { a.disabled = false; } - } - } -} - -dojo.html.getActiveStyleSheet = function(){ - // summary - // return the title of the currently active stylesheet - var i = 0, a, els = dojo.doc().getElementsByTagName("link"); - while (a = els[i++]) { - if (a.getAttribute("rel").indexOf("style") != -1 - && a.getAttribute("title") - && !a.disabled - ){ - return a.getAttribute("title"); // string - } - } - return null; // string -} - -dojo.html.getPreferredStyleSheet = function(){ - // summary - // Return the preferred stylesheet title (i.e. link without alt attribute) - var i = 0, a, els = dojo.doc().getElementsByTagName("link"); - while (a = els[i++]) { - if(a.getAttribute("rel").indexOf("style") != -1 - && a.getAttribute("rel").indexOf("alt") == -1 - && a.getAttribute("title") - ){ - return a.getAttribute("title"); // string - } - } - return null; // string -} - -dojo.html.applyBrowserClass = function(/* HTMLElement */node){ - // summary - // Applies pre-set class names based on browser & version to the passed node. - // Modified version of Morris' CSS hack. - var drh=dojo.render.html; - var classes = { - dj_ie: drh.ie, - dj_ie55: drh.ie55, - dj_ie6: drh.ie60, - dj_ie7: drh.ie70, - dj_iequirks: drh.ie && drh.quirks, - dj_opera: drh.opera, - dj_opera8: drh.opera && (Math.floor(dojo.render.version)==8), - dj_opera9: drh.opera && (Math.floor(dojo.render.version)==9), - dj_khtml: drh.khtml, - dj_safari: drh.safari, - dj_gecko: drh.mozilla - }; // no dojo unsupported browsers - for(var p in classes){ - if(classes[p]){ - dojo.html.addClass(node, p); - } - } -}; - -dojo.provide("dojo.html.display"); - - -dojo.html._toggle = function(node, tester, setter){ - node = dojo.byId(node); - setter(node, !tester(node)); - return tester(node); -} - -dojo.html.show = function(/* HTMLElement */node){ - // summary - // Show the passed element by reverting display property set by dojo.html.hide - node = dojo.byId(node); - if(dojo.html.getStyleProperty(node, 'display')=='none'){ - dojo.html.setStyle(node, 'display', (node.dojoDisplayCache||'')); - node.dojoDisplayCache = undefined; // cannot use delete on a node in IE6 - } -} - -dojo.html.hide = function(/* HTMLElement */node){ - // summary - // Hide the passed element by setting display:none - node = dojo.byId(node); - if(typeof node["dojoDisplayCache"] == "undefined"){ // it could == '', so we cannot say !node.dojoDisplayCount - var d = dojo.html.getStyleProperty(node, 'display') - if(d!='none'){ - node.dojoDisplayCache = d; - } - } - dojo.html.setStyle(node, 'display', 'none'); -} - -dojo.html.setShowing = function(/* HTMLElement */node, /* boolean? */showing){ - // summary - // Calls show() if showing is true, hide() otherwise - dojo.html[(showing ? 'show' : 'hide')](node); -} - -dojo.html.isShowing = function(/* HTMLElement */node){ - // summary - // Returns whether the element is displayed or not. - // FIXME: returns true if node is bad, isHidden would be easier to make correct - return (dojo.html.getStyleProperty(node, 'display') != 'none'); // boolean -} - -dojo.html.toggleShowing = function(/* HTMLElement */node){ - // summary - // Call setShowing() on node with the complement of isShowing(), then return the new value of isShowing() - return dojo.html._toggle(node, dojo.html.isShowing, dojo.html.setShowing); // boolean -} - -// Simple mapping of tag names to display values -// FIXME: simplistic -dojo.html.displayMap = { tr: '', td: '', th: '', img: 'inline', span: 'inline', input: 'inline', button: 'inline' }; - -dojo.html.suggestDisplayByTagName = function(/* HTMLElement */node){ - // summary - // Suggest a value for the display property that will show 'node' based on it's tag - node = dojo.byId(node); - if(node && node.tagName){ - var tag = node.tagName.toLowerCase(); - return (tag in dojo.html.displayMap ? dojo.html.displayMap[tag] : 'block'); // string - } -} - -dojo.html.setDisplay = function(/* HTMLElement */node, /* string */display){ - // summary - // Sets the value of style.display to value of 'display' parameter if it is a string. - // Otherwise, if 'display' is false, set style.display to 'none'. - // Finally, set 'display' to a suggested display value based on the node's tag - dojo.html.setStyle(node, 'display', ((display instanceof String || typeof display == "string") ? display : (display ? dojo.html.suggestDisplayByTagName(node) : 'none'))); -} - -dojo.html.isDisplayed = function(/* HTMLElement */node){ - // summary - // Is true if the the computed display style for node is not 'none' - // FIXME: returns true if node is bad, isNotDisplayed would be easier to make correct - return (dojo.html.getComputedStyle(node, 'display') != 'none'); // boolean -} - -dojo.html.toggleDisplay = function(/* HTMLElement */node){ - // summary - // Call setDisplay() on node with the complement of isDisplayed(), then - // return the new value of isDisplayed() - return dojo.html._toggle(node, dojo.html.isDisplayed, dojo.html.setDisplay); // boolean -} - -dojo.html.setVisibility = function(/* HTMLElement */node, /* string */visibility){ - // summary - // Sets the value of style.visibility to value of 'visibility' parameter if it is a string. - // Otherwise, if 'visibility' is false, set style.visibility to 'hidden'. Finally, set style.visibility to 'visible'. - dojo.html.setStyle(node, 'visibility', ((visibility instanceof String || typeof visibility == "string") ? visibility : (visibility ? 'visible' : 'hidden'))); -} - -dojo.html.isVisible = function(/* HTMLElement */node){ - // summary - // Returns true if the the computed visibility style for node is not 'hidden' - // FIXME: returns true if node is bad, isInvisible would be easier to make correct - return (dojo.html.getComputedStyle(node, 'visibility') != 'hidden'); // boolean -} - -dojo.html.toggleVisibility = function(node){ - // summary - // Call setVisibility() on node with the complement of isVisible(), then return the new value of isVisible() - return dojo.html._toggle(node, dojo.html.isVisible, dojo.html.setVisibility); // boolean -} - -dojo.html.setOpacity = function(/* HTMLElement */node, /* float */opacity, /* boolean? */dontFixOpacity){ - // summary - // Sets the opacity of node in a cross-browser way. - // float between 0.0 (transparent) and 1.0 (opaque) - node = dojo.byId(node); - var h = dojo.render.html; - if(!dontFixOpacity){ - if( opacity >= 1.0){ - if(h.ie){ - dojo.html.clearOpacity(node); - return; - }else{ - opacity = 0.999999; - } - }else if( opacity < 0.0){ opacity = 0; } - } - if(h.ie){ - if(node.nodeName.toLowerCase() == "tr"){ - // FIXME: is this too naive? will we get more than we want? - var tds = node.getElementsByTagName("td"); - for(var x=0; x= 0.999999 ? 1.0 : Number(opac); // float -} - - -dojo.provide("dojo.html.color"); - - - - -dojo.html.getBackgroundColor = function(/* HTMLElement */node){ - // summary - // returns the background color of the passed node as a 32-bit color (RGBA) - node = dojo.byId(node); - var color; - do{ - color = dojo.html.getStyle(node, "background-color"); - // Safari doesn't say "transparent" - if(color.toLowerCase() == "rgba(0, 0, 0, 0)") { color = "transparent"; } - if(node == document.getElementsByTagName("body")[0]) { node = null; break; } - node = node.parentNode; - }while(node && dojo.lang.inArray(["transparent", ""], color)); - if(color == "transparent"){ - color = [255, 255, 255, 0]; - }else{ - color = dojo.gfx.color.extractRGB(color); - } - return color; // array -} - -dojo.provide("dojo.html.layout"); - - - - - -dojo.html.sumAncestorProperties = function(/* HTMLElement */node, /* string */prop){ - // summary - // Returns the sum of the passed property on all ancestors of node. - node = dojo.byId(node); - if(!node){ return 0; } // FIXME: throw an error? - - var retVal = 0; - while(node){ - if(dojo.html.getComputedStyle(node, 'position') == 'fixed'){ - return 0; - } - var val = node[prop]; - if(val){ - retVal += val - 0; - if(node==dojo.body()){ break; }// opera and khtml #body & #html has the same values, we only need one value - } - node = node.parentNode; - } - return retVal; // integer -} - -dojo.html.setStyleAttributes = function(/* HTMLElement */node, /* string */attributes) { - // summary - // allows a dev to pass a string similar to what you'd pass in style="", and apply it to a node. - node = dojo.byId(node); - var splittedAttribs=attributes.replace(/(;)?\s*$/, "").split(";"); - for(var i=0; i0){ - ret.x += isNaN(n) ? 0 : n; - } - var m = curnode["offsetTop"]; - ret.y += isNaN(m) ? 0 : m; - curnode = curnode.offsetParent; - }while((curnode != endNode)&&(curnode != null)); - }else if(node["x"]&&node["y"]){ - ret.x += isNaN(node.x) ? 0 : node.x; - ret.y += isNaN(node.y) ? 0 : node.y; - } - } - - // account for document scrolling! - if(includeScroll){ - var scroll = dojo.html.getScroll(); - ret.y += scroll.top; - ret.x += scroll.left; - } - - var extentFuncArray=[dojo.html.getPaddingExtent, dojo.html.getBorderExtent, dojo.html.getMarginExtent]; - if(nativeBoxType > targetBoxType){ - for(var i=targetBoxType;inativeBoxType;--i){ - ret.y -= extentFuncArray[i-1](node, 'top'); - ret.x -= extentFuncArray[i-1](node, 'left'); - } - } - ret.top = ret.y; - ret.left = ret.x; - return ret; // object -} - -dojo.html.isPositionAbsolute = function(/* HTMLElement */node){ - // summary - // Returns true if the element is absolutely positioned. - return (dojo.html.getComputedStyle(node, 'position') == 'absolute'); // boolean -} - -dojo.html._sumPixelValues = function(/* HTMLElement */node, selectors, autoIsZero){ - var total = 0; - for(var x=0; x 4 ) { coords.pop(); } - var ret = { - left: coords[0], - top: coords[1], - width: coords[2], - height: coords[3] - }; - }else if(!coords.nodeType && !(coords instanceof String || typeof coords == "string") && - ('width' in coords || 'height' in coords || 'left' in coords || - 'x' in coords || 'top' in coords || 'y' in coords)){ - // coords is a coordinate object or at least part of one - var ret = { - left: coords.left||coords.x||0, - top: coords.top||coords.y||0, - width: coords.width||0, - height: coords.height||0 - }; - }else{ - // coords is an dom object (or dom object id); return it's coordinates - var node = dojo.byId(coords); - var pos = dojo.html.abs(node, includeScroll, boxtype); - var marginbox = dojo.html.getMarginBox(node); - var ret = { - left: pos.left, - top: pos.top, - width: marginbox.width, - height: marginbox.height - }; - } - ret.x = ret.left; - ret.y = ret.top; - return ret; // object -} - -dojo.html.setMarginBoxWidth = dojo.html.setOuterWidth = function(node, width){ - return dojo.html._callDeprecated("setMarginBoxWidth", "setMarginBox", arguments, "width"); -} -dojo.html.setMarginBoxHeight = dojo.html.setOuterHeight = function(){ - return dojo.html._callDeprecated("setMarginBoxHeight", "setMarginBox", arguments, "height"); -} -dojo.html.getMarginBoxWidth = dojo.html.getOuterWidth = function(){ - return dojo.html._callDeprecated("getMarginBoxWidth", "getMarginBox", arguments, null, "width"); -} -dojo.html.getMarginBoxHeight = dojo.html.getOuterHeight = function(){ - return dojo.html._callDeprecated("getMarginBoxHeight", "getMarginBox", arguments, null, "height"); -} -dojo.html.getTotalOffset = function(node, type, includeScroll){ - return dojo.html._callDeprecated("getTotalOffset", "getAbsolutePosition", arguments, null, type); -} -dojo.html.getAbsoluteX = function(node, includeScroll){ - return dojo.html._callDeprecated("getAbsoluteX", "getAbsolutePosition", arguments, null, "x"); -} -dojo.html.getAbsoluteY = function(node, includeScroll){ - return dojo.html._callDeprecated("getAbsoluteY", "getAbsolutePosition", arguments, null, "y"); -} -dojo.html.totalOffsetLeft = function(node, includeScroll){ - return dojo.html._callDeprecated("totalOffsetLeft", "getAbsolutePosition", arguments, null, "left"); -} -dojo.html.totalOffsetTop = function(node, includeScroll){ - return dojo.html._callDeprecated("totalOffsetTop", "getAbsolutePosition", arguments, null, "top"); -} -dojo.html.getMarginWidth = function(node){ - return dojo.html._callDeprecated("getMarginWidth", "getMargin", arguments, null, "width"); -} -dojo.html.getMarginHeight = function(node){ - return dojo.html._callDeprecated("getMarginHeight", "getMargin", arguments, null, "height"); -} -dojo.html.getBorderWidth = function(node){ - return dojo.html._callDeprecated("getBorderWidth", "getBorder", arguments, null, "width"); -} -dojo.html.getBorderHeight = function(node){ - return dojo.html._callDeprecated("getBorderHeight", "getBorder", arguments, null, "height"); -} -dojo.html.getPaddingWidth = function(node){ - return dojo.html._callDeprecated("getPaddingWidth", "getPadding", arguments, null, "width"); -} -dojo.html.getPaddingHeight = function(node){ - return dojo.html._callDeprecated("getPaddingHeight", "getPadding", arguments, null, "height"); -} -dojo.html.getPadBorderWidth = function(node){ - return dojo.html._callDeprecated("getPadBorderWidth", "getPadBorder", arguments, null, "width"); -} -dojo.html.getPadBorderHeight = function(node){ - return dojo.html._callDeprecated("getPadBorderHeight", "getPadBorder", arguments, null, "height"); -} -dojo.html.getBorderBoxWidth = dojo.html.getInnerWidth = function(){ - return dojo.html._callDeprecated("getBorderBoxWidth", "getBorderBox", arguments, null, "width"); -} -dojo.html.getBorderBoxHeight = dojo.html.getInnerHeight = function(){ - return dojo.html._callDeprecated("getBorderBoxHeight", "getBorderBox", arguments, null, "height"); -} -dojo.html.getContentBoxWidth = dojo.html.getContentWidth = function(){ - return dojo.html._callDeprecated("getContentBoxWidth", "getContentBox", arguments, null, "width"); -} -dojo.html.getContentBoxHeight = dojo.html.getContentHeight = function(){ - return dojo.html._callDeprecated("getContentBoxHeight", "getContentBox", arguments, null, "height"); -} -dojo.html.setContentBoxWidth = dojo.html.setContentWidth = function(node, width){ - return dojo.html._callDeprecated("setContentBoxWidth", "setContentBox", arguments, "width"); -} -dojo.html.setContentBoxHeight = dojo.html.setContentHeight = function(node, height){ - return dojo.html._callDeprecated("setContentBoxHeight", "setContentBox", arguments, "height"); -} - -dojo.provide("dojo.lfx.html"); - - - - - - - - -dojo.lfx.html._byId = function(nodes){ - if(!nodes){ return []; } - if(dojo.lang.isArrayLike(nodes)){ - if(!nodes.alreadyChecked){ - var n = []; - dojo.lang.forEach(nodes, function(node){ - n.push(dojo.byId(node)); - }); - n.alreadyChecked = true; - return n; - }else{ - return nodes; - } - }else{ - var n = []; - n.push(dojo.byId(nodes)); - n.alreadyChecked = true; - return n; - } -} - -dojo.lfx.html.propertyAnimation = function( /*DOMNode[]*/ nodes, - /*Object[]*/ propertyMap, - /*int*/ duration, - /*function*/ easing, - /*Object*/ handlers){ - // summary: Returns an animation that will transition the properties of "nodes" - // depending how they are defined in "propertyMap". - // nodes: An array of DOMNodes or one DOMNode. - // propertyMap: { property: String, start: Decimal?, end: Decimal?, units: String? } - // An array of objects defining properties to change. - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // handlers: { handler: Function?, onstart: Function?, onstop: Function?, onanimate: Function? } - nodes = dojo.lfx.html._byId(nodes); - - var targs = { - "propertyMap": propertyMap, - "nodes": nodes, - "duration": duration, - "easing": easing||dojo.lfx.easeDefault - }; - - var setEmUp = function(args){ - if(args.nodes.length==1){ - // FIXME: we're only supporting start-value filling when one node is - // passed - - var pm = args.propertyMap; - if(!dojo.lang.isArray(args.propertyMap)){ - // it's stupid to have to pack an array with a set of objects - // when you can just pass in an object list - var parr = []; - for(var pname in pm){ - pm[pname].property = pname; - parr.push(pm[pname]); - } - pm = args.propertyMap = parr; - } - dojo.lang.forEach(pm, function(prop){ - if(dj_undef("start", prop)){ - if(prop.property != "opacity"){ - prop.start = parseInt(dojo.html.getComputedStyle(args.nodes[0], prop.property)); - }else{ - prop.start = dojo.html.getOpacity(args.nodes[0]); - } - } - }); - } - } - - var coordsAsInts = function(coords){ - var cints = []; - dojo.lang.forEach(coords, function(c){ - cints.push(Math.round(c)); - }); - return cints; - } - - var setStyle = function(n, style){ - n = dojo.byId(n); - if(!n || !n.style){ return; } - for(var s in style){ - try{ - if(s == "opacity"){ - dojo.html.setOpacity(n, style[s]); - }else{ - n.style[s] = style[s]; - } - }catch(e){ dojo.debug(e); } - } - } - - var propLine = function(properties){ - this._properties = properties; - this.diffs = new Array(properties.length); - dojo.lang.forEach(properties, function(prop, i){ - // calculate the end - start to optimize a bit - if(dojo.lang.isFunction(prop.start)){ - prop.start = prop.start(prop, i); - } - if(dojo.lang.isFunction(prop.end)){ - prop.end = prop.end(prop, i); - } - if(dojo.lang.isArray(prop.start)){ - // don't loop through the arrays - this.diffs[i] = null; - }else if(prop.start instanceof dojo.gfx.color.Color){ - // save these so we don't have to call toRgb() every getValue() call - prop.startRgb = prop.start.toRgb(); - prop.endRgb = prop.end.toRgb(); - }else{ - this.diffs[i] = prop.end - prop.start; - } - }, this); - - this.getValue = function(n){ - var ret = {}; - dojo.lang.forEach(this._properties, function(prop, i){ - var value = null; - if(dojo.lang.isArray(prop.start)){ - // FIXME: what to do here? - }else if(prop.start instanceof dojo.gfx.color.Color){ - value = (prop.units||"rgb") + "("; - for(var j = 0 ; j < prop.startRgb.length ; j++){ - value += Math.round(((prop.endRgb[j] - prop.startRgb[j]) * n) + prop.startRgb[j]) + (j < prop.startRgb.length - 1 ? "," : ""); - } - value += ")"; - }else{ - value = ((this.diffs[i]) * n) + prop.start + (prop.property != "opacity" ? prop.units||"px" : ""); - } - ret[dojo.html.toCamelCase(prop.property)] = value; - }, this); - return ret; - } - } - - var anim = new dojo.lfx.Animation({ - beforeBegin: function(){ - setEmUp(targs); - anim.curve = new propLine(targs.propertyMap); - }, - onAnimate: function(propValues){ - dojo.lang.forEach(targs.nodes, function(node){ - setStyle(node, propValues); - }); - } - }, - targs.duration, - null, - targs.easing - ); - if(handlers){ - for(var x in handlers){ - if(dojo.lang.isFunction(handlers[x])){ - anim.connect(x, anim, handlers[x]); - } - } - } - - return anim; // dojo.lfx.Animation -} - -dojo.lfx.html._makeFadeable = function(nodes){ - var makeFade = function(node){ - if(dojo.render.html.ie){ - // only set the zoom if the "tickle" value would be the same as the - // default - if( (node.style.zoom.length == 0) && - (dojo.html.getStyle(node, "zoom") == "normal") ){ - // make sure the node "hasLayout" - // NOTE: this has been tested with larger and smaller user-set text - // sizes and works fine - node.style.zoom = "1"; - // node.style.zoom = "normal"; - } - // don't set the width to auto if it didn't already cascade that way. - // We don't want to f anyones designs - if( (node.style.width.length == 0) && - (dojo.html.getStyle(node, "width") == "auto") ){ - node.style.width = "auto"; - } - } - } - if(dojo.lang.isArrayLike(nodes)){ - dojo.lang.forEach(nodes, makeFade); - }else{ - makeFade(nodes); - } -} - -dojo.lfx.html.fade = function(/*DOMNode[]*/ nodes, - /*Object*/values, - /*int?*/ duration, - /*Function?*/ easing, - /*Function?*/ callback){ - // summary:Returns an animation that will fade the "nodes" from the start to end values passed. - // nodes: An array of DOMNodes or one DOMNode. - // values: { start: Decimal?, end: Decimal? } - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - nodes = dojo.lfx.html._byId(nodes); - var props = { property: "opacity" }; - if(!dj_undef("start", values)){ - props.start = values.start; - }else{ - props.start = function(){ return dojo.html.getOpacity(nodes[0]); }; - } - - if(!dj_undef("end", values)){ - props.end = values.end; - }else{ - dojo.raise("dojo.lfx.html.fade needs an end value"); - } - - var anim = dojo.lfx.propertyAnimation(nodes, [ props ], duration, easing); - anim.connect("beforeBegin", function(){ - dojo.lfx.html._makeFadeable(nodes); - }); - if(callback){ - anim.connect("onEnd", function(){ callback(nodes, anim); }); - } - - return anim; // dojo.lfx.Animation -} - -dojo.lfx.html.fadeIn = function(/*DOMNode[]*/ nodes, /*int?*/ duration, /*Function?*/ easing, /*Function?*/ callback){ - // summary: Returns an animation that will fade "nodes" from its current opacity to fully opaque. - // nodes: An array of DOMNodes or one DOMNode. - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - return dojo.lfx.html.fade(nodes, { end: 1 }, duration, easing, callback); // dojo.lfx.Animation -} - -dojo.lfx.html.fadeOut = function(/*DOMNode[]*/ nodes, /*int?*/ duration, /*Function?*/ easing, /*Function?*/ callback){ - // summary: Returns an animation that will fade "nodes" from its current opacity to fully transparent. - // nodes: An array of DOMNodes or one DOMNode. - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - return dojo.lfx.html.fade(nodes, { end: 0 }, duration, easing, callback); // dojo.lfx.Animation -} - -dojo.lfx.html.fadeShow = function(/*DOMNode[]*/ nodes, /*int?*/ duration, /*Function?*/ easing, /*Function?*/ callback){ - // summary: Returns an animation that will fade "nodes" from transparent to opaque and shows - // "nodes" at the end if it is hidden. - // nodes: An array of DOMNodes or one DOMNode. - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - nodes=dojo.lfx.html._byId(nodes); - dojo.lang.forEach(nodes, function(node){ - dojo.html.setOpacity(node, 0.0); - }); - - var anim = dojo.lfx.html.fadeIn(nodes, duration, easing, callback); - anim.connect("beforeBegin", function(){ - if(dojo.lang.isArrayLike(nodes)){ - dojo.lang.forEach(nodes, dojo.html.show); - }else{ - dojo.html.show(nodes); - } - }); - - return anim; // dojo.lfx.Animation -} - -dojo.lfx.html.fadeHide = function(/*DOMNode[]*/ nodes, /*int?*/ duration, /*Function?*/ easing, /*Function?*/ callback){ - // summary: Returns an animation that will fade "nodes" from its current opacity to opaque and hides - // "nodes" at the end. - // nodes: An array of DOMNodes or one DOMNode. - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - var anim = dojo.lfx.html.fadeOut(nodes, duration, easing, function(){ - if(dojo.lang.isArrayLike(nodes)){ - dojo.lang.forEach(nodes, dojo.html.hide); - }else{ - dojo.html.hide(nodes); - } - if(callback){ callback(nodes, anim); } - }); - - return anim; // dojo.lfx.Animation -} - -dojo.lfx.html.wipeIn = function(/*DOMNode[]*/ nodes, /*int?*/ duration, /*Function?*/ easing, /*Function?*/ callback){ - // summary: Returns an animation that will show and wipe in "nodes". - // nodes: An array of DOMNodes or one DOMNode. - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - nodes = dojo.lfx.html._byId(nodes); - var anims = []; - - dojo.lang.forEach(nodes, function(node){ - var oprop = { }; // old properties of node (before we mucked w/them) - - // get node height, either it's natural height or it's height specified via style or class attributes - // (for FF, the node has to be (temporarily) rendered to measure height) - // TODO: should this offscreen code be part of dojo.html, so that getBorderBox() works on hidden nodes? - var origTop, origLeft, origPosition; - with(node.style){ - origTop=top; origLeft=left; origPosition=position; - top="-9999px"; left="-9999px"; position="absolute"; - display=""; - } - var nodeHeight = dojo.html.getBorderBox(node).height; - with(node.style){ - top=origTop; left=origLeft; position=origPosition; - display="none"; - } - - var anim = dojo.lfx.propertyAnimation(node, - { "height": { - start: 1, // 0 causes IE to display the whole panel - end: function(){ return nodeHeight; } - } - }, - duration, - easing); - - anim.connect("beforeBegin", function(){ - oprop.overflow = node.style.overflow; - oprop.height = node.style.height; - with(node.style){ - overflow = "hidden"; - height = "1px"; // 0 causes IE to display the whole panel - } - dojo.html.show(node); - }); - - anim.connect("onEnd", function(){ - with(node.style){ - overflow = oprop.overflow; - height = oprop.height; - } - if(callback){ callback(node, anim); } - }); - anims.push(anim); - }); - - return dojo.lfx.combine(anims); // dojo.lfx.Combine -} - -dojo.lfx.html.wipeOut = function(/*DOMNode[]*/ nodes, /*int?*/ duration, /*Function?*/ easing, /*Function?*/ callback){ - // summary: Returns an animation that will wipe out and hide "nodes". - // nodes: An array of DOMNodes or one DOMNode. - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - nodes = dojo.lfx.html._byId(nodes); - var anims = []; - - dojo.lang.forEach(nodes, function(node){ - var oprop = { }; // old properties of node (before we mucked w/them) - var anim = dojo.lfx.propertyAnimation(node, - { "height": { - start: function(){ return dojo.html.getContentBox(node).height; }, - end: 1 // 0 causes IE to display the whole panel - } - }, - duration, - easing, - { - "beforeBegin": function(){ - oprop.overflow = node.style.overflow; - oprop.height = node.style.height; - with(node.style){ - overflow = "hidden"; - } - dojo.html.show(node); - }, - - "onEnd": function(){ - dojo.html.hide(node); - with(node.style){ - overflow = oprop.overflow; - height = oprop.height; - } - if(callback){ callback(node, anim); } - } - } - ); - anims.push(anim); - }); - - return dojo.lfx.combine(anims); // dojo.lfx.Combine -} - -dojo.lfx.html.slideTo = function(/*DOMNode*/ nodes, - /*Object*/ coords, - /*int?*/ duration, - /*Function?*/ easing, - /*Function?*/ callback){ - // summary: Returns an animation that will slide "nodes" from its current position to - // the position defined in "coords". - // nodes: An array of DOMNodes or one DOMNode. - // coords: { top: Decimal?, left: Decimal? } - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - nodes = dojo.lfx.html._byId(nodes); - var anims = []; - var compute = dojo.html.getComputedStyle; - - if(dojo.lang.isArray(coords)){ - /* coords: Array - pId: a */ - dojo.deprecated('dojo.lfx.html.slideTo(node, array)', 'use dojo.lfx.html.slideTo(node, {top: value, left: value});', '0.5'); - coords = { top: coords[0], left: coords[1] }; - } - dojo.lang.forEach(nodes, function(node){ - var top = null; - var left = null; - - var init = (function(){ - var innerNode = node; - return function(){ - var pos = compute(innerNode, 'position'); - top = (pos == 'absolute' ? node.offsetTop : parseInt(compute(node, 'top')) || 0); - left = (pos == 'absolute' ? node.offsetLeft : parseInt(compute(node, 'left')) || 0); - - if (!dojo.lang.inArray(['absolute', 'relative'], pos)) { - var ret = dojo.html.abs(innerNode, true); - dojo.html.setStyleAttributes(innerNode, "position:absolute;top:"+ret.y+"px;left:"+ret.x+"px;"); - top = ret.y; - left = ret.x; - } - } - })(); - init(); - - var anim = dojo.lfx.propertyAnimation(node, - { "top": { start: top, end: (coords.top||0) }, - "left": { start: left, end: (coords.left||0) } - }, - duration, - easing, - { "beforeBegin": init } - ); - - if(callback){ - anim.connect("onEnd", function(){ callback(nodes, anim); }); - } - - anims.push(anim); - }); - - return dojo.lfx.combine(anims); // dojo.lfx.Combine -} - -dojo.lfx.html.slideBy = function(/*DOMNode*/ nodes, /*Object*/ coords, /*int?*/ duration, /*Function?*/ easing, /*Function?*/ callback){ - // summary: Returns an animation that will slide "nodes" from its current position - // to its current position plus the numbers defined in "coords". - // nodes: An array of DOMNodes or one DOMNode. - // coords: { top: Decimal?, left: Decimal? } - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - nodes = dojo.lfx.html._byId(nodes); - var anims = []; - var compute = dojo.html.getComputedStyle; - - if(dojo.lang.isArray(coords)){ - /* coords: Array - pId: a */ - dojo.deprecated('dojo.lfx.html.slideBy(node, array)', 'use dojo.lfx.html.slideBy(node, {top: value, left: value});', '0.5'); - coords = { top: coords[0], left: coords[1] }; - } - - dojo.lang.forEach(nodes, function(node){ - var top = null; - var left = null; - - var init = (function(){ - var innerNode = node; - return function(){ - var pos = compute(innerNode, 'position'); - top = (pos == 'absolute' ? node.offsetTop : parseInt(compute(node, 'top')) || 0); - left = (pos == 'absolute' ? node.offsetLeft : parseInt(compute(node, 'left')) || 0); - - if (!dojo.lang.inArray(['absolute', 'relative'], pos)) { - var ret = dojo.html.abs(innerNode, true); - dojo.html.setStyleAttributes(innerNode, "position:absolute;top:"+ret.y+"px;left:"+ret.x+"px;"); - top = ret.y; - left = ret.x; - } - } - })(); - init(); - - var anim = dojo.lfx.propertyAnimation(node, - { - "top": { start: top, end: top+(coords.top||0) }, - "left": { start: left, end: left+(coords.left||0) } - }, - duration, - easing).connect("beforeBegin", init); - - if(callback){ - anim.connect("onEnd", function(){ callback(nodes, anim); }); - } - - anims.push(anim); - }); - - return dojo.lfx.combine(anims); // dojo.lfx.Combine -} - -dojo.lfx.html.explode = function(/*DOMNode*/ start, - /*DOMNode*/ endNode, - /*int?*/ duration, - /*Function?*/ easing, - /*Function?*/ callback){ - // summary: Returns an animation that will - // start: - // endNode: - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - var h = dojo.html; - start = dojo.byId(start); - endNode = dojo.byId(endNode); - var startCoords = h.toCoordinateObject(start, true); - var outline = document.createElement("div"); - h.copyStyle(outline, endNode); - if(endNode.explodeClassName){ outline.className = endNode.explodeClassName; } - with(outline.style){ - position = "absolute"; - display = "none"; - // border = "1px solid black"; - var backgroundStyle = h.getStyle(start, "background-color"); - backgroundColor = backgroundStyle ? backgroundStyle.toLowerCase() : "transparent"; - backgroundColor = (backgroundColor == "transparent") ? "rgb(221, 221, 221)" : backgroundColor; - } - dojo.body().appendChild(outline); - - with(endNode.style){ - visibility = "hidden"; - display = "block"; - } - var endCoords = h.toCoordinateObject(endNode, true); - with(endNode.style){ - display = "none"; - visibility = "visible"; - } - - var props = { opacity: { start: 0.5, end: 1.0 } }; - dojo.lang.forEach(["height", "width", "top", "left"], function(type){ - props[type] = { start: startCoords[type], end: endCoords[type] } - }); - - var anim = new dojo.lfx.propertyAnimation(outline, - props, - duration, - easing, - { - "beforeBegin": function(){ - h.setDisplay(outline, "block"); - }, - "onEnd": function(){ - h.setDisplay(endNode, "block"); - outline.parentNode.removeChild(outline); - } - } - ); - - if(callback){ - anim.connect("onEnd", function(){ callback(endNode, anim); }); - } - return anim; // dojo.lfx.Animation -} - -dojo.lfx.html.implode = function(/*DOMNode*/ startNode, - /*DOMNode*/ end, - /*int?*/ duration, - /*Function?*/ easing, - /*Function?*/ callback){ - // summary: Returns an animation that will - // startNode: - // end: - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - var h = dojo.html; - startNode = dojo.byId(startNode); - end = dojo.byId(end); - var startCoords = dojo.html.toCoordinateObject(startNode, true); - var endCoords = dojo.html.toCoordinateObject(end, true); - - var outline = document.createElement("div"); - dojo.html.copyStyle(outline, startNode); - if (startNode.explodeClassName) { outline.className = startNode.explodeClassName; } - dojo.html.setOpacity(outline, 0.3); - with(outline.style){ - position = "absolute"; - display = "none"; - backgroundColor = h.getStyle(startNode, "background-color").toLowerCase(); - } - dojo.body().appendChild(outline); - - var props = { opacity: { start: 1.0, end: 0.5 } }; - dojo.lang.forEach(["height", "width", "top", "left"], function(type){ - props[type] = { start: startCoords[type], end: endCoords[type] } - }); - - var anim = new dojo.lfx.propertyAnimation(outline, - props, - duration, - easing, - { - "beforeBegin": function(){ - dojo.html.hide(startNode); - dojo.html.show(outline); - }, - "onEnd": function(){ - outline.parentNode.removeChild(outline); - } - } - ); - - if(callback){ - anim.connect("onEnd", function(){ callback(startNode, anim); }); - } - return anim; // dojo.lfx.Animation -} - -dojo.lfx.html.highlight = function(/*DOMNode[]*/ nodes, - /*dojo.gfx.color.Color*/ startColor, - /*int?*/ duration, - /*Function?*/ easing, - /*Function?*/ callback){ - // summary: Returns an animation that will set the background color - // of "nodes" to startColor and transition it to "nodes" - // original color. - // startColor: Color to transition from. - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - nodes = dojo.lfx.html._byId(nodes); - var anims = []; - - dojo.lang.forEach(nodes, function(node){ - var color = dojo.html.getBackgroundColor(node); - var bg = dojo.html.getStyle(node, "background-color").toLowerCase(); - var bgImage = dojo.html.getStyle(node, "background-image"); - var wasTransparent = (bg == "transparent" || bg == "rgba(0, 0, 0, 0)"); - while(color.length > 3) { color.pop(); } - - var rgb = new dojo.gfx.color.Color(startColor); - var endRgb = new dojo.gfx.color.Color(color); - - var anim = dojo.lfx.propertyAnimation(node, - { "background-color": { start: rgb, end: endRgb } }, - duration, - easing, - { - "beforeBegin": function(){ - if(bgImage){ - node.style.backgroundImage = "none"; - } - node.style.backgroundColor = "rgb(" + rgb.toRgb().join(",") + ")"; - }, - "onEnd": function(){ - if(bgImage){ - node.style.backgroundImage = bgImage; - } - if(wasTransparent){ - node.style.backgroundColor = "transparent"; - } - if(callback){ - callback(node, anim); - } - } - } - ); - - anims.push(anim); - }); - return dojo.lfx.combine(anims); // dojo.lfx.Combine -} - -dojo.lfx.html.unhighlight = function(/*DOMNode[]*/ nodes, - /*dojo.gfx.color.Color*/ endColor, - /*int?*/ duration, - /*Function?*/ easing, - /*Function?*/ callback){ - // summary: Returns an animation that will transition "nodes" background color - // from its current color to "endColor". - // endColor: Color to transition to. - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - nodes = dojo.lfx.html._byId(nodes); - var anims = []; - - dojo.lang.forEach(nodes, function(node){ - var color = new dojo.gfx.color.Color(dojo.html.getBackgroundColor(node)); - var rgb = new dojo.gfx.color.Color(endColor); - - var bgImage = dojo.html.getStyle(node, "background-image"); - - var anim = dojo.lfx.propertyAnimation(node, - { "background-color": { start: color, end: rgb } }, - duration, - easing, - { - "beforeBegin": function(){ - if(bgImage){ - node.style.backgroundImage = "none"; - } - node.style.backgroundColor = "rgb(" + color.toRgb().join(",") + ")"; - }, - "onEnd": function(){ - if(callback){ - callback(node, anim); - } - } - } - ); - anims.push(anim); - }); - return dojo.lfx.combine(anims); // dojo.lfx.Combine -} - -dojo.lang.mixin(dojo.lfx, dojo.lfx.html); - -dojo.kwCompoundRequire({ - browser: ["dojo.lfx.html"], - dashboard: ["dojo.lfx.html"] -}); -dojo.provide("dojo.lfx.*"); - -if(!this["dojo"]){ - alert("\"dojo/__package__.js\" is now located at \"dojo/dojo.js\". Please update your includes accordingly"); -} - -dojo.provide("dojo.xml.Parse"); - - -//TODO: determine dependencies -// currently has dependency on dojo.xml.DomUtil nodeTypes constants... - -// using documentFragment nomenclature to generalize in case we don't want to require passing a collection of nodes with a single parent - -dojo.xml.Parse = function(){ - // summary: - // generic class for taking a DOM node and parsing it into an object - // based on the "dojo tag name" of that node. - // - // supported dojoTagName's: - // => prefix:tag - // => dojo:tag - // => dojo:tag - // => dojo:type - // => prefix:type - // => dojo:type - // => dojo:type - - var isIE = ((dojo.render.html.capable)&&(dojo.render.html.ie)); - - // get normalized (lowercase) tagName - // some browsers report tagNames in lowercase no matter what - function getTagName(node){ - /* - return ((node)&&(node["tagName"]) ? node.tagName.toLowerCase() : ''); - */ - try{ - return node.tagName.toLowerCase(); - }catch(e){ - return ""; - } - } - - // locate dojo qualified tag name - function getDojoTagName(node){ - var tagName = getTagName(node); - if (!tagName){ - return ''; - } - // any registered tag - if((dojo.widget)&&(dojo.widget.tags[tagName])){ - return tagName; - } - // => prefix:tag - var p = tagName.indexOf(":"); - if(p>=0){ - return tagName; - } - // => dojo:tag - if(tagName.substr(0,5) == "dojo:"){ - return tagName; - } - if(dojo.render.html.capable && dojo.render.html.ie && node.scopeName != 'HTML'){ - return node.scopeName.toLowerCase() + ':' + tagName; - } - // => dojo:tag - if(tagName.substr(0,4) == "dojo"){ - // FIXME: this assumes tag names are always lower case - return "dojo:" + tagName.substring(4); - } - // => prefix:type - // => dojo:type - var djt = node.getAttribute("dojoType") || node.getAttribute("dojotype"); - if(djt){ - if (djt.indexOf(":")<0){ - djt = "dojo:"+djt; - } - return djt.toLowerCase(); - } - // => dojo:type - djt = node.getAttributeNS && node.getAttributeNS(dojo.dom.dojoml,"type"); - if(djt){ - return "dojo:" + djt.toLowerCase(); - } - // => dojo:type - try{ - // FIXME: IE really really doesn't like this, so we squelch errors for it - djt = node.getAttribute("dojo:type"); - }catch(e){ - // FIXME: log? - } - if(djt){ return "dojo:"+djt.toLowerCase(); } - // => dojo:type - if((dj_global["djConfig"])&&(!djConfig["ignoreClassNames"])){ - // FIXME: should we make this optionally enabled via djConfig? - var classes = node.className||node.getAttribute("class"); - // FIXME: following line, without check for existence of classes.indexOf - // breaks firefox 1.5's svg widgets - if((classes )&&(classes.indexOf)&&(classes.indexOf("dojo-")!=-1)){ - var aclasses = classes.split(" "); - for(var x=0, c=aclasses.length; x as nodes that should be parsed. Ignore these - if(isIE && tagName.indexOf("/")==0){ return null; } - - try{ - var attr = node.getAttribute("parseWidgets"); - if(attr && attr.toLowerCase() == "false"){ - return {}; - } - }catch(e){/*continue*/} - - - // look for a dojoml qualified name - // process dojoml only when optimizeForDojoML is true - var process = true; - if(optimizeForDojoML){ - var dojoTagName = getDojoTagName(node); - tagName = dojoTagName || tagName; - process = Boolean(dojoTagName); - } - - var parsedNodeSet = {}; - parsedNodeSet[tagName] = []; - var pos = tagName.indexOf(":"); - if(pos>0){ - var ns = tagName.substring(0,pos); - parsedNodeSet["ns"] = ns; - // honor user namespace filters - if((dojo.ns)&&(!dojo.ns.allow(ns))){process=false;} - } - - if(process){ - var attributeSet = this.parseAttributes(node); - for(var attr in attributeSet){ - if((!parsedNodeSet[tagName][attr])||(typeof parsedNodeSet[tagName][attr] != "array")){ - parsedNodeSet[tagName][attr] = []; - } - parsedNodeSet[tagName][attr].push(attributeSet[attr]); - } - // FIXME: we might want to make this optional or provide cloning instead of - // referencing, but for now, we include a node reference to allow - // instantiated components to figure out their "roots" - parsedNodeSet[tagName].nodeRef = node; - parsedNodeSet.tagName = tagName; - parsedNodeSet.index = thisIdx||0; - } - - var count = 0; - for(var i = 0; i < node.childNodes.length; i++){ - var tcn = node.childNodes.item(i); - switch(tcn.nodeType){ - case dojo.dom.ELEMENT_NODE: // element nodes, call this function recursively - var ctn = getDojoTagName(tcn) || getTagName(tcn); - if(!parsedNodeSet[ctn]){ - parsedNodeSet[ctn] = []; - } - parsedNodeSet[ctn].push(this.parseElement(tcn, true, optimizeForDojoML, count)); - if( (tcn.childNodes.length == 1)&& - (tcn.childNodes.item(0).nodeType == dojo.dom.TEXT_NODE)){ - parsedNodeSet[ctn][parsedNodeSet[ctn].length-1].value = tcn.childNodes.item(0).nodeValue; - } - count++; - break; - case dojo.dom.TEXT_NODE: // if a single text node is the child, treat it as an attribute - if(node.childNodes.length == 1){ - parsedNodeSet[tagName].push({ value: node.childNodes.item(0).nodeValue }); - } - break; - default: break; - /* - case dojo.dom.ATTRIBUTE_NODE: // attribute node... not meaningful here - break; - case dojo.dom.CDATA_SECTION_NODE: // cdata section... not sure if this would ever be meaningful... might be... - break; - case dojo.dom.ENTITY_REFERENCE_NODE: // entity reference node... not meaningful here - break; - case dojo.dom.ENTITY_NODE: // entity node... not sure if this would ever be meaningful - break; - case dojo.dom.PROCESSING_INSTRUCTION_NODE: // processing instruction node... not meaningful here - break; - case dojo.dom.COMMENT_NODE: // comment node... not not sure if this would ever be meaningful - break; - case dojo.dom.DOCUMENT_NODE: // document node... not sure if this would ever be meaningful - break; - case dojo.dom.DOCUMENT_TYPE_NODE: // document type node... not meaningful here - break; - case dojo.dom.DOCUMENT_FRAGMENT_NODE: // document fragment node... not meaningful here - break; - case dojo.dom.NOTATION_NODE:// notation node... not meaningful here - break; - */ - } - } - //return (hasParentNodeSet) ? parsedNodeSet[node.tagName] : parsedNodeSet; - //if(parsedNodeSet.tagName)dojo.debug("parseElement: RETURNING NODE WITH TAGNAME "+parsedNodeSet.tagName); - return parsedNodeSet; - }; - - - /* parses a set of attributes on a node into an object tree */ - this.parseAttributes = function(/*DomNode*/node){ - // summary: - // creates an attribute object that maps attribute values for the - // passed node. Note that this is similar to creating a JSON - // representation of a DOM node. - // usage: - // a node with the following serialization: - //
    ...
    - // would yeild the following return structure when passed into this - // function: - // { - // "foo": { - // "value": "bar" - // }, - // "baz": { - // "value": "thud" - // } - // } - // - var parsedAttributeSet = {}; - var atts = node.attributes; - // TODO: should we allow for duplicate attributes at this point... - // would any of the relevant dom implementations even allow this? - var attnode, i=0; - while((attnode=atts[i++])){ - if(isIE){ - if(!attnode){ continue; } - if((typeof attnode == "object")&& - (typeof attnode.nodeValue == 'undefined')|| - (attnode.nodeValue == null)|| - (attnode.nodeValue == '')){ - continue; - } - } - - var nn = attnode.nodeName.split(":"); - nn = (nn.length == 2) ? nn[1] : attnode.nodeName; - - parsedAttributeSet[nn] = { - value: attnode.nodeValue - }; - } - return parsedAttributeSet; - }; -}; - -dojo.provide("dojo.lang.declare"); - - - - -dojo.lang.declare = function( /*String*/ className, - /*Function|Array*/ superclass, - /*Function?*/ init, - /*Object|Array*/ props){ - /* - * summary: Create a feature-rich constructor with a compact notation - * className: the name of the constructor (loosely, a "class") - * superclass: - * may be a Function, or an Array of Functions. If "superclass" is an - * array, the first element is used as the prototypical ancestor and - * any following Functions become mixin ancestors. - * init: an initializer function - * props: - * an object (or array of objects) whose properties are copied to the - * created prototype - * description: - * Create a constructor using a compact notation for inheritance and - * prototype extension. "superclass" argument may be a Function, or an - * array of Functions. - * - * If "superclass" is an array, the first element is used as the - * prototypical ancestor and any following Functions become mixin - * ancestors. - * - * All "superclass(es)" must be Functions (not mere Objects). - * - * Using mixin ancestors provides a type of multiple inheritance. - * Mixin ancestors prototypical properties are copied to the subclass, - * and any inializater/constructor is invoked. - * - * Properties of object "props" are copied to the constructor - * prototype. If "props" is an array, properties of each object in the - * array are copied to the constructor prototype. - * - * name of the class ("className" argument) is stored in - * "declaredClass" property - * - * Initializer functions are called when an object is instantiated - * from this constructor. - * - * Aliased as "dojo.declare" - * - * Usage: - * - * dojo.declare("my.classes.bar", my.classes.foo, - * function(){ - * // initialization function - * this.myComplicatedObject = new ReallyComplicatedObject(); - * }, - * { // properties to be added to the class prototype - * someValue: 2, - * someMethod: function(){ - * doStuff(); - * } - * } - * ); - * - */ - if((dojo.lang.isFunction(props))||((!props)&&(!dojo.lang.isFunction(init)))){ - // parameter juggling to support omitting init param (also allows - // reordering init and props arguments) - var temp = props; - props = init; - init = temp; - } - var mixins = [ ]; - if(dojo.lang.isArray(superclass)){ - mixins = superclass; - superclass = mixins.shift(); - } - if(!init){ - init = dojo.evalObjPath(className, false); - if((init)&&(!dojo.lang.isFunction(init))){ init = null }; - } - var ctor = dojo.lang.declare._makeConstructor(); - var scp = (superclass ? superclass.prototype : null); - if(scp){ - scp.prototyping = true; - ctor.prototype = new superclass(); - scp.prototyping = false; - } - ctor.superclass = scp; - ctor.mixins = mixins; - for(var i=0,l=mixins.length; i by convention - if(!dojo.hostenv.moduleHasPrefix(name)){ - dojo.registerModulePath(name, "../" + name); - } - req([name, 'manifest'].join('.'), false, true); - } - if(!this.namespaces[name]){ - this.failed[name] = true; //only look for a namespace once - } - }finally{ - this.loading[name]=false; - } - return this.namespaces[name]; // Ns - } -} - -dojo.ns.Ns = function(/*String*/name, /*String*/module, /*Function?*/resolver){ - // summary: this object simply encapsulates namespace data - this.name = name; - this.module = module; - this.resolver = resolver; - this._loaded = [ ]; - this._failed = [ ]; -} - -dojo.ns.Ns.prototype.resolve = function(/*String*/name, /*String*/domain, /*Boolean?*/omitModuleCheck){ - //summary: map component with 'name' and 'domain' to a module via namespace resolver, if specified - if(!this.resolver || djConfig["skipAutoRequire"]){return false;} // Boolean - var fullName = this.resolver(name, domain); - //only load a widget once. This is a quicker check than dojo.require does - if((fullName)&&(!this._loaded[fullName])&&(!this._failed[fullName])){ - //workaround so we don't break the build system - var req = dojo.require; - req(fullName, false, true); //omit the module check, we'll do it ourselves. - if(dojo.hostenv.findModule(fullName, false)){ - this._loaded[fullName] = true; - }else{ - if(!omitModuleCheck){dojo.raise("dojo.ns.Ns.resolve: module '" + fullName + "' not found after loading via namespace '" + this.name + "'");} - this._failed[fullName] = true; - } - } - return Boolean(this._loaded[fullName]); // Boolean -} - -dojo.registerNamespace = function(/*String*/name, /*String*/module, /*Function?*/resolver){ - // summary: maps a module name to a namespace for widgets, and optionally maps widget names to modules for auto-loading - // description: An unregistered namespace is mapped to an eponymous module. - // For example, namespace acme is mapped to module acme, and widgets are - // assumed to belong to acme.widget. If you want to use a different widget - // module, use dojo.registerNamespace. - dojo.ns.register.apply(dojo.ns, arguments); -} - -dojo.registerNamespaceResolver = function(/*String*/name, /*Function*/resolver){ - // summary: a resolver function maps widget names to modules, so the - // widget manager can auto-load needed widget implementations - // - // description: The resolver provides information to allow Dojo - // to load widget modules on demand. When a widget is created, - // a namespace resolver can tell Dojo what module to require - // to ensure that the widget implementation code is loaded. - // - // name: will always be lower-case. - // - // example: - // dojo.registerNamespaceResolver("acme", - // function(name){ - // return "acme.widget."+dojo.string.capitalize(name); - // } - // ); - var n = dojo.ns.namespaces[name]; - if(n){ - n.resolver = resolver; - } -} - -dojo.registerNamespaceManifest = function(/*String*/module, /*String*/path, /*String*/name, /*String*/widgetModule, /*Function?*/resolver){ - // summary: convenience function to register a module path, a namespace, and optionally a resolver all at once. - dojo.registerModulePath(name, path); - dojo.registerNamespace(name, widgetModule, resolver); -} - -// NOTE: rather put this in dojo.widget.Widget, but that fubars debugAtAllCosts -dojo.registerNamespace("dojo", "dojo.widget"); - -dojo.provide("dojo.widget.Manager"); - - - - -// summary -// Manager class for the widgets. -// This is an internal class used by dojo; users shouldn't call this class directly. -dojo.widget.manager = new function(){ - this.widgets = []; - this.widgetIds = []; - - // map of widgetId-->widget for widgets without parents (top level widgets) - this.topWidgets = {}; - - var widgetTypeCtr = {}; - var renderPrefixCache = []; - - this.getUniqueId = function (widgetType) { - var widgetId; - do{ - widgetId = widgetType + "_" + (widgetTypeCtr[widgetType] != undefined ? - ++widgetTypeCtr[widgetType] : widgetTypeCtr[widgetType] = 0); - }while(this.getWidgetById(widgetId)); - return widgetId; - } - - this.add = function(widget){ - //dojo.profile.start("dojo.widget.manager.add"); - this.widgets.push(widget); - // Opera9 uses ID (caps) - if(!widget.extraArgs["id"]){ - widget.extraArgs["id"] = widget.extraArgs["ID"]; - } - // FIXME: the rest of this method is very slow! - if(widget.widgetId == ""){ - if(widget["id"]){ - widget.widgetId = widget["id"]; - }else if(widget.extraArgs["id"]){ - widget.widgetId = widget.extraArgs["id"]; - }else{ - widget.widgetId = this.getUniqueId(widget.ns+'_'+widget.widgetType); - } - } - if(this.widgetIds[widget.widgetId]){ - dojo.debug("widget ID collision on ID: "+widget.widgetId); - } - this.widgetIds[widget.widgetId] = widget; - // Widget.destroy already calls removeById(), so we don't need to - // connect() it here - //dojo.profile.end("dojo.widget.manager.add"); - } - - this.destroyAll = function(){ - for(var x=this.widgets.length-1; x>=0; x--){ - try{ - // this.widgets[x].destroyChildren(); - this.widgets[x].destroy(true); - delete this.widgets[x]; - }catch(e){ } - } - } - - // FIXME: we should never allow removal of the root widget until all others - // are removed! - this.remove = function(widgetIndex){ - if(dojo.lang.isNumber(widgetIndex)){ - var tw = this.widgets[widgetIndex].widgetId; - delete this.topWidgets[tw]; - delete this.widgetIds[tw]; - this.widgets.splice(widgetIndex, 1); - }else{ - this.removeById(widgetIndex); - } - } - - // FIXME: suboptimal performance - this.removeById = function(id) { - if(!dojo.lang.isString(id)){ - id = id["widgetId"]; - if(!id){ dojo.debug("invalid widget or id passed to removeById"); return; } - } - for (var i=0; i.widget by convention - dojo.ns.register(ns, ns + '.widget'); - nsObj = dojo.ns.get(ns); - } - - // allow the namespace to resolve the widget module - if(nsObj){nsObj.resolve(widgetName);} - - // locate a widget implementation in the registered module for our current rendering environment - impl = findImplementation(lowerCaseWidgetName, nsObj.module); - if(impl){return(imps[lowerCaseWidgetName] = impl)}; - - // try to load a manifest to resolve this implemenation - nsObj = dojo.ns.require(ns); - if((nsObj)&&(nsObj.resolver)){ - nsObj.resolve(widgetName); - impl = findImplementation(lowerCaseWidgetName, nsObj.module); - if(impl){return(imps[lowerCaseWidgetName] = impl)}; - } - - // this is an error condition under new rules - dojo.deprecated('dojo.widget.Manager.getImplementationName', - 'Could not locate widget implementation for "' + widgetName + '" in "' + nsObj.module + '" registered to namespace "' + nsObj.name + '". ' - + "Developers must specify correct namespaces for all non-Dojo widgets", "0.5"); - - // backward compat: if the user has not specified any namespace and their widget is not in dojo.widget.* - // search registered widget packages [sic] - // note: registerWidgetPackage itself is now deprecated - for(var i=0; i 0) { - return widgets[n]; - } - return widgets; - } - g("registerWidgetPackage"); - g("getImplementation", "getWidgetImplementation"); - g("getImplementationName", "getWidgetImplementationName"); - - dw.widgets = dwm.widgets; - dw.widgetIds = dwm.widgetIds; - dw.root = dwm.root; -})(); - -dojo.kwCompoundRequire({ - common: [["dojo.uri.Uri", false, false]] -}); -dojo.provide("dojo.uri.*"); - -dojo.provide("dojo.a11y"); - - - - -dojo.a11y = { - // imgPath: String path to the test image for determining if images are displayed or not - // doAccessibleCheck: Boolean if true will perform check for need to create accessible widgets - // accessible: Boolean uninitialized when null (accessible check has not been performed) - // if true generate accessible widgets - imgPath:dojo.uri.moduleUri("dojo.widget", "templates/images"), - doAccessibleCheck: true, - accessible: null, - - checkAccessible: function(){ - // summary: - // perform check for accessibility if accessibility checking is turned - // on and the accessibility test has not been performed yet - if(this.accessible === null){ - this.accessible = false; //default - if(this.doAccessibleCheck == true){ - this.accessible = this.testAccessible(); - } - } - return this.accessible; /* Boolean */ - }, - - testAccessible: function(){ - // summary: - // Always perform the accessibility check to determine if high - // contrast mode is on or display of images are turned off. Currently only checks - // in IE and Mozilla. - this.accessible = false; //default - if (dojo.render.html.ie || dojo.render.html.mozilla){ - var div = document.createElement("div"); - //div.style.color="rgb(153,204,204)"; - div.style.backgroundImage = "url(\"" + this.imgPath + "/tab_close.gif\")"; - // must add to hierarchy before can view currentStyle below - dojo.body().appendChild(div); - // in FF and IE the value for the current background style of the added div - // will be "none" in high contrast mode - // in FF the return value will be url(invalid-url:) when running over http - var bkImg = null; - if (window.getComputedStyle ) { - var cStyle = getComputedStyle(div, ""); - bkImg = cStyle.getPropertyValue("background-image"); - }else{ - bkImg = div.currentStyle.backgroundImage; - } - var bUseImgElem = false; - if (bkImg != null && (bkImg == "none" || bkImg == "url(invalid-url:)" )) { - this.accessible = true; - } - /* - if(this.accessible == false && document.images){ - // test if images are off in IE - var testImg = new Image(); - if(testImg.fileSize) { - testImg.src = this.imgPath + "/tab_close.gif"; - if(testImg.fileSize < 0){ - this.accessible = true; - } - } - }*/ - dojo.body().removeChild(div); - } - return this.accessible; /* Boolean */ - }, - - setCheckAccessible: function(/* Boolean */ bTest){ - // summary: - // Set whether or not to check for accessibility mode. Default value - // of module is true - perform check for accessibility modes. - // bTest: Boolean - true to check; false to turn off checking - this.doAccessibleCheck = bTest; - }, - - setAccessibleMode: function(){ - // summary: - // perform the accessibility check and sets the correct mode to load - // a11y widgets. Only runs if test for accessiiblity has not been performed yet. - // Call testAccessible() to force the test. - if (this.accessible === null){ - if (this.checkAccessible()){ - dojo.render.html.prefixes.unshift("a11y"); - } - } - return this.accessible; /* Boolean */ - } -}; - -//dojo.hostenv.modulesLoadedListeners.unshift(function() { dojo.a11y.setAccessibleMode(); }); -//dojo.event.connect("before", dojo.hostenv, "makeWidgets", dojo.a11y, "setAccessibleMode"); - -dojo.provide("dojo.widget.Widget"); - - - - - - - - - - -dojo.declare("dojo.widget.Widget", null, - function(){ - // these properties aren't primitives and need to be created on a per-item - // basis. - - // children: Array - // a list of all of the widgets that have been added as children of - // this component. Should only have values if isContainer is true. - this.children = []; - - // extraArgs: Object - // a map of properties which the widget system tried to assign from - // user input but did not correspond to any of the properties set on - // the class prototype. These names will also be available in all - // lower-case form in this map - this.extraArgs = {}; - }, -{ - // parent: Widget - // the parent of this widget - parent: null, - - // isTopLevel: Boolean - // should this widget eat all events that bubble up to it? - // obviously, top-level and modal widgets should set these appropriately - isTopLevel: false, - - // disabled: Boolean - // should this widget respond to user input? - // in markup, this is specified as "disabled='disabled'", or just "disabled" - disabled: false, - - // isContainer: Boolean - // can this widget contain other widgets? - isContainer: false, - - // widgetId: String - // a unique, opaque ID string that can be assigned by users or by the - // system. If the developer passes an ID which is known not to be - // unique, the specified ID is ignored and the system-generated ID is - // used instead. - widgetId: "", - - // widgetType: String - // used for building generic widgets - widgetType: "Widget", - - // ns: String - // defaults to 'dojo'. "namespace" is a reserved word in JavaScript, so we abbreviate - ns: "dojo", - - getNamespacedType: function(){ - // summary: - // get the "full" name of the widget. If the widget comes from the - // "dojo" namespace and is a Button, calling this method will - // return "dojo:button", all lower-case - return (this.ns ? this.ns + ":" + this.widgetType : this.widgetType).toLowerCase(); // String - }, - - toString: function(){ - // summary: - // returns a string that represents the widget. When a widget is - // cast to a string, this method will be used to generate the - // output. Currently, it does not implement any sort of reversable - // serialization. - return '[Widget ' + this.getNamespacedType() + ', ' + (this.widgetId || 'NO ID') + ']'; // String - }, - - repr: function(){ - // summary: returns the string representation of the widget. - return this.toString(); // String - }, - - enable: function(){ - // summary: - // enables the widget, usually involving unmasking inputs and - // turning on event handlers. Not implemented here. - this.disabled = false; - }, - - disable: function(){ - // summary: - // disables the widget, usually involves masking inputs and - // unsetting event handlers. Not implemented here. - this.disabled = true; - }, - - // TODO: - // 1) this would be better in HtmlWidget rather than here? - // 2) since many widgets don't care if they've been resized, maybe this should be a mixin? - onResized: function(){ - // summary: - // A signal that widgets will call when they have been resized. - // Can be connected to for determining if a layout needs to be - // reflowed. Clients should override this function to do special - // processing, then call this.notifyChildrenOfResize() to notify - // children of resize. - this.notifyChildrenOfResize(); - }, - - notifyChildrenOfResize: function(){ - // summary: dispatches resized events to all children of this widget - for(var i=0; i mixInProperties"); - //dojo.profile.start(this.widgetType + " mixInProperties"); - this.mixInProperties(args, fragment, parent); - //dojo.profile.end(this.widgetType + " mixInProperties"); - // dojo.debug(this.widgetType, "-> postMixInProperties"); - //dojo.profile.start(this.widgetType + " postMixInProperties"); - this.postMixInProperties(args, fragment, parent); - //dojo.profile.end(this.widgetType + " postMixInProperties"); - // dojo.debug(this.widgetType, "-> dojo.widget.manager.add"); - dojo.widget.manager.add(this); - // dojo.debug(this.widgetType, "-> buildRendering"); - //dojo.profile.start(this.widgetType + " buildRendering"); - this.buildRendering(args, fragment, parent); - //dojo.profile.end(this.widgetType + " buildRendering"); - // dojo.debug(this.widgetType, "-> initialize"); - //dojo.profile.start(this.widgetType + " initialize"); - this.initialize(args, fragment, parent); - //dojo.profile.end(this.widgetType + " initialize"); - // dojo.debug(this.widgetType, "-> postInitialize"); - // postinitialize includes subcomponent creation - // profile is put directly to function - this.postInitialize(args, fragment, parent); - // dojo.debug(this.widgetType, "-> postCreate"); - //dojo.profile.start(this.widgetType + " postCreate"); - this.postCreate(args, fragment, parent); - //dojo.profile.end(this.widgetType + " postCreate"); - // dojo.debug(this.widgetType, "done!"); - - //dojo.profile.end(this.widgetType + " create"); - - return this; - }, - - destroy: function(finalize){ - // summary: - // Destroy this widget and it's descendants. This is the generic - // "destructor" function that all widget users should call to - // clealy discard with a widget. Once a widget is destroyed, it's - // removed from the manager object. - // finalize: Boolean - // is this function being called part of global environment - // tear-down? - - // FIXME: this is woefully incomplete - if(this.parent){ - this.parent.removeChild(this); - } - this.destroyChildren(); - this.uninitialize(); - this.destroyRendering(finalize); - dojo.widget.manager.removeById(this.widgetId); - }, - - destroyChildren: function(){ - // summary: - // Recursively destroy the children of this widget and their - // descendents. - var widget; - var i=0; - while(this.children.length > i){ - widget = this.children[i]; - if (widget instanceof dojo.widget.Widget) { // find first widget - this.removeChild(widget); - widget.destroy(); - continue; - } - - i++; // skip data object - } - - }, - - getChildrenOfType: function(/*String*/type, recurse){ - // summary: - // return an array of descendant widgets who match the passed type - // recurse: Boolean - // should we try to get all descendants that match? Defaults to - // false. - var ret = []; - var isFunc = dojo.lang.isFunction(type); - if(!isFunc){ - type = type.toLowerCase(); - } - for(var x=0; xsi)){ - this[x][pairs[y].substr(0, si).replace(/^\s+|\s+$/g, "")] = pairs[y].substr(si+1); - } - } - } - }else{ - // the default is straight-up string assignment. When would - // we ever hit this? - this[x] = args[x]; - } - } - }else{ - // collect any extra 'non mixed in' args - this.extraArgs[x.toLowerCase()] = args[x]; - } - } - // dojo.profile.end("mixInProperties"); - }, - - postMixInProperties: function(/*Object*/args, /*Object*/frag, /*Widget*/parent){ - // summary - // Called after the parameters to the widget have been read-in, - // but before the widget template is instantiated. - // Especially useful to set properties that are referenced in the widget template. - }, - - initialize: function(/*Object*/args, /*Object*/frag, /*Widget*/parent){ - // summary: stub function. - return false; - // dojo.unimplemented("dojo.widget.Widget.initialize"); - }, - - postInitialize: function(/*Object*/args, /*Object*/frag, /*Widget*/parent){ - // summary: stub function. - return false; - }, - - postCreate: function(/*Object*/args, /*Object*/frag, /*Widget*/parent){ - // summary: stub function. - return false; - }, - - uninitialize: function(){ - // summary: - // stub function. Over-ride to implement custom widget tear-down - // behavior. - return false; - }, - - buildRendering: function(/*Object*/args, /*Object*/frag, /*Widget*/parent){ - // summary: stub function. SUBCLASSES MUST IMPLEMENT - dojo.unimplemented("dojo.widget.Widget.buildRendering, on "+this.toString()+", "); - return false; - }, - - destroyRendering: function(){ - // summary: stub function. SUBCLASSES MUST IMPLEMENT - dojo.unimplemented("dojo.widget.Widget.destroyRendering"); - return false; - }, - - addedTo: function(parent){ - // summary: - // stub function this is just a signal that can be caught - // parent: Widget - // instance of dojo.widget.Widget that we were added to - }, - - addChild: function(child){ - // summary: stub function. SUBCLASSES MUST IMPLEMENT - dojo.unimplemented("dojo.widget.Widget.addChild"); - return false; - }, - - // Detach the given child widget from me, but don't destroy it - removeChild: function(/*Widget*/widget){ - // summary: - // removes the passed widget instance from this widget but does - // not destroy it - for(var x=0; x -dojo.widget.tags["dojo:connect"] = function(fragment, widgetParser, parentComp){ - var properties = widgetParser.parseProperties(fragment["dojo:connect"]); -} - -// FIXME: if we know the insertion point (to a reasonable location), why then do we: -// - create a template node -// - clone the template node -// - render the clone and set properties -// - remove the clone from the render tree -// - place the clone -// this is quite dumb -dojo.widget.buildWidgetFromParseTree = function(/*String*/ type, - /*Object*/ frag, - /*dojo.widget.Parse*/ parser, - /*Widget, optional*/ parentComp, - /*int, optional*/ insertionIndex, - /*Object*/ localProps){ - - // summary: creates a tree of widgets from the data structure produced by the first-pass parser (frag) - - // test for accessibility mode - dojo.a11y.setAccessibleMode(); - //dojo.profile.start("buildWidgetFromParseTree"); - // FIXME: for codepath from createComponentFromScript, we are now splitting a path - // that we already split and then joined - var stype = type.split(":"); - stype = (stype.length == 2) ? stype[1] : type; - - // FIXME: we don't seem to be doing anything with this! - // var propertySets = parser.getPropertySets(frag); - var localProperties = localProps || parser.parseProperties(frag[frag["ns"]+":"+stype]); - var twidget = dojo.widget.manager.getImplementation(stype,null,null,frag["ns"]); - if(!twidget){ - throw new Error('cannot find "' + type + '" widget'); - }else if (!twidget.create){ - throw new Error('"' + type + '" widget object has no "create" method and does not appear to implement *Widget'); - } - localProperties["dojoinsertionindex"] = insertionIndex; - // FIXME: we lose no less than 5ms in construction! - var ret = twidget.create(localProperties, frag, parentComp, frag["ns"]); - // dojo.profile.end("buildWidgetFromParseTree"); - return ret; -} - -dojo.widget.defineWidget = function(widgetClass, renderer, superclasses, init, props){ - // summary: Create a widget constructor function (aka widgetClass) - // widgetClass: String - // the location in the object hierarchy to place the new widget class constructor - // renderer: String - // usually "html", determines when this delcaration will be used - // superclasses: Function||Function[] - // can be either a single function or an array of functions to be - // mixed in as superclasses. If an array, only the first will be used - // to set prototype inheritance. - // init: Function - // an optional constructor function. Will be called after superclasses are mixed in. - // props: Object - // a map of properties and functions to extend the class prototype with - - // This meta-function does parameter juggling for backward compat and overloading - // if 4th argument is a string, we are using the old syntax - // old sig: widgetClass, superclasses, props (object), renderer (string), init (function) - if(dojo.lang.isString(arguments[3])){ - dojo.widget._defineWidget(arguments[0], arguments[3], arguments[1], arguments[4], arguments[2]); - }else{ - // widgetClass - var args = [ arguments[0] ], p = 3; - if(dojo.lang.isString(arguments[1])){ - // renderer, superclass - args.push(arguments[1], arguments[2]); - }else{ - // superclass - args.push('', arguments[1]); - p = 2; - } - if(dojo.lang.isFunction(arguments[p])){ - // init (function), props (object) - args.push(arguments[p], arguments[p+1]); - }else{ - // props (object) - args.push(null, arguments[p]); - } - dojo.widget._defineWidget.apply(this, args); - } -} - -dojo.widget.defineWidget.renderers = "html|svg|vml"; - -dojo.widget._defineWidget = function(widgetClass /*string*/, renderer /*string*/, superclasses /*function||array*/, init /*function*/, props /*object*/){ - // FIXME: uncomment next line to test parameter juggling ... remove when confidence improves - // dojo.debug('(c:)' + widgetClass + '\n\n(r:)' + renderer + '\n\n(i:)' + init + '\n\n(p:)' + props); - // widgetClass takes the form foo.bar.baz<.renderer>.WidgetName (e.g. foo.bar.baz.WidgetName or foo.bar.baz.html.WidgetName) - var module = widgetClass.split("."); - var type = module.pop(); // type <= WidgetName, module <= foo.bar.baz<.renderer> - var regx = "\\.(" + (renderer ? renderer + '|' : '') + dojo.widget.defineWidget.renderers + ")\\."; - var r = widgetClass.search(new RegExp(regx)); - module = (r < 0 ? module.join(".") : widgetClass.substr(0, r)); - - // deprecated in favor of namespace system, remove for 0.5 - dojo.widget.manager.registerWidgetPackage(module); - - var pos = module.indexOf("."); - var nsName = (pos > -1) ? module.substring(0,pos) : module; - - // FIXME: hrm, this might make things simpler - //dojo.widget.tags.addParseTreeHandler(nsName+":"+type.toLowerCase()); - - props=(props)||{}; - props.widgetType = type; - if((!init)&&(props["classConstructor"])){ - init = props.classConstructor; - delete props.classConstructor; - } - dojo.declare(widgetClass, superclasses, init, props); -} - -dojo.provide("dojo.widget.Parse"); - - - -// -// dojoML parser should be moved out of 'widget', codifying the difference between a 'component' -// and a 'widget'. A 'component' being anything that can be generated from a tag. -// -// a particular dojoML tag would be handled by a registered tagHandler with a hook for a default handler -// if the widget system is loaded, a widget builder would be attach itself as the default handler -// -// widget tags are no longer registered themselves: -// they are now arbitrarily namespaced, so we cannot register them all, and the non-prefixed portions -// are no longer guaranteed unique -// -// therefore dojo.widget.tags should go with this parser code out of the widget module -// - -dojo.widget.Parse = function(/*Object*/fragment){ - this.propertySetsList = []; - this.fragment = fragment; - - this.createComponents = function(/*Object*/frag, /*Object*/parentComp){ - var comps = []; - var built = false; - // if we have items to parse/create at this level, do it! - try{ - if(frag && frag.tagName && (frag != frag.nodeRef)){ - - // these are in fact, not ever for widgets per-se anymore, - // but for other markup elements (aka components) - var djTags = dojo.widget.tags; - - // we split so that you can declare multiple - // non-destructive components from the same ctor node - var tna = String(frag.tagName).split(";"); - for(var x=0; x -1) ? name.substring(0,pos) : "dojo"; - if(pos > -1){ name = name.substring(pos+1); } - var lowerCaseName = name.toLowerCase(); - var namespacedName = ns + ":" + lowerCaseName; - isNode = (dojo.byId(name) && !dojo.widget.tags[namespacedName]); - } - - if((arguments.length == 1) && (isNode || !isNameStr)){ - // we got a DOM node - var xp = new dojo.xml.Parse(); - // FIXME: we should try to find the parent! - var tn = isNode ? dojo.byId(name) : name; - return dojo.widget.getParser().createComponents(xp.parseElement(tn, null, true))[0]; - } - - function fromScript(placeKeeperNode, name, props, ns){ - props[namespacedName] = { - dojotype: [{value: lowerCaseName}], - nodeRef: placeKeeperNode, - fastMixIn: true - }; - props.ns = ns; - return dojo.widget.getParser().createComponentFromScript(placeKeeperNode, name, props, ns); - } - - props = props||{}; - var notRef = false; - var tn = null; - var h = dojo.render.html.capable; - if(h){ - tn = document.createElement("span"); - } - if(!refNode){ - notRef = true; - refNode = tn; - if(h){ - dojo.body().appendChild(refNode); - } - }else if(position){ - dojo.dom.insertAtPosition(tn, refNode, position); - }else{ // otherwise don't replace, but build in-place - tn = refNode; - } - var widgetArray = fromScript(tn, name.toLowerCase(), props, ns); - if( (!widgetArray)||(!widgetArray[0])|| - (typeof widgetArray[0].widgetType == "undefined") ){ - throw new Error("createWidget: Creation of \"" + name + "\" widget failed."); - } - try{ - if(notRef && widgetArray[0].domNode.parentNode){ - widgetArray[0].domNode.parentNode.removeChild(widgetArray[0].domNode); - } - }catch(e){ - /* squelch for Safari */ - dojo.debug(e); - } - return widgetArray[0]; // Widget -} - -dojo.provide("dojo.widget.DomWidget"); - - - - - - - - - - -dojo.widget._cssFiles = {}; -dojo.widget._cssStrings = {}; -dojo.widget._templateCache = {}; - -dojo.widget.defaultStrings = { - // summary: a mapping of strings that are used in template variable replacement - dojoRoot: dojo.hostenv.getBaseScriptUri(), - dojoWidgetModuleUri: dojo.uri.moduleUri("dojo.widget"), - baseScriptUri: dojo.hostenv.getBaseScriptUri() -}; - -dojo.widget.fillFromTemplateCache = function(obj, templatePath, templateString, avoidCache){ - // summary: - // static method to build from a template w/ or w/o a real widget in - // place - // obj: DomWidget - // an instance of dojo.widget.DomWidget to initialize the template for - // templatePath: String - // the URL to get the template from. dojo.uri.Uri is often passed as well. - // templateString: String? - // a string to use in lieu of fetching the template from a URL - // avoidCache: Boolean? - // should the template system not use whatever is in the cache and - // always use the passed templatePath or templateString? - - // dojo.debug("avoidCache:", avoidCache); - var tpath = templatePath || obj.templatePath; - - var tmplts = dojo.widget._templateCache; - if(!tpath && !obj["widgetType"]) { // don't have a real template here - do { - var dummyName = "__dummyTemplate__" + dojo.widget._templateCache.dummyCount++; - } while(tmplts[dummyName]); - obj.widgetType = dummyName; - } - var wt = tpath?tpath.toString():obj.widgetType; - - var ts = tmplts[wt]; - if(!ts){ - tmplts[wt] = {"string": null, "node": null}; - if(avoidCache){ - ts = {}; - }else{ - ts = tmplts[wt]; - } - } - - if((!obj.templateString)&&(!avoidCache)){ - obj.templateString = templateString || ts["string"]; - } - if(obj.templateString){ - obj.templateString = this._sanitizeTemplateString(obj.templateString); - } - - if((!obj.templateNode)&&(!avoidCache)){ - obj.templateNode = ts["node"]; - } - if((!obj.templateNode)&&(!obj.templateString)&&(tpath)){ - // fetch a text fragment and assign it to templateString - // NOTE: we rely on blocking IO here! - var tstring = this._sanitizeTemplateString(dojo.hostenv.getText(tpath)); - - obj.templateString = tstring; - if(!avoidCache){ - tmplts[wt]["string"] = tstring; - } - } - if((!ts["string"])&&(!avoidCache)){ - ts.string = obj.templateString; - } -} - -dojo.widget._sanitizeTemplateString = function(/*String*/tString){ - //summary: Strips declarations so that external SVG and XML - //documents can be added to a document without worry. Also, if the string - //is an HTML document, only the part inside the body tag is returned. - if(tString){ - tString = tString.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im, ""); - var matches = tString.match(/]*>\s*([\s\S]+)\s*<\/body>/im); - if(matches){ - tString = matches[1]; - } - }else{ - tString = ""; - } - return tString; //String -} - -dojo.widget._templateCache.dummyCount = 0; - -// Array: list of properties to search for node-to-property mappings -dojo.widget.attachProperties = ["dojoAttachPoint", "id"]; - -// String: name of the property to use for mapping DOM events to widget functions -dojo.widget.eventAttachProperty = "dojoAttachEvent"; - -// String: property name of code to evaluate when the widget is constructed -dojo.widget.onBuildProperty = "dojoOnBuild"; - -// Array: possible accessibility values to set on widget elements - role or state -dojo.widget.waiNames = ["waiRole", "waiState"]; - -dojo.widget.wai = { - // summary: Contains functions to set accessibility roles and states - // onto widget elements - waiRole: { - // name: String: - // information for mapping accessibility role - name: "waiRole", - // namespace: String: - // URI of the namespace for the set of roles - "namespace": "http://www.w3.org/TR/xhtml2", - // alias: String: - // The alias to assign the namespace - alias: "x2", - // prefix: String: - // The prefix to assign to the role value - prefix: "wairole:" - }, - waiState: { - // name: String: - // information for mapping accessibility state - name: "waiState", - // namespace: String: - // URI of the namespace for the set of states - "namespace": "http://www.w3.org/2005/07/aaa", - // alias: String: - // The alias to assign the namespace - alias: "aaa", - // prefix: String: - // empty string - state value does not require prefix - prefix: "" - }, - setAttr: function(/*DomNode*/node, /*String*/ ns, /*String*/ attr, /*String|Boolean*/value){ - // summary: Use appropriate API to set the role or state attribute onto the element. - // description: In IE use the generic setAttribute() api. Append a namespace - // alias to the attribute name and appropriate prefix to the value. - // Otherwise, use the setAttribueNS api to set the namespaced attribute. Also - // add the appropriate prefix to the attribute value. - if(dojo.render.html.ie){ - node.setAttribute(this[ns].alias+":"+ attr, this[ns].prefix+value); - }else{ - node.setAttributeNS(this[ns]["namespace"], attr, this[ns].prefix+value); - } - }, - - getAttr: function(/*DomNode*/ node, /*String*/ ns, /*String|Boolena*/ attr){ - // Summary: Use the appropriate API to retrieve the role or state value - // Description: In IE use the generic getAttribute() api. An alias value - // was added to the attribute name to simulate a namespace when the attribute - // was set. Otherwise use the getAttributeNS() api to retrieve the state value - if(dojo.render.html.ie){ - return node.getAttribute(this[ns].alias+":"+attr); - }else{ - return node.getAttributeNS(this[ns]["namespace"], attr); - } - }, - removeAttr: function(/*DomNode*/ node, /*String*/ ns, /*String|Boolena*/ attr){ - // summary: Use the appropriate API to remove the role or state value - // description: In IE use the generic removeAttribute() api. An alias value - // was added to the attribute name to simulate a namespace when the attribute - // was set. Otherwise use the removeAttributeNS() api to remove the state value - var success = true; //only IE returns a value - if(dojo.render.html.ie){ - success = node.removeAttribute(this[ns].alias+":"+attr); - }else{ - node.removeAttributeNS(this[ns]["namespace"], attr); - } - return success; - } -}; - -dojo.widget.attachTemplateNodes = function(rootNode, /*Widget*/ targetObj, events ){ - // summary: - // map widget properties and functions to the handlers specified in - // the dom node and it's descendants. This function iterates over all - // nodes and looks for these properties: - // * dojoAttachPoint - // * dojoAttachEvent - // * waiRole - // * waiState - // * any "dojoOn*" proprties passed in the events array - // rootNode: DomNode - // the node to search for properties. All children will be searched. - // events: Array - // a list of properties generated from getDojoEventsFromStr. - - // FIXME: this method is still taking WAAAY too long. We need ways of optimizing: - // a.) what we are looking for on each node - // b.) the nodes that are subject to interrogation (use xpath instead?) - // c.) how expensive event assignment is (less eval(), more connect()) - // var start = new Date(); - var elementNodeType = dojo.dom.ELEMENT_NODE; - - function trim(str){ - return str.replace(/^\s+|\s+$/g, ""); - } - - if(!rootNode){ - rootNode = targetObj.domNode; - } - - if(rootNode.nodeType != elementNodeType){ - return; - } - // alert(events.length); - - var nodes = rootNode.all || rootNode.getElementsByTagName("*"); - var _this = targetObj; - for(var x=-1; x= 0){ - // oh, if only JS had tuple assignment - var funcNameArr = tevt.split(":"); - tevt = trim(funcNameArr[0]); - thisFunc = trim(funcNameArr[1]); - } - if(!thisFunc){ - thisFunc = tevt; - } - - var tf = function(){ - var ntf = new String(thisFunc); - return function(evt){ - if(_this[ntf]){ - _this[ntf](dojo.event.browser.fixEvent(evt, this)); - } - }; - }(); - dojo.event.browser.addListener(baseNode, tevt, tf, false, true); - // dojo.event.browser.addListener(baseNode, tevt, dojo.lang.hitch(_this, thisFunc)); - } - } - - for(var y=0; y=0){ - funcs = dojo.lang.map(thisFunc.split(";"), trim); - } - for(var z=0; z0)&&(typeof arguments[0] == "object")){ - this.create(arguments[0]); - } - }, - { - // templateNode: DomNode - // a node that represents the widget template. Pre-empts both templateString and templatePath. - templateNode: null, - - // templateString String: - // a string that represents the widget template. Pre-empts the - // templatePath. In builds that have their strings "interned", the - // templatePath is converted to an inline templateString, thereby - // preventing a synchronous network call. - templateString: null, - - // templateCssString String: - // a string that represents the CSS for the widgettemplate. - // Pre-empts the templateCssPath. In builds that have their - // strings "interned", the templateCssPath is converted to an - // inline templateCssString, thereby preventing a synchronous - // network call. - templateCssString: null, - - // preventClobber Boolean: - // should the widget not replace the node from which it was - // constructed? Widgets that apply behaviors to pre-existing parts - // of a page can be implemented easily by setting this to "true". - // In these cases, the domNode property will point to the node - // which the widget was created from. - preventClobber: false, - - // domNode DomNode: - // this is our visible representation of the widget! Other DOM - // Nodes may by assigned to other properties, usually through the - // template system's dojoAttachPonit syntax, but the domNode - // property is the canonical "top level" node in widget UI. - domNode: null, - - // containerNode DomNode: - // holds child elements. "containerNode" is generally set via a - // dojoAttachPoint assignment and it designates where widgets that - // are defined as "children" of the parent will be placed - // visually. - containerNode: null, - - // widgetsInTemplate Boolean: - // should we parse the template to find widgets that might be - // declared in markup inside it? false by default. - widgetsInTemplate: false, - - addChild: function(/*Widget*/ widget, overrideContainerNode, pos, ref, insertIndex){ - // summary: - // Process the given child widget, inserting it's dom node as - // a child of our dom node - // overrideContainerNode: DomNode? - // a non-default container node for the widget - // pos: String? - // can be one of "before", "after", "first", or "last". This - // has the same meaning as in dojo.dom.insertAtPosition() - // ref: DomNode? - // a node to place the widget relative to - // insertIndex: int? - // DOM index, same meaning as in dojo.dom.insertAtIndex() - // returns: the widget that was inserted - - // FIXME: should we support addition at an index in the children arr and - // order the display accordingly? Right now we always append. - if(!this.isContainer){ // we aren't allowed to contain other widgets, it seems - dojo.debug("dojo.widget.DomWidget.addChild() attempted on non-container widget"); - return null; - }else{ - if(insertIndex == undefined){ - insertIndex = this.children.length; - } - this.addWidgetAsDirectChild(widget, overrideContainerNode, pos, ref, insertIndex); - this.registerChild(widget, insertIndex); - } - return widget; // Widget - }, - - addWidgetAsDirectChild: function(/*Widget*/ widget, overrideContainerNode, pos, ref, insertIndex){ - // summary: - // Process the given child widget, inserting it's dom node as - // a child of our dom node - // overrideContainerNode: DomNode - // a non-default container node for the widget - // pos: String? - // can be one of "before", "after", "first", or "last". This - // has the same meaning as in dojo.dom.insertAtPosition() - // ref: DomNode? - // a node to place the widget relative to - // insertIndex: int? - // DOM index, same meaning as in dojo.dom.insertAtIndex() - if((!this.containerNode)&&(!overrideContainerNode)){ - this.containerNode = this.domNode; - } - var cn = (overrideContainerNode) ? overrideContainerNode : this.containerNode; - if(!pos){ pos = "after"; } - if(!ref){ - if(!cn){ cn = dojo.body(); } - ref = cn.lastChild; - } - if(!insertIndex) { insertIndex = 0; } - widget.domNode.setAttribute("dojoinsertionindex", insertIndex); - - // insert the child widget domNode directly underneath my domNode, in the - // specified position (by default, append to end) - if(!ref){ - cn.appendChild(widget.domNode); - }else{ - // FIXME: was this meant to be the (ugly hack) way to support insert @ index? - //dojo.dom[pos](widget.domNode, ref, insertIndex); - - // CAL: this appears to be the intended way to insert a node at a given position... - if (pos == 'insertAtIndex'){ - // dojo.debug("idx:", insertIndex, "isLast:", ref === cn.lastChild); - dojo.dom.insertAtIndex(widget.domNode, ref.parentNode, insertIndex); - }else{ - // dojo.debug("pos:", pos, "isLast:", ref === cn.lastChild); - if((pos == "after")&&(ref === cn.lastChild)){ - cn.appendChild(widget.domNode); - }else{ - dojo.dom.insertAtPosition(widget.domNode, cn, pos); - } - } - } - }, - - registerChild: function(widget, insertionIndex){ - // summary: record that given widget descends from me - // widget: Widget - // the widget that is now a child - // insertionIndex: int - // where in the children[] array to place it - - // we need to insert the child at the right point in the parent's - // 'children' array, based on the insertionIndex - - widget.dojoInsertionIndex = insertionIndex; - - var idx = -1; - for(var i=0; i node that can't be inserted back into the original DOM tree - parentComp.addWidgetAsDirectChild(this, "", "insertAtIndex", "", args["dojoinsertionindex"], sourceNodeRef); - } else if (sourceNodeRef){ - // Do in-place replacement of the my source node with my generated dom - if(this.domNode && (this.domNode !== sourceNodeRef)){ - this._sourceNodeRef = dojo.dom.replaceNode(sourceNodeRef, this.domNode); - } - } - - // Register myself with my parent, or with the widget manager if - // I have no parent - // TODO: the code below erroneously adds all programatically generated widgets - // to topWidgets (since we don't know who the parent is until after creation finishes) - if ( parentComp ) { - parentComp.registerChild(this, args.dojoinsertionindex); - } else { - dojo.widget.manager.topWidgets[this.widgetId]=this; - } - - if(this.widgetsInTemplate){ - var parser = new dojo.xml.Parse(); - - var subContainerNode; - //TODO: use xpath here? - var subnodes = this.domNode.getElementsByTagName("*"); - for(var i=0;i= 0){ - // oh, if only JS had tuple assignment - var funcNameArr = tevt.split(":"); - tevt = dojo.string.trim(funcNameArr[0]); - thisFunc = dojo.string.trim(funcNameArr[1]); - } - if(!thisFunc){ - thisFunc = tevt; - } - if(dojo.lang.isFunction(widget[tevt])){ - dojo.event.kwConnect({ - srcObj: widget, - srcFunc: tevt, - targetObj: this, - targetFunc: thisFunc - }); - }else{ - alert(tevt+" is not a function in widget "+widget); - } - } - } - - if(widget.extraArgs['dojoattachpoint']){ - //don't attach widget.domNode here, as we do not know which - //dom node we should connect to (in checkbox widget case, - //it is inputNode). So we make the widget itself available - this[widget.extraArgs['dojoattachpoint']] = widget; - } - } - } - - //dojo.profile.end(this.widgetType + " postInitialize"); - - // Expand my children widgets - /* dojoDontFollow is important for a very special case - * basically if you have a widget that you instantiate from script - * and that widget is a container, and it contains a reference to a parent - * instance, the parser will start recursively parsing until the browser - * complains. So the solution is to set an initialization property of - * dojoDontFollow: true and then it won't recurse where it shouldn't - */ - if(this.isContainer && !frag["dojoDontFollow"]){ - //alert("recurse from " + this.widgetId); - // build any sub-components with us as the parent - dojo.widget.getParser().createSubComponents(frag, this); - } - }, - - // method over-ride - buildRendering: function(/*Object*/ args, /*Object*/ frag){ - // summary: - // Construct the UI for this widget, generally from a - // template. This can be over-ridden for custom UI creation to - // to side-step the template system. This is an - // implementation of the stub function defined in - // dojo.widget.Widget. - - // DOM widgets construct themselves from a template - var ts = dojo.widget._templateCache[this.widgetType]; - - // Handle style for this widget here, as even if templatePath - // is not set, style specified by templateCssString or templateCssPath - // should be applied. templateCssString has higher priority - // than templateCssPath - if(args["templatecsspath"]){ - args["templateCssPath"] = args["templatecsspath"]; - } - var cpath = args["templateCssPath"] || this.templateCssPath; - if(cpath && !dojo.widget._cssFiles[cpath.toString()]){ - if((!this.templateCssString)&&(cpath)){ - this.templateCssString = dojo.hostenv.getText(cpath); - this.templateCssPath = null; - } - dojo.widget._cssFiles[cpath.toString()] = true; - } - - if((this["templateCssString"])&&(!dojo.widget._cssStrings[this.templateCssString])){ - dojo.html.insertCssText(this.templateCssString, null, cpath); - dojo.widget._cssStrings[this.templateCssString] = true; - } - if( - (!this.preventClobber)&&( - (this.templatePath)|| - (this.templateNode)|| - ( - (this["templateString"])&&(this.templateString.length) - )|| - ( - (typeof ts != "undefined")&&( (ts["string"])||(ts["node"]) ) - ) - ) - ){ - // if it looks like we can build the thing from a template, do it! - this.buildFromTemplate(args, frag); - }else{ - // otherwise, assign the DOM node that was the source of the widget - // parsing to be the root node - this.domNode = this.getFragNodeRef(frag); - } - this.fillInTemplate(args, frag); // this is where individual widgets - // will handle population of data - // from properties, remote data - // sets, etc. - }, - - buildFromTemplate: function(/*Object*/ args, /*Object*/ frag){ - // summary: - // Called by buildRendering, creates the actual UI in a DomWidget. - - // var start = new Date(); - // copy template properties if they're already set in the templates object - // dojo.debug("buildFromTemplate:", this); - var avoidCache = false; - if(args["templatepath"]){ -// avoidCache = true; - args["templatePath"] = args["templatepath"]; - } - dojo.widget.fillFromTemplateCache( this, - args["templatePath"], - null, - avoidCache); - var ts = dojo.widget._templateCache[this.templatePath?this.templatePath.toString():this.widgetType]; - if((ts)&&(!avoidCache)){ - if(!this.templateString.length){ - this.templateString = ts["string"]; - } - if(!this.templateNode){ - this.templateNode = ts["node"]; - } - } - var matches = false; - var node = null; - // var tstr = new String(this.templateString); - var tstr = this.templateString; - // attempt to clone a template node, if there is one - if((!this.templateNode)&&(this.templateString)){ - matches = this.templateString.match(/\$\{([^\}]+)\}/g); - if(matches) { - // if we do property replacement, don't create a templateNode - // to clone from. - var hash = this.strings || {}; - // FIXME: should this hash of default replacements be cached in - // templateString? - for(var key in dojo.widget.defaultStrings) { - if(dojo.lang.isUndefined(hash[key])) { - hash[key] = dojo.widget.defaultStrings[key]; - } - } - // FIXME: this is a lot of string munging. Can we make it faster? - for(var i = 0; i < matches.length; i++) { - var key = matches[i]; - key = key.substring(2, key.length-1); - var kval = (key.substring(0, 5) == "this.") ? dojo.lang.getObjPathValue(key.substring(5), this) : hash[key]; - var value; - if((kval)||(dojo.lang.isString(kval))){ - value = new String((dojo.lang.isFunction(kval)) ? kval.call(this, key, this.templateString) : kval); - // Safer substitution, see heading "Attribute values" in - // http://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.3.2 - while (value.indexOf("\"") > -1) { - value=value.replace("\"","""); - } - tstr = tstr.replace(matches[i], value); - } - } - }else{ - // otherwise, we are required to instantiate a copy of the template - // string if one is provided. - - // FIXME: need to be able to distinguish here what should be done - // or provide a generic interface across all DOM implementations - // FIMXE: this breaks if the template has whitespace as its first - // characters - // node = this.createNodesFromText(this.templateString, true); - // this.templateNode = node[0].cloneNode(true); // we're optimistic here - this.templateNode = this.createNodesFromText(this.templateString, true)[0]; - if(!avoidCache){ - ts.node = this.templateNode; - } - } - } - if((!this.templateNode)&&(!matches)){ - dojo.debug("DomWidget.buildFromTemplate: could not create template"); - return false; - }else if(!matches){ - node = this.templateNode.cloneNode(true); - if(!node){ return false; } - }else{ - node = this.createNodesFromText(tstr, true)[0]; - } - - // recurse through the node, looking for, and attaching to, our - // attachment points which should be defined on the template node. - - this.domNode = node; - // dojo.profile.start("attachTemplateNodes"); - this.attachTemplateNodes(); - // dojo.profile.end("attachTemplateNodes"); - - // relocate source contents to templated container node - // this.containerNode must be able to receive children, or exceptions will be thrown - if (this.isContainer && this.containerNode){ - var src = this.getFragNodeRef(frag); - if (src){ - dojo.dom.moveChildren(src, this.containerNode); - } - } - }, - - attachTemplateNodes: function(baseNode, targetObj){ - // summary: - // hooks up event handlers and property/node linkages. Calls - // dojo.widget.attachTemplateNodes to do all the hard work. - // baseNode: DomNode - // defaults to "this.domNode" - // targetObj: Widget - // defaults to "this" - if(!baseNode){ baseNode = this.domNode; } - if(!targetObj){ targetObj = this; } - return dojo.widget.attachTemplateNodes(baseNode, targetObj, - dojo.widget.getDojoEventsFromStr(this.templateString)); - }, - - fillInTemplate: function(){ - // summary: - // stub function! sub-classes may use as a default UI - // initializer function. The UI rendering will be available by - // the time this is called from buildRendering. If - // buildRendering is over-ridden, this function may not be - // fired! - - // dojo.unimplemented("dojo.widget.DomWidget.fillInTemplate"); - }, - - // method over-ride - destroyRendering: function(){ - // summary: UI destructor. Destroy the dom nodes associated w/this widget. - try{ - dojo.dom.destroyNode(this.domNode); - delete this.domNode; - }catch(e){ /* squelch! */ } - if(this._sourceNodeRef){ - try{ - dojo.dom.destroyNode(this._sourceNodeRef); - }catch(e){ /* squelch! */ } - } - }, - - createNodesFromText: function(){ - // summary - // Attempts to create a set of nodes based on the structure of the passed text. - // Implemented in HtmlWidget and SvgWidget. - dojo.unimplemented("dojo.widget.DomWidget.createNodesFromText"); - } - } -); - -dojo.provide("dojo.html.util"); - - -dojo.html.getElementWindow = function(/* HTMLElement */element){ - // summary - // Get the window object where the element is placed in. - return dojo.html.getDocumentWindow( element.ownerDocument ); // Window -} - -dojo.html.getDocumentWindow = function(doc){ - // summary - // Get window object associated with document doc - - // With Safari, there is not wa to retrieve the window from the document, so we must fix it. - if(dojo.render.html.safari && !doc._parentWindow){ - /* - This is a Safari specific function that fix the reference to the parent - window from the document object. - */ - - var fix=function(win){ - win.document._parentWindow=win; - for(var i=0; i - // If you wanted to insert a node into a DOM tree based on the mouse - // position you might use the following code: - //
    -	//	if (gravity(node, e) & gravity.NORTH) { [insert before]; }
    -	//	else { [insert after]; }
    -	//	
    - // - // @param node The node - // @param e The event containing the mouse coordinates - // @return The directions, NORTH or SOUTH and EAST or WEST. These - // are properties of the function. - node = dojo.byId(node); - var mouse = dojo.html.getCursorPosition(e); - - with (dojo.html) { - var absolute = getAbsolutePosition(node, true); - var bb = getBorderBox(node); - var nodecenterx = absolute.x + (bb.width / 2); - var nodecentery = absolute.y + (bb.height / 2); - } - - with (dojo.html.gravity) { - return ((mouse.x < nodecenterx ? WEST : EAST) | (mouse.y < nodecentery ? NORTH : SOUTH)); // integer - } -} - -dojo.html.gravity.NORTH = 1; -dojo.html.gravity.SOUTH = 1 << 1; -dojo.html.gravity.EAST = 1 << 2; -dojo.html.gravity.WEST = 1 << 3; - -dojo.html.overElement = function(/* HTMLElement */element, /* DOMEvent */e){ - // summary - // Returns whether the mouse is over the passed element. - // Element must be display:block (ie, not a ) - element = dojo.byId(element); - var mouse = dojo.html.getCursorPosition(e); - var bb = dojo.html.getBorderBox(element); - var absolute = dojo.html.getAbsolutePosition(element, true, dojo.html.boxSizing.BORDER_BOX); - var top = absolute.y; - var bottom = top + bb.height; - var left = absolute.x; - var right = left + bb.width; - - return (mouse.x >= left - && mouse.x <= right - && mouse.y >= top - && mouse.y <= bottom - ); // boolean -} - -dojo.html.renderedTextContent = function(/* HTMLElement */node){ - // summary - // Attempts to return the text as it would be rendered, with the line breaks - // sorted out nicely. Unfinished. - node = dojo.byId(node); - var result = ""; - if (node == null) { return result; } - for (var i = 0; i < node.childNodes.length; i++) { - switch (node.childNodes[i].nodeType) { - case 1: // ELEMENT_NODE - case 5: // ENTITY_REFERENCE_NODE - var display = "unknown"; - try { - display = dojo.html.getStyle(node.childNodes[i], "display"); - } catch(E) {} - switch (display) { - case "block": case "list-item": case "run-in": - case "table": case "table-row-group": case "table-header-group": - case "table-footer-group": case "table-row": case "table-column-group": - case "table-column": case "table-cell": case "table-caption": - // TODO: this shouldn't insert double spaces on aligning blocks - result += "\n"; - result += dojo.html.renderedTextContent(node.childNodes[i]); - result += "\n"; - break; - - case "none": break; - - default: - if(node.childNodes[i].tagName && node.childNodes[i].tagName.toLowerCase() == "br") { - result += "\n"; - } else { - result += dojo.html.renderedTextContent(node.childNodes[i]); - } - break; - } - break; - case 3: // TEXT_NODE - case 2: // ATTRIBUTE_NODE - case 4: // CDATA_SECTION_NODE - var text = node.childNodes[i].nodeValue; - var textTransform = "unknown"; - try { - textTransform = dojo.html.getStyle(node, "text-transform"); - } catch(E) {} - switch (textTransform){ - case "capitalize": - var words = text.split(' '); - for(var i=0; i]/i).test(txt.replace(/^\s+/))) { - txt = "" + txt + "
    "; - tableType = "cell"; - } else if((/^]/i).test(txt.replace(/^\s+/))) { - txt = "" + txt + "
    "; - tableType = "row"; - } else if((/^<(thead|tbody|tfoot)[\s\r\n>]/i).test(txt.replace(/^\s+/))) { - txt = "" + txt + "
    "; - tableType = "section"; - } - tn.innerHTML = txt; - if(tn["normalize"]){ - tn.normalize(); - } - - var parent = null; - switch(tableType) { - case "cell": - parent = tn.getElementsByTagName("tr")[0]; - break; - case "row": - parent = tn.getElementsByTagName("tbody")[0]; - break; - case "section": - parent = tn.getElementsByTagName("table")[0]; - break; - default: - parent = tn; - break; - } - - /* this doesn't make much sense, I'm assuming it just meant trim() so wrap was replaced with trim - if(wrap){ - var ret = []; - // start hack - var fc = tn.firstChild; - ret[0] = ((fc.nodeValue == " ")||(fc.nodeValue == "\t")) ? fc.nextSibling : fc; - // end hack - // tn.style.display = "none"; - dojo.body().removeChild(tn); - return ret; - } - */ - var nodes = []; - for(var x=0; x view.width) { - x = view.width - w; - match = false; - } else { - x = tryX; - } - x = Math.max(padding[0], x) + scroll.x; - - var y = tryY + h; - if(y > view.height) { - y = view.height - h; - match = false; - } else { - y = tryY; - } - y = Math.max(padding[1], y) + scroll.y; - - if(match){ //perfect match, return now - bestx = x; - besty = y; - bestDistance = 0; - bestCorner = corner; - break; - }else{ - //not perfect, find out whether it is better than the saved one - var dist = Math.pow(x-tryX-scroll.x,2)+Math.pow(y-tryY-scroll.y,2); - if(bestDistance > dist){ - bestDistance = dist; - bestx = x; - besty = y; - bestCorner = corner; - } - } - } - - if(!tryOnly){ - node.style.left = bestx + "px"; - node.style.top = besty + "px"; - } - - return { left: bestx, top: besty, x: bestx, y: besty, dist: bestDistance, corner: bestCorner}; // object -} - -dojo.html.placeOnScreenPoint = function(node, desiredX, desiredY, padding, hasScroll) { - dojo.deprecated("dojo.html.placeOnScreenPoint", "use dojo.html.placeOnScreen() instead", "0.5"); - return dojo.html.placeOnScreen(node, desiredX, desiredY, padding, hasScroll, ['TL', 'TR', 'BL', 'BR']); -} - -dojo.html.placeOnScreenAroundElement = function( - /* HTMLElement */node, - /* HTMLElement */aroundNode, - /* integer */padding, - /* string? */aroundType, - /* string? */aroundCorners, - /* boolean? */tryOnly -){ - // summary - // Like placeOnScreen, except it accepts aroundNode instead of x,y - // and attempts to place node around it. aroundType (see - // dojo.html.boxSizing in html/layout.js) determines which box of the - // aroundNode should be used to calculate the outer box. - // aroundCorners specify Which corner of aroundNode should be - // used to place the node => which corner(s) of node to use (see the - // corners parameter in dojo.html.placeOnScreen) - // aroundCorners: {'TL': 'BL', 'BL': 'TL'} - - var best, bestDistance=Infinity; - aroundNode = dojo.byId(aroundNode); - var oldDisplay = aroundNode.style.display; - aroundNode.style.display=""; - var mb = dojo.html.getElementBox(aroundNode, aroundType); - var aroundNodeW = mb.width; - var aroundNodeH = mb.height; - var aroundNodePos = dojo.html.getAbsolutePosition(aroundNode, true, aroundType); - aroundNode.style.display=oldDisplay; - - for(var nodeCorner in aroundCorners){ - var pos, desiredX, desiredY; - var corners = aroundCorners[nodeCorner]; - - desiredX = aroundNodePos.x + (nodeCorner.charAt(1)=='L' ? 0 : aroundNodeW); - desiredY = aroundNodePos.y + (nodeCorner.charAt(0)=='T' ? 0 : aroundNodeH); - - pos = dojo.html.placeOnScreen(node, desiredX, desiredY, padding, true, corners, true); - if(pos.dist == 0){ - best = pos; - break; - }else{ - //not perfect, find out whether it is better than the saved one - if(bestDistance > pos.dist){ - bestDistance = pos.dist; - best = pos; - } - } - } - - if(!tryOnly){ - node.style.left = best.left + "px"; - node.style.top = best.top + "px"; - } - return best; // object -} - -dojo.html.scrollIntoView = function(/* HTMLElement */node){ - // summary - // Scroll the passed node into view, if it is not. - if(!node){ return; } - - // don't rely on that node.scrollIntoView works just because the function is there - // it doesnt work in Konqueror or Opera even though the function is there and probably - // not safari either - // dont like browser sniffs implementations but sometimes you have to use it - if(dojo.render.html.ie){ - //only call scrollIntoView if there is a scrollbar for this menu, - //otherwise, scrollIntoView will scroll the window scrollbar - if(dojo.html.getBorderBox(node.parentNode).height <= node.parentNode.scrollHeight){ - node.scrollIntoView(false); - } - }else if(dojo.render.html.mozilla){ - // IE, mozilla - node.scrollIntoView(false); - }else{ - var parent = node.parentNode; - var parentBottom = parent.scrollTop + dojo.html.getBorderBox(parent).height; - var nodeBottom = node.offsetTop + dojo.html.getMarginBox(node).height; - if(parentBottom < nodeBottom){ - parent.scrollTop += (nodeBottom - parentBottom); - }else if(parent.scrollTop > node.offsetTop){ - parent.scrollTop -= (parent.scrollTop - node.offsetTop); - } - } -} - -dojo.provide("dojo.lfx.toggle"); - - -dojo.lfx.toggle.plain = { - show: function(node, duration, easing, callback){ - dojo.html.show(node); - if(dojo.lang.isFunction(callback)){ callback(); } - }, - - hide: function(node, duration, easing, callback){ - dojo.html.hide(node); - if(dojo.lang.isFunction(callback)){ callback(); } - } -} - -dojo.lfx.toggle.fade = { - show: function(node, duration, easing, callback){ - dojo.lfx.fadeShow(node, duration, easing, callback).play(); - }, - - hide: function(node, duration, easing, callback){ - dojo.lfx.fadeHide(node, duration, easing, callback).play(); - } -} - -dojo.lfx.toggle.wipe = { - show: function(node, duration, easing, callback){ - dojo.lfx.wipeIn(node, duration, easing, callback).play(); - }, - - hide: function(node, duration, easing, callback){ - dojo.lfx.wipeOut(node, duration, easing, callback).play(); - } -} - -dojo.lfx.toggle.explode = { - show: function(node, duration, easing, callback, explodeSrc){ - dojo.lfx.explode(explodeSrc||{x:0,y:0,width:0,height:0}, node, duration, easing, callback).play(); - }, - - hide: function(node, duration, easing, callback, explodeSrc){ - dojo.lfx.implode(node, explodeSrc||{x:0,y:0,width:0,height:0}, duration, easing, callback).play(); - } -} - -dojo.provide("dojo.widget.HtmlWidget"); - - - - - - - - -dojo.declare("dojo.widget.HtmlWidget", dojo.widget.DomWidget, { - // summary - // Base class for all browser based widgets, or at least "html" widgets. - // The meaning of "html" has become unclear; in practice, all widgets derive from this class. - - // templateCssPath: String - // Path to CSS file for this widget - templateCssPath: null, - - // templatePath: String - // Path to template (HTML file) for this widget - templatePath: null, - - // lang: String - // Language to display this widget in (like en-us). - // Defaults to brower's specified preferred language (typically the language of the OS) - lang: "", - - // toggle: String - // Controls animation effect for when show() and hide() (or toggle()) are called. - // Possible values: "plain", "wipe", "fade", "explode" - toggle: "plain", - - // toggleDuration: Integer - // Number of milliseconds for toggle animation effect to complete - toggleDuration: 150, - - initialize: function(args, frag){ - // summary: called after the widget is rendered; most subclasses won't override or call this function - }, - - postMixInProperties: function(args, frag){ - if(this.lang === ""){this.lang = null;} - // now that we know the setting for toggle, get toggle object - // (default to plain toggler if user specified toggler not present) - this.toggleObj = - dojo.lfx.toggle[this.toggle.toLowerCase()] || dojo.lfx.toggle.plain; - }, - - createNodesFromText: function(txt, wrap){ - return dojo.html.createNodesFromText(txt, wrap); - }, - - destroyRendering: function(finalize){ - try{ - if(this.bgIframe){ - this.bgIframe.remove(); - delete this.bgIframe; - } - if(!finalize && this.domNode){ - dojo.event.browser.clean(this.domNode); - } - dojo.widget.HtmlWidget.superclass.destroyRendering.call(this); - }catch(e){ /* squelch! */ } - }, - - ///////////////////////////////////////////////////////// - // Displaying/hiding the widget - ///////////////////////////////////////////////////////// - isShowing: function(){ - // summary - // Tests whether widget is set to show-mode or hide-mode (see show() and - // hide() methods) - // - // This function is poorly named. Even if widget is in show-mode, - // if it's inside a container that's hidden - // (either a container widget, or just a domnode with display:none), - // then it won't be displayed - return dojo.html.isShowing(this.domNode); // Boolean - }, - - toggleShowing: function(){ - // summary: show or hide the widget, to switch it's state - if(this.isShowing()){ - this.hide(); - }else{ - this.show(); - } - }, - - show: function(){ - // summary: show the widget - if(this.isShowing()){ return; } - this.animationInProgress=true; - this.toggleObj.show(this.domNode, this.toggleDuration, null, - dojo.lang.hitch(this, this.onShow), this.explodeSrc); - }, - - onShow: function(){ - // summary: called after the show() animation has completed - this.animationInProgress=false; - this.checkSize(); - }, - - hide: function(){ - // summary: hide the widget (ending up with display:none) - if(!this.isShowing()){ return; } - this.animationInProgress = true; - this.toggleObj.hide(this.domNode, this.toggleDuration, null, - dojo.lang.hitch(this, this.onHide), this.explodeSrc); - }, - - onHide: function(){ - // summary: called after the hide() animation has completed - this.animationInProgress=false; - }, - - ////////////////////////////////////////////////////////////////////////////// - // Sizing related methods - // If the parent changes size then for each child it should call either - // - resizeTo(): size the child explicitly - // - or checkSize(): notify the child the the parent has changed size - ////////////////////////////////////////////////////////////////////////////// - - _isResized: function(w, h){ - // summary - // Test if my size has changed. - // If width & height are specified then that's my new size; otherwise, - // query outerWidth/outerHeight of my domNode - - // If I'm not being displayed then disregard (show() must - // check if the size has changed) - if(!this.isShowing()){ return false; } - - // If my parent has been resized and I have style="height: 100%" - // or something similar then my size has changed too. - var wh = dojo.html.getMarginBox(this.domNode); - var width=w||wh.width; - var height=h||wh.height; - if(this.width == width && this.height == height){ return false; } - - this.width=width; - this.height=height; - return true; - }, - - checkSize: function(){ - // summary - // Called when my parent has changed size, but my parent won't call resizeTo(). - // This is useful if my size is height:100% or something similar. - // Also called whenever I am shown, because the first time I am shown I may need - // to do size calculations. - if(!this._isResized()){ return; } - this.onResized(); - }, - - resizeTo: function(w, h){ - // summary: explicitly set this widget's size (in pixels). - dojo.html.setMarginBox(this.domNode, { width: w, height: h }); - - // can't do sizing if widget is hidden because referencing node.offsetWidth/node.offsetHeight returns 0. - // do sizing on show() instead. - if(this.isShowing()){ - this.onResized(); - } - }, - - resizeSoon: function(){ - // summary - // schedule onResized() to be called soon, after browser has had - // a little more time to calculate the sizes - if(this.isShowing()){ - dojo.lang.setTimeout(this, this.onResized, 0); - } - }, - - onResized: function(){ - // summary - // Called when my size has changed. - // Must notify children if their size has (possibly) changed. - dojo.lang.forEach(this.children, function(child){ if(child.checkSize){child.checkSize();} }); - } -}); - -dojo.kwCompoundRequire({ - common: ["dojo.xml.Parse", - "dojo.widget.Widget", - "dojo.widget.Parse", - "dojo.widget.Manager"], - browser: ["dojo.widget.DomWidget", - "dojo.widget.HtmlWidget"], - dashboard: ["dojo.widget.DomWidget", - "dojo.widget.HtmlWidget"], - svg: ["dojo.widget.SvgWidget"], - rhino: ["dojo.widget.SwtWidget"] -}); -dojo.provide("dojo.widget.*"); - -dojo.kwCompoundRequire({ - common: [ "dojo.html.common", - "dojo.html.style" ] -}); -dojo.provide("dojo.html.*"); - - -dojo.provide("dojo.html.selection"); - - - - -/** - * type of selection -**/ -dojo.html.selectionType = { - NONE : 0, //selection is empty - TEXT : 1, //selection contains text (may also contains CONTROL objects) - CONTROL : 2 //only one element is selected (such as img, table etc) -}; - -dojo.html.clearSelection = function(){ - // summary: deselect the current selection to make it empty - var _window = dojo.global(); - var _document = dojo.doc(); - try{ - if(_window["getSelection"]){ - if(dojo.render.html.safari){ - // pulled from WebCore/ecma/kjs_window.cpp, line 2536 - _window.getSelection().collapse(); - }else{ - _window.getSelection().removeAllRanges(); - } - }else if(_document.selection){ - if(_document.selection.empty){ - _document.selection.empty(); - }else if(_document.selection.clear){ - _document.selection.clear(); - } - } - return true; - }catch(e){ - dojo.debug(e); - return false; - } -} - -dojo.html.disableSelection = function(/*DomNode*/element){ - // summary: disable selection on a node - element = dojo.byId(element)||dojo.body(); - var h = dojo.render.html; - - if(h.mozilla){ - element.style.MozUserSelect = "none"; - }else if(h.safari){ - element.style.KhtmlUserSelect = "none"; - }else if(h.ie){ - element.unselectable = "on"; - }else{ - return false; - } - return true; -} - -dojo.html.enableSelection = function(/*DomNode*/element){ - // summary: enable selection on a node - element = dojo.byId(element)||dojo.body(); - - var h = dojo.render.html; - if(h.mozilla){ - element.style.MozUserSelect = ""; - }else if(h.safari){ - element.style.KhtmlUserSelect = ""; - }else if(h.ie){ - element.unselectable = "off"; - }else{ - return false; - } - return true; -} - -dojo.html.selectElement = function(/*DomNode*/element){ - dojo.deprecated("dojo.html.selectElement", "replaced by dojo.html.selection.selectElementChildren", 0.5); -} - -dojo.html.selectInputText = function(/*DomNode*/element){ - // summary: select all the text in an input element - var _window = dojo.global(); - var _document = dojo.doc(); - element = dojo.byId(element); - if(_document["selection"] && dojo.body()["createTextRange"]){ // IE - var range = element.createTextRange(); - range.moveStart("character", 0); - range.moveEnd("character", element.value.length); - range.select(); - }else if(_window["getSelection"]){ - var selection = _window.getSelection(); - // FIXME: does this work on Safari? - element.setSelectionRange(0, element.value.length); - } - element.focus(); -} - - -dojo.html.isSelectionCollapsed = function(){ - dojo.deprecated("dojo.html.isSelectionCollapsed", "replaced by dojo.html.selection.isCollapsed", 0.5); - return dojo.html.selection.isCollapsed(); -} - -dojo.lang.mixin(dojo.html.selection, { - getType: function() { - // summary: Get the selection type (like document.select.type in IE). - if(dojo.doc()["selection"]){ //IE - return dojo.html.selectionType[dojo.doc().selection.type.toUpperCase()]; - }else{ - var stype = dojo.html.selectionType.TEXT; - - // Check if the actual selection is a CONTROL (IMG, TABLE, HR, etc...). - var oSel; - try {oSel = dojo.global().getSelection();} - catch (e) {} - - if(oSel && oSel.rangeCount==1){ - var oRange = oSel.getRangeAt(0); - if (oRange.startContainer == oRange.endContainer && (oRange.endOffset - oRange.startOffset) == 1 - && oRange.startContainer.nodeType != dojo.dom.TEXT_NODE) { - stype = dojo.html.selectionType.CONTROL; - } - } - return stype; - } - }, - isCollapsed: function() { - // summary: return whether the current selection is empty - var _window = dojo.global(); - var _document = dojo.doc(); - if(_document["selection"]){ // IE - return _document.selection.createRange().text == ""; - }else if(_window["getSelection"]){ - var selection = _window.getSelection(); - if(dojo.lang.isString(selection)){ // Safari - return selection == ""; - }else{ // Mozilla/W3 - return selection.isCollapsed || selection.toString() == ""; - } - } - }, - getSelectedElement: function() { - // summary: - // Retrieves the selected element (if any), just in the case that a single - // element (object like and image or a table) is selected. - if ( dojo.html.selection.getType() == dojo.html.selectionType.CONTROL ){ - if(dojo.doc()["selection"]){ //IE - var range = dojo.doc().selection.createRange(); - - if ( range && range.item ){ - return dojo.doc().selection.createRange().item(0); - } - }else{ - var selection = dojo.global().getSelection(); - return selection.anchorNode.childNodes[ selection.anchorOffset ]; - } - } - }, - getParentElement: function() { - // summary: - // Get the parent element of the current selection - if(dojo.html.selection.getType() == dojo.html.selectionType.CONTROL){ - var p = dojo.html.selection.getSelectedElement(); - if(p){ return p.parentNode; } - }else{ - if(dojo.doc()["selection"]){ //IE - return dojo.doc().selection.createRange().parentElement(); - }else{ - var selection = dojo.global().getSelection(); - if(selection){ - var node = selection.anchorNode; - - while ( node && node.nodeType != dojo.dom.ELEMENT_NODE ){ - node = node.parentNode; - } - - return node; - } - } - } - }, - getSelectedText: function(){ - // summary: - // Return the text (no html tags) included in the current selection or null if no text is selected - if(dojo.doc()["selection"]){ //IE - if(dojo.html.selection.getType() == dojo.html.selectionType.CONTROL){ - return null; - } - return dojo.doc().selection.createRange().text; - }else{ - var selection = dojo.global().getSelection(); - if(selection){ - return selection.toString(); - } - } - }, - getSelectedHtml: function(){ - // summary: - // Return the html of the current selection or null if unavailable - if(dojo.doc()["selection"]){ //IE - if(dojo.html.selection.getType() == dojo.html.selectionType.CONTROL){ - return null; - } - return dojo.doc().selection.createRange().htmlText; - }else{ - var selection = dojo.global().getSelection(); - if(selection && selection.rangeCount){ - var frag = selection.getRangeAt(0).cloneContents(); - var div = document.createElement("div"); - div.appendChild(frag); - return div.innerHTML; - } - return null; - } - }, - hasAncestorElement: function(/*String*/tagName /* ... */){ - // summary: - // Check whether current selection has a parent element which is of type tagName (or one of the other specified tagName) - return (dojo.html.selection.getAncestorElement.apply(this, arguments) != null); - }, - getAncestorElement: function(/*String*/tagName /* ... */){ - // summary: - // Return the parent element of the current selection which is of type tagName (or one of the other specified tagName) - var node = dojo.html.selection.getSelectedElement() || dojo.html.selection.getParentElement(); - while(node /*&& node.tagName.toLowerCase() != 'body'*/){ - if(dojo.html.selection.isTag(node, arguments).length>0){ - return node; - } - node = node.parentNode; - } - return null; - }, - //modified from dojo.html.isTag to take an array as second parameter - isTag: function(/*DomNode*/node, /*Array*/tags) { - if(node && node.tagName) { - for (var i=0; i. - - Why do we want this? JavaScript has no threads, and even if it did, - threads are hard. Deferreds are a way of abstracting non-blocking - events, such as the final response to an XMLHttpRequest. - - The sequence of callbacks is internally represented as a list - of 2-tuples containing the callback/errback pair. For example, - the following call sequence:: - - var d = new Deferred(); - d.addCallback(myCallback); - d.addErrback(myErrback); - d.addBoth(myBoth); - d.addCallbacks(myCallback, myErrback); - - is translated into a Deferred with the following internal - representation:: - - [ - [myCallback, null], - [null, myErrback], - [myBoth, myBoth], - [myCallback, myErrback] - ] - - The Deferred also keeps track of its current status (fired). - Its status may be one of three things: - - -1: no value yet (initial condition) - 0: success - 1: error - - A Deferred will be in the error state if one of the following - three conditions are met: - - 1. The result given to callback or errback is "instanceof" Error - 2. The previous callback or errback raised an exception while - executing - 3. The previous callback or errback returned a value "instanceof" - Error - - Otherwise, the Deferred will be in the success state. The state of - the Deferred determines the next element in the callback sequence to - run. - - When a callback or errback occurs with the example deferred chain, - something equivalent to the following will happen (imagine that - exceptions are caught and returned):: - - // d.callback(result) or d.errback(result) - if(!(result instanceof Error)){ - result = myCallback(result); - } - if(result instanceof Error){ - result = myErrback(result); - } - result = myBoth(result); - if(result instanceof Error){ - result = myErrback(result); - }else{ - result = myCallback(result); - } - - The result is then stored away in case another step is added to the - callback sequence. Since the Deferred already has a value available, - any new callbacks added will be called immediately. - - There are two other "advanced" details about this implementation that - are useful: - - Callbacks are allowed to return Deferred instances themselves, so you - can build complicated sequences of events with ease. - - The creator of the Deferred may specify a canceller. The canceller - is a function that will be called if Deferred.cancel is called before - the Deferred fires. You can use this to implement clean aborting of - an XMLHttpRequest, etc. Note that cancel will fire the deferred with - a CancelledError (unless your canceller returns another kind of - error), so the errbacks should be prepared to handle that error for - cancellable Deferreds. - - */ - - this.chain = []; - this.id = this._nextId(); - this.fired = -1; - this.paused = 0; - this.results = [null, null]; - this.canceller = canceller; - this.silentlyCancelled = false; -}; - -dojo.lang.extend(dojo.Deferred, { - getFunctionFromArgs: function(){ - var a = arguments; - if((a[0])&&(!a[1])){ - if(dojo.lang.isFunction(a[0])){ - return a[0]; - }else if(dojo.lang.isString(a[0])){ - return dj_global[a[0]]; - } - }else if((a[0])&&(a[1])){ - return dojo.lang.hitch(a[0], a[1]); - } - return null; - }, - - makeCalled: function() { - var deferred = new dojo.Deferred(); - deferred.callback(); - return deferred; - }, - - repr: function(){ - var state; - if(this.fired == -1){ - state = 'unfired'; - }else if(this.fired == 0){ - state = 'success'; - } else { - state = 'error'; - } - return 'Deferred(' + this.id + ', ' + state + ')'; - }, - - toString: dojo.lang.forward("repr"), - - _nextId: (function(){ - var n = 1; - return function(){ return n++; }; - })(), - - cancel: function(){ - // summary: Cancels a Deferred that has not yet received a value, or is - // waiting on another Deferred as its value. - // description: - // If a canceller is defined, the canceller is called. If the - // canceller did not return an error, or there was no canceller, - // then the errback chain is started with CancelledError. - if(this.fired == -1){ - if (this.canceller){ - this.canceller(this); - }else{ - this.silentlyCancelled = true; - } - if(this.fired == -1){ - this.errback(new Error(this.repr())); - } - }else if( (this.fired == 0)&& - (this.results[0] instanceof dojo.Deferred)){ - this.results[0].cancel(); - } - }, - - - _pause: function(){ - // summary: Used internally to signal that it's waiting on another Deferred - this.paused++; - }, - - _unpause: function(){ - // summary: Used internally to signal that it's no longer waiting on - // another Deferred. - this.paused--; - if ((this.paused == 0) && (this.fired >= 0)) { - this._fire(); - } - }, - - _continue: function(res){ - // summary: Used internally when a dependent deferred fires. - this._resback(res); - this._unpause(); - }, - - _resback: function(res){ - // The primitive that means either callback or errback - this.fired = ((res instanceof Error) ? 1 : 0); - this.results[this.fired] = res; - this._fire(); - }, - - _check: function(){ - if(this.fired != -1){ - if(!this.silentlyCancelled){ - dojo.raise("already called!"); - } - this.silentlyCancelled = false; - return; - } - }, - - callback: function(res){ - // summary: Begin the callback sequence with a non-error value. - - /* - callback or errback should only be called once on a given - Deferred. - */ - this._check(); - this._resback(res); - }, - - errback: function(res){ - // summary: Begin the callback sequence with an error result. - this._check(); - if(!(res instanceof Error)){ - res = new Error(res); - } - this._resback(res); - }, - - addBoth: function(cb, cbfn){ - /* summary - Add the same function as both a callback and an errback as the - next element on the callback sequence. This is useful for code - that you want to guarantee to run, e.g. a finalizer. - */ - var enclosed = this.getFunctionFromArgs(cb, cbfn); - if(arguments.length > 2){ - enclosed = dojo.lang.curryArguments(null, enclosed, arguments, 2); - } - return this.addCallbacks(enclosed, enclosed); - }, - - addCallback: function(cb, cbfn){ - // summary: Add a single callback to the end of the callback sequence. - var enclosed = this.getFunctionFromArgs(cb, cbfn); - if(arguments.length > 2){ - enclosed = dojo.lang.curryArguments(null, enclosed, arguments, 2); - } - return this.addCallbacks(enclosed, null); - }, - - addErrback: function(cb, cbfn){ - // summary: Add a single callback to the end of the callback sequence. - var enclosed = this.getFunctionFromArgs(cb, cbfn); - if(arguments.length > 2){ - enclosed = dojo.lang.curryArguments(null, enclosed, arguments, 2); - } - return this.addCallbacks(null, enclosed); - return this.addCallbacks(null, cbfn); - }, - - addCallbacks: function (cb, eb) { - // summary: Add separate callback and errback to the end of the callback - // sequence. - this.chain.push([cb, eb]) - if (this.fired >= 0) { - this._fire(); - } - return this; - }, - - _fire: function(){ - // summary: Used internally to exhaust the callback sequence when a result - // is available. - var chain = this.chain; - var fired = this.fired; - var res = this.results[fired]; - var self = this; - var cb = null; - while (chain.length > 0 && this.paused == 0) { - // Array - var pair = chain.shift(); - var f = pair[fired]; - if (f == null) { - continue; - } - try { - res = f(res); - fired = ((res instanceof Error) ? 1 : 0); - if(res instanceof dojo.Deferred) { - cb = function(res){ - self._continue(res); - } - this._pause(); - } - }catch(err){ - fired = 1; - res = err; - } - } - this.fired = fired; - this.results[fired] = res; - if((cb)&&(this.paused)){ - // this is for "tail recursion" in case the dependent - // deferred is already fired - res.addBoth(cb); - } - } -}); - - /* -*- tab-width: 4 -*- */ -dojo.provide("dojo.widget.RichText"); - - - - - - - - - - -// used to save content -// but do not try doing document.write if we are using xd loading. -// document.write will only work if RichText.js is included in the dojo.js -// file. If it is included in dojo.js and you want to allow rich text saving -// for back/forward actions, then set djConfig.allowXdRichTextSave = true. -if(!djConfig["useXDomain"] || djConfig["allowXdRichTextSave"]){ - if(dojo.hostenv.post_load_){ - (function(){ - var savetextarea = dojo.doc().createElement('textarea'); - savetextarea.id = "dojo.widget.RichText.savedContent"; - savetextarea.style = "display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;"; - dojo.body().appendChild(savetextarea); - })(); - }else{ - //dojo.body() is not available before onLoad is fired - try { - dojo.doc().write(''); - }catch(e){ } - } -} - -dojo.widget.defineWidget( - "dojo.widget.RichText", - dojo.widget.HtmlWidget, - function(){ - // summary: - // dojo.widget.RichText is the core of the WYSIWYG editor in dojo, which - // provides the basic editing features. It also encapsulates the differences - // of different js engines for various browsers - - // contentPreFilters: Array - // pre content filter function register array - this.contentPreFilters = []; - - // contentPostFilters: Array - // post content filter function register array - this.contentPostFilters = []; - - // contentDomPreFilters: Array - // pre content dom filter function register array - this.contentDomPreFilters = []; - - // contentDomPostFilters: Array - // post content dom filter function register array - this.contentDomPostFilters = []; - - // editingAreaStyleSheets: Array - // array to store all the stylesheets applied to the editing area - this.editingAreaStyleSheets=[]; - - if(dojo.render.html.moz){ - this.contentPreFilters.push(this._fixContentForMoz); - } - - this._keyHandlers = {}; - - if(dojo.Deferred){ - this.onLoadDeferred = new dojo.Deferred(); - } - }, - { - // inheritWidth: Boolean - // whether to inherit the parent's width or simply use 100% - inheritWidth: false, - - // focusOnLoad: Boolean - // whether focusing into this instance of richtext when page onload - focusOnLoad: false, - - // saveName: String - // If a save name is specified the content is saved and restored when the user - // leave this page can come back, or if the editor is not properly closed after - // editing has started. - saveName: "", - - // styleSheets: String - // semicolon (";") separated list of css files for the editing area - styleSheets: "", - - // _content: String - // temporary content storage - _content: "", - - // height: String - // set height to fix the editor at a specific height, with scrolling - height: "", - - // minHeight: String - // The minimum height that the editor should have - minHeight: "1em", - - // isClosed: Boolean - isClosed: true, - - // isLoaded: Boolean - isLoaded: false, - - // useActiveX: Boolean - // whether to use the active-x object in IE - useActiveX: false, - - // relativeImageUrls: Boolean - // whether to use relative URLs for images - if this is enabled - // images will be given absolute URLs when inside the editor but - // will be changed to use relative URLs (to the current page) on save - relativeImageUrls: false, - - // _SEPARATOR: String - // used to concat contents from multiple textareas into a single string - _SEPARATOR: "@@**%%__RICHTEXTBOUNDRY__%%**@@", - - // onLoadDeferred: dojo.Deferred - // deferred that can be used to connect to the onLoad function. This - // will only be set if dojo.Deferred is required - onLoadDeferred: null, - - /* Init - *******/ - - fillInTemplate: function(){ - // summary: see dojo.widget.DomWidget - dojo.event.topic.publish("dojo.widget.RichText::init", this); - this.open(); - - - // backwards compatibility, needs to be removed - dojo.event.connect(this, "onKeyPressed", this, "afterKeyPress"); - dojo.event.connect(this, "onKeyPress", this, "keyPress"); - dojo.event.connect(this, "onKeyDown", this, "keyDown"); - dojo.event.connect(this, "onKeyUp", this, "keyUp"); - - this.setupDefaultShortcuts(); - }, - - setupDefaultShortcuts: function(){ - // summary: add some default key handlers - // description: - // Overwrite this to setup your own handlers. The default - // implementation does not use Editor2 commands, but directly - // executes the builtin commands within the underlying browser - // support. - var ctrl = this.KEY_CTRL; - var exec = function (cmd, arg) { - return arguments.length == 1 ? function () { this.execCommand(cmd); } : - function () { this.execCommand(cmd, arg); } - } - this.addKeyHandler("b", ctrl, exec("bold")); - this.addKeyHandler("i", ctrl, exec("italic")); - this.addKeyHandler("u", ctrl, exec("underline")); - this.addKeyHandler("a", ctrl, exec("selectall")); - this.addKeyHandler("s", ctrl, function () { this.save(true); }); - - this.addKeyHandler("1", ctrl, exec("formatblock", "h1")); - this.addKeyHandler("2", ctrl, exec("formatblock", "h2")); - this.addKeyHandler("3", ctrl, exec("formatblock", "h3")); - this.addKeyHandler("4", ctrl, exec("formatblock", "h4")); - - this.addKeyHandler("\\", ctrl, exec("insertunorderedlist")); - if(!dojo.render.html.ie){ - this.addKeyHandler("Z", ctrl, exec("redo")); - } - }, - - // events: Array - // events which should be connected to the underlying editing area - events: ["onBlur", "onFocus", "onKeyPress", "onKeyDown", "onKeyUp", "onClick"], - - /** - * Transforms the node referenced in this.domNode into a rich text editing - * node. This can result in the creation and replacement with an "); + } +}catch(e){/* squelch */} + +if(dojo.render.html.opera){ + dojo.debug("Opera is not supported with dojo.undo.browser, so back/forward detection will not work."); +} + +dojo.undo.browser = { + initialHref: (!dj_undef("window")) ? window.location.href : "", + initialHash: (!dj_undef("window")) ? window.location.hash : "", + + moveForward: false, + historyStack: [], + forwardStack: [], + historyIframe: null, + bookmarkAnchor: null, + locationTimer: null, + + /** + * + */ + setInitialState: function(/*Object*/args){ + //summary: Sets the state object and back callback for the very first page that is loaded. + //description: It is recommended that you call this method as part of an event listener that is registered via + //dojo.addOnLoad(). + //args: Object + // See the addToHistory() function for the list of valid args properties. + this.initialState = this._createState(this.initialHref, args, this.initialHash); + }, + + //FIXME: Would like to support arbitrary back/forward jumps. Have to rework iframeLoaded among other things. + //FIXME: is there a slight race condition in moz using change URL with the timer check and when + // the hash gets set? I think I have seen a back/forward call in quick succession, but not consistent. + addToHistory: function(args){ + //summary: adds a state object (args) to the history list. You must set + //djConfig.preventBackButtonFix = false to use dojo.undo.browser. + + //args: Object + // args can have the following properties: + // To support getting back button notifications, the object argument should implement a + // function called either "back", "backButton", or "handle". The string "back" will be + // passed as the first and only argument to this callback. + // - To support getting forward button notifications, the object argument should implement a + // function called either "forward", "forwardButton", or "handle". The string "forward" will be + // passed as the first and only argument to this callback. + // - If you want the browser location string to change, define "changeUrl" on the object. If the + // value of "changeUrl" is true, then a unique number will be appended to the URL as a fragment + // identifier (http://some.domain.com/path#uniquenumber). If it is any other value that does + // not evaluate to false, that value will be used as the fragment identifier. For example, + // if changeUrl: 'page1', then the URL will look like: http://some.domain.com/path#page1 + // Full example: + // dojo.undo.browser.addToHistory({ + // back: function() { alert('back pressed'); }, + // forward: function() { alert('forward pressed'); }, + // changeUrl: true + // }); + // + // BROWSER NOTES: + // Safari 1.2: + // back button "works" fine, however it's not possible to actually + // DETECT that you've moved backwards by inspecting window.location. + // Unless there is some other means of locating. + // FIXME: perhaps we can poll on history.length? + // Safari 2.0.3+ (and probably 1.3.2+): + // works fine, except when changeUrl is used. When changeUrl is used, + // Safari jumps all the way back to whatever page was shown before + // the page that uses dojo.undo.browser support. + // IE 5.5 SP2: + // back button behavior is macro. It does not move back to the + // previous hash value, but to the last full page load. This suggests + // that the iframe is the correct way to capture the back button in + // these cases. + // Don't test this page using local disk for MSIE. MSIE will not create + // a history list for iframe_history.html if served from a file: URL. + // The XML served back from the XHR tests will also not be properly + // created if served from local disk. Serve the test pages from a web + // server to test in that browser. + // IE 6.0: + // same behavior as IE 5.5 SP2 + // Firefox 1.0+: + // the back button will return us to the previous hash on the same + // page, thereby not requiring an iframe hack, although we do then + // need to run a timer to detect inter-page movement. + + //If addToHistory is called, then that means we prune the + //forward stack -- the user went back, then wanted to + //start a new forward path. + this.forwardStack = []; + + var hash = null; + var url = null; + if(!this.historyIframe){ + if(djConfig["useXDomain"] && !djConfig["dojoIframeHistoryUrl"]){ + dojo.debug("dojo.undo.browser: When using cross-domain Dojo builds," + + " please save iframe_history.html to your domain and set djConfig.dojoIframeHistoryUrl" + + " to the path on your domain to iframe_history.html"); + } + this.historyIframe = window.frames["djhistory"]; + } + if(!this.bookmarkAnchor){ + this.bookmarkAnchor = document.createElement("a"); + dojo.body().appendChild(this.bookmarkAnchor); + this.bookmarkAnchor.style.display = "none"; + } + if(args["changeUrl"]){ + hash = "#"+ ((args["changeUrl"]!==true) ? args["changeUrl"] : (new Date()).getTime()); + + //If the current hash matches the new one, just replace the history object with + //this new one. It doesn't make sense to track different state objects for the same + //logical URL. This matches the browser behavior of only putting in one history + //item no matter how many times you click on the same #hash link, at least in Firefox + //and Safari, and there is no reliable way in those browsers to know if a #hash link + //has been clicked on multiple times. So making this the standard behavior in all browsers + //so that dojo.undo.browser's behavior is the same in all browsers. + if(this.historyStack.length == 0 && this.initialState.urlHash == hash){ + this.initialState = this._createState(url, args, hash); + return; + }else if(this.historyStack.length > 0 && this.historyStack[this.historyStack.length - 1].urlHash == hash){ + this.historyStack[this.historyStack.length - 1] = this._createState(url, args, hash); + return; + } + + this.changingUrl = true; + setTimeout("window.location.href = '"+hash+"'; dojo.undo.browser.changingUrl = false;", 1); + this.bookmarkAnchor.href = hash; + + if(dojo.render.html.ie){ + url = this._loadIframeHistory(); + + var oldCB = args["back"]||args["backButton"]||args["handle"]; + + //The function takes handleName as a parameter, in case the + //callback we are overriding was "handle". In that case, + //we will need to pass the handle name to handle. + var tcb = function(handleName){ + if(window.location.hash != ""){ + setTimeout("window.location.href = '"+hash+"';", 1); + } + //Use apply to set "this" to args, and to try to avoid memory leaks. + oldCB.apply(this, [handleName]); + } + + //Set interceptor function in the right place. + if(args["back"]){ + args.back = tcb; + }else if(args["backButton"]){ + args.backButton = tcb; + }else if(args["handle"]){ + args.handle = tcb; + } + + var oldFW = args["forward"]||args["forwardButton"]||args["handle"]; + + //The function takes handleName as a parameter, in case the + //callback we are overriding was "handle". In that case, + //we will need to pass the handle name to handle. + var tfw = function(handleName){ + if(window.location.hash != ""){ + window.location.href = hash; + } + if(oldFW){ // we might not actually have one + //Use apply to set "this" to args, and to try to avoid memory leaks. + oldFW.apply(this, [handleName]); + } + } + + //Set interceptor function in the right place. + if(args["forward"]){ + args.forward = tfw; + }else if(args["forwardButton"]){ + args.forwardButton = tfw; + }else if(args["handle"]){ + args.handle = tfw; + } + + }else if(dojo.render.html.moz){ + // start the timer + if(!this.locationTimer){ + this.locationTimer = setInterval("dojo.undo.browser.checkLocation();", 200); + } + } + }else{ + url = this._loadIframeHistory(); + } + + this.historyStack.push(this._createState(url, args, hash)); + }, + + checkLocation: function(){ + //summary: private method. Do not call this directly. + if (!this.changingUrl){ + var hsl = this.historyStack.length; + + if((window.location.hash == this.initialHash||window.location.href == this.initialHref)&&(hsl == 1)){ + // FIXME: could this ever be a forward button? + // we can't clear it because we still need to check for forwards. Ugg. + // clearInterval(this.locationTimer); + this.handleBackButton(); + return; + } + + // first check to see if we could have gone forward. We always halt on + // a no-hash item. + if(this.forwardStack.length > 0){ + if(this.forwardStack[this.forwardStack.length-1].urlHash == window.location.hash){ + this.handleForwardButton(); + return; + } + } + + // ok, that didn't work, try someplace back in the history stack + if((hsl >= 2)&&(this.historyStack[hsl-2])){ + if(this.historyStack[hsl-2].urlHash==window.location.hash){ + this.handleBackButton(); + return; + } + } + } + }, + + iframeLoaded: function(evt, ifrLoc){ + //summary: private method. Do not call this directly. + if(!dojo.render.html.opera){ + var query = this._getUrlQuery(ifrLoc.href); + if(query == null){ + // alert("iframeLoaded"); + // we hit the end of the history, so we should go back + if(this.historyStack.length == 1){ + this.handleBackButton(); + } + return; + } + if(this.moveForward){ + // we were expecting it, so it's not either a forward or backward movement + this.moveForward = false; + return; + } + + //Check the back stack first, since it is more likely. + //Note that only one step back or forward is supported. + if(this.historyStack.length >= 2 && query == this._getUrlQuery(this.historyStack[this.historyStack.length-2].url)){ + this.handleBackButton(); + } + else if(this.forwardStack.length > 0 && query == this._getUrlQuery(this.forwardStack[this.forwardStack.length-1].url)){ + this.handleForwardButton(); + } + } + }, + + handleBackButton: function(){ + //summary: private method. Do not call this directly. + + //The "current" page is always at the top of the history stack. + var current = this.historyStack.pop(); + if(!current){ return; } + var last = this.historyStack[this.historyStack.length-1]; + if(!last && this.historyStack.length == 0){ + last = this.initialState; + } + if (last){ + if(last.kwArgs["back"]){ + last.kwArgs["back"](); + }else if(last.kwArgs["backButton"]){ + last.kwArgs["backButton"](); + }else if(last.kwArgs["handle"]){ + last.kwArgs.handle("back"); + } + } + this.forwardStack.push(current); + }, + + handleForwardButton: function(){ + //summary: private method. Do not call this directly. + + var last = this.forwardStack.pop(); + if(!last){ return; } + if(last.kwArgs["forward"]){ + last.kwArgs.forward(); + }else if(last.kwArgs["forwardButton"]){ + last.kwArgs.forwardButton(); + }else if(last.kwArgs["handle"]){ + last.kwArgs.handle("forward"); + } + this.historyStack.push(last); + }, + + _createState: function(url, args, hash){ + //summary: private method. Do not call this directly. + + return {"url": url, "kwArgs": args, "urlHash": hash}; //Object + }, + + _getUrlQuery: function(url){ + //summary: private method. Do not call this directly. + var segments = url.split("?"); + if (segments.length < 2){ + return null; //null + } + else{ + return segments[1]; //String + } + }, + + _loadIframeHistory: function(){ + //summary: private method. Do not call this directly. + var url = (djConfig["dojoIframeHistoryUrl"] || dojo.hostenv.getBaseScriptUri()+'iframe_history.html') + + "?" + (new Date()).getTime(); + this.moveForward = true; + dojo.io.setIFrameSrc(this.historyIframe, url, false); + return url; //String + } +} + +dojo.provide("dojo.io.BrowserIO"); + + + + + + + + +if(!dj_undef("window")) { + +dojo.io.checkChildrenForFile = function(/*DOMNode*/node){ + //summary: Checks any child nodes of node for an input type="file" element. + var hasFile = false; + var inputs = node.getElementsByTagName("input"); + dojo.lang.forEach(inputs, function(input){ + if(hasFile){ return; } + if(input.getAttribute("type")=="file"){ + hasFile = true; + } + }); + return hasFile; //boolean +} + +dojo.io.formHasFile = function(/*DOMNode*/formNode){ + //summary: Just calls dojo.io.checkChildrenForFile(). + return dojo.io.checkChildrenForFile(formNode); //boolean +} + +dojo.io.updateNode = function(/*DOMNode*/node, /*String or Object*/urlOrArgs){ + //summary: Updates a DOMnode with the result of a dojo.io.bind() call. + //node: DOMNode + //urlOrArgs: String or Object + // Either a String that has an URL, or an object containing dojo.io.bind() + // arguments. + node = dojo.byId(node); + var args = urlOrArgs; + if(dojo.lang.isString(urlOrArgs)){ + args = { url: urlOrArgs }; + } + args.mimetype = "text/html"; + args.load = function(t, d, e){ + while(node.firstChild){ + dojo.dom.destroyNode(node.firstChild); + } + node.innerHTML = d; + }; + dojo.io.bind(args); +} + +dojo.io.formFilter = function(/*DOMNode*/node) { + //summary: Returns true if the node is an input element that is enabled, has + //a name, and whose type is one of the following values: ["file", "submit", "image", "reset", "button"] + var type = (node.type||"").toLowerCase(); + return !node.disabled && node.name + && !dojo.lang.inArray(["file", "submit", "image", "reset", "button"], type); //boolean +} + +// TODO: Move to htmlUtils +dojo.io.encodeForm = function(/*DOMNode*/formNode, /*String?*/encoding, /*Function?*/formFilter){ + //summary: Converts the names and values of form elements into an URL-encoded + //string (name=value&name=value...). + //formNode: DOMNode + //encoding: String? + // The encoding to use for the values. Specify a string that starts with + // "utf" (for instance, "utf8"), to use encodeURIComponent() as the encoding + // function. Otherwise, dojo.string.encodeAscii will be used. + //formFilter: Function? + // A function used to filter out form elements. The element node will be passed + // to the formFilter function, and a boolean result is expected (true indicating + // indicating that the element should have its name/value included in the output). + // If no formFilter is specified, then dojo.io.formFilter() will be used. + if((!formNode)||(!formNode.tagName)||(!formNode.tagName.toLowerCase() == "form")){ + dojo.raise("Attempted to encode a non-form element."); + } + if(!formFilter) { formFilter = dojo.io.formFilter; } + var enc = /utf/i.test(encoding||"") ? encodeURIComponent : dojo.string.encodeAscii; + var values = []; + + for(var i = 0; i < formNode.elements.length; i++){ + var elm = formNode.elements[i]; + if(!elm || elm.tagName.toLowerCase() == "fieldset" || !formFilter(elm)) { continue; } + var name = enc(elm.name); + var type = elm.type.toLowerCase(); + + if(type == "select-multiple"){ + for(var j = 0; j < elm.options.length; j++){ + if(elm.options[j].selected) { + values.push(name + "=" + enc(elm.options[j].value)); + } + } + }else if(dojo.lang.inArray(["radio", "checkbox"], type)){ + if(elm.checked){ + values.push(name + "=" + enc(elm.value)); + } + }else{ + values.push(name + "=" + enc(elm.value)); + } + } + + // now collect input type="image", which doesn't show up in the elements array + var inputs = formNode.getElementsByTagName("input"); + for(var i = 0; i < inputs.length; i++) { + var input = inputs[i]; + if(input.type.toLowerCase() == "image" && input.form == formNode + && formFilter(input)) { + var name = enc(input.name); + values.push(name + "=" + enc(input.value)); + values.push(name + ".x=0"); + values.push(name + ".y=0"); + } + } + return values.join("&") + "&"; //String +} + +dojo.io.FormBind = function(/*DOMNode or Object*/args) { + //summary: constructor for a dojo.io.FormBind object. See the Dojo Book for + //some information on usage: http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book23 + //args: DOMNode or Object + // args can either be the DOMNode for a form element, or an object containing + // dojo.io.bind() arguments, one of which should be formNode with the value of + // a form element DOMNode. + this.bindArgs = {}; + + if(args && args.formNode) { + this.init(args); + } else if(args) { + this.init({formNode: args}); + } +} +dojo.lang.extend(dojo.io.FormBind, { + form: null, + + bindArgs: null, + + clickedButton: null, + + init: function(/*DOMNode or Object*/args) { + //summary: Internal function called by the dojo.io.FormBind() constructor + //do not call this method directly. + var form = dojo.byId(args.formNode); + + if(!form || !form.tagName || form.tagName.toLowerCase() != "form") { + throw new Error("FormBind: Couldn't apply, invalid form"); + } else if(this.form == form) { + return; + } else if(this.form) { + throw new Error("FormBind: Already applied to a form"); + } + + dojo.lang.mixin(this.bindArgs, args); + this.form = form; + + this.connect(form, "onsubmit", "submit"); + + for(var i = 0; i < form.elements.length; i++) { + var node = form.elements[i]; + if(node && node.type && dojo.lang.inArray(["submit", "button"], node.type.toLowerCase())) { + this.connect(node, "onclick", "click"); + } + } + + var inputs = form.getElementsByTagName("input"); + for(var i = 0; i < inputs.length; i++) { + var input = inputs[i]; + if(input.type.toLowerCase() == "image" && input.form == form) { + this.connect(input, "onclick", "click"); + } + } + }, + + onSubmit: function(/*DOMNode*/form) { + //summary: Function used to verify that the form is OK to submit. + //Override this function if you want specific form validation done. + return true; //boolean + }, + + submit: function(/*Event*/e) { + //summary: internal function that is connected as a listener to the + //form's onsubmit event. + e.preventDefault(); + if(this.onSubmit(this.form)) { + dojo.io.bind(dojo.lang.mixin(this.bindArgs, { + formFilter: dojo.lang.hitch(this, "formFilter") + })); + } + }, + + click: function(/*Event*/e) { + //summary: internal method that is connected as a listener to the + //form's elements whose click event can submit a form. + var node = e.currentTarget; + if(node.disabled) { return; } + this.clickedButton = node; + }, + + formFilter: function(/*DOMNode*/node) { + //summary: internal function used to know which form element values to include + // in the dojo.io.bind() request. + var type = (node.type||"").toLowerCase(); + var accept = false; + if(node.disabled || !node.name) { + accept = false; + } else if(dojo.lang.inArray(["submit", "button", "image"], type)) { + if(!this.clickedButton) { this.clickedButton = node; } + accept = node == this.clickedButton; + } else { + accept = !dojo.lang.inArray(["file", "submit", "reset", "button"], type); + } + return accept; //boolean + }, + + // in case you don't have dojo.event.* pulled in + connect: function(/*Object*/srcObj, /*Function*/srcFcn, /*Function*/targetFcn) { + //summary: internal function used to connect event listeners to form elements + //that trigger events. Used in case dojo.event is not loaded. + if(dojo.evalObjPath("dojo.event.connect")) { + dojo.event.connect(srcObj, srcFcn, this, targetFcn); + } else { + var fcn = dojo.lang.hitch(this, targetFcn); + srcObj[srcFcn] = function(e) { + if(!e) { e = window.event; } + if(!e.currentTarget) { e.currentTarget = e.srcElement; } + if(!e.preventDefault) { e.preventDefault = function() { window.event.returnValue = false; } } + fcn(e); + } + } + } +}); + +dojo.io.XMLHTTPTransport = new function(){ + //summary: The object that implements the dojo.io.bind transport for XMLHttpRequest. + var _this = this; + + var _cache = {}; // FIXME: make this public? do we even need to? + this.useCache = false; // if this is true, we'll cache unless kwArgs.useCache = false + this.preventCache = false; // if this is true, we'll always force GET requests to cache + + // FIXME: Should this even be a function? or do we just hard code it in the next 2 functions? + function getCacheKey(url, query, method) { + return url + "|" + query + "|" + method.toLowerCase(); + } + + function addToCache(url, query, method, http) { + _cache[getCacheKey(url, query, method)] = http; + } + + function getFromCache(url, query, method) { + return _cache[getCacheKey(url, query, method)]; + } + + this.clearCache = function() { + _cache = {}; + } + + // moved successful load stuff here + function doLoad(kwArgs, http, url, query, useCache) { + if( ((http.status>=200)&&(http.status<300))|| // allow any 2XX response code + (http.status==304)|| // get it out of the cache + (http.status==1223)|| // Internet Explorer mangled the status code + (location.protocol=="file:" && (http.status==0 || http.status==undefined))|| + (location.protocol=="chrome:" && (http.status==0 || http.status==undefined)) + ){ + var ret; + if(kwArgs.method.toLowerCase() == "head"){ + var headers = http.getAllResponseHeaders(); + ret = {}; + ret.toString = function(){ return headers; } + var values = headers.split(/[\r\n]+/g); + for(var i = 0; i < values.length; i++) { + var pair = values[i].match(/^([^:]+)\s*:\s*(.+)$/i); + if(pair) { + ret[pair[1]] = pair[2]; + } + } + }else if(kwArgs.mimetype == "text/javascript"){ + try{ + ret = dj_eval(http.responseText); + }catch(e){ + dojo.debug(e); + dojo.debug(http.responseText); + ret = null; + } + }else if(kwArgs.mimetype.substr(0, 9) == "text/json" || kwArgs.mimetype.substr(0, 16) == "application/json"){ + try{ + ret = dj_eval("("+kwArgs.jsonFilter(http.responseText)+")"); + }catch(e){ + dojo.debug(e); + dojo.debug(http.responseText); + ret = false; + } + }else if((kwArgs.mimetype == "application/xml")|| + (kwArgs.mimetype == "text/xml")){ + ret = http.responseXML; + if(!ret || typeof ret == "string" || !http.getResponseHeader("Content-Type")) { + ret = dojo.dom.createDocumentFromText(http.responseText); + } + }else{ + ret = http.responseText; + } + + if(useCache){ // only cache successful responses + addToCache(url, query, kwArgs.method, http); + } + kwArgs[(typeof kwArgs.load == "function") ? "load" : "handle"]("load", ret, http, kwArgs); + }else{ + var errObj = new dojo.io.Error("XMLHttpTransport Error: "+http.status+" "+http.statusText); + kwArgs[(typeof kwArgs.error == "function") ? "error" : "handle"]("error", errObj, http, kwArgs); + } + } + + // set headers (note: Content-Type will get overriden if kwArgs.contentType is set) + function setHeaders(http, kwArgs){ + if(kwArgs["headers"]) { + for(var header in kwArgs["headers"]) { + if(header.toLowerCase() == "content-type" && !kwArgs["contentType"]) { + kwArgs["contentType"] = kwArgs["headers"][header]; + } else { + http.setRequestHeader(header, kwArgs["headers"][header]); + } + } + } + } + + this.inFlight = []; + this.inFlightTimer = null; + + this.startWatchingInFlight = function(){ + //summary: internal method used to trigger a timer to watch all inflight + //XMLHttpRequests. + if(!this.inFlightTimer){ + // setInterval broken in mozilla x86_64 in some circumstances, see + // https://bugzilla.mozilla.org/show_bug.cgi?id=344439 + // using setTimeout instead + this.inFlightTimer = setTimeout("dojo.io.XMLHTTPTransport.watchInFlight();", 10); + } + } + + this.watchInFlight = function(){ + //summary: internal method that checks each inflight XMLHttpRequest to see + //if it has completed or if the timeout situation applies. + var now = null; + // make sure sync calls stay thread safe, if this callback is called during a sync call + // and this results in another sync call before the first sync call ends the browser hangs + if(!dojo.hostenv._blockAsync && !_this._blockAsync){ + for(var x=this.inFlight.length-1; x>=0; x--){ + try{ + var tif = this.inFlight[x]; + if(!tif || tif.http._aborted || !tif.http.readyState){ + this.inFlight.splice(x, 1); continue; + } + if(4==tif.http.readyState){ + // remove it so we can clean refs + this.inFlight.splice(x, 1); + doLoad(tif.req, tif.http, tif.url, tif.query, tif.useCache); + }else if (tif.startTime){ + //See if this is a timeout case. + if(!now){ + now = (new Date()).getTime(); + } + if(tif.startTime + (tif.req.timeoutSeconds * 1000) < now){ + //Stop the request. + if(typeof tif.http.abort == "function"){ + tif.http.abort(); + } + + // remove it so we can clean refs + this.inFlight.splice(x, 1); + tif.req[(typeof tif.req.timeout == "function") ? "timeout" : "handle"]("timeout", null, tif.http, tif.req); + } + } + }catch(e){ + try{ + var errObj = new dojo.io.Error("XMLHttpTransport.watchInFlight Error: " + e); + tif.req[(typeof tif.req.error == "function") ? "error" : "handle"]("error", errObj, tif.http, tif.req); + }catch(e2){ + dojo.debug("XMLHttpTransport error callback failed: " + e2); + } + } + } + } + + clearTimeout(this.inFlightTimer); + if(this.inFlight.length == 0){ + this.inFlightTimer = null; + return; + } + this.inFlightTimer = setTimeout("dojo.io.XMLHTTPTransport.watchInFlight();", 10); + } + + var hasXmlHttp = dojo.hostenv.getXmlhttpObject() ? true : false; + this.canHandle = function(/*dojo.io.Request*/kwArgs){ + //summary: Tells dojo.io.bind() if this is a good transport to + //use for the particular type of request. This type of transport cannot + //handle forms that have an input type="file" element. + + // FIXME: we need to determine when form values need to be + // multi-part mime encoded and avoid using this transport for those + // requests. + var mlc = kwArgs["mimetype"].toLowerCase()||""; + return hasXmlHttp + && ( + ( + dojo.lang.inArray([ + "text/plain", "text/html", "application/xml", + "text/xml", "text/javascript" + ], mlc + ) + ) || ( + mlc.substr(0, 9) == "text/json" || mlc.substr(0, 16) == "application/json" + ) + ) + && !( kwArgs["formNode"] && dojo.io.formHasFile(kwArgs["formNode"]) ); //boolean + } + + this.multipartBoundary = "45309FFF-BD65-4d50-99C9-36986896A96F"; // unique guid as a boundary value for multipart posts + + this.bind = function(/*dojo.io.Request*/kwArgs){ + //summary: function that sends the request to the server. + + //This function will attach an abort() function to the kwArgs dojo.io.Request object, + //so if you need to abort the request, you can call that method on the request object. + //The following are acceptable properties in kwArgs (in addition to the + //normal dojo.io.Request object properties). + //url: String: URL the server URL to use for the request. + //method: String: the HTTP method to use (GET, POST, etc...). + //mimetype: Specifies what format the result data should be given to the load/handle callback. Valid values are: + // text/javascript, text/json, application/json, application/xml, text/xml. Any other mimetype will give back a text + // string. + //transport: String: specify "XMLHTTPTransport" to force the use of this XMLHttpRequest transport. + //headers: Object: The object property names and values will be sent as HTTP request header + // names and values. + //sendTransport: boolean: If true, then dojo.transport=xmlhttp will be added to the request. + //encoding: String: The type of encoding to use when dealing with the content kwArgs property. + //content: Object: The content object is converted into a name=value&name=value string, by + // using dojo.io.argsFromMap(). The encoding kwArgs property is passed to dojo.io.argsFromMap() + // for use in encoding the names and values. The resulting string is added to the request. + //formNode: DOMNode: a form element node. This should not normally be used. Use new dojo.io.FormBind() instead. + // If formNode is used, then the names and values of the form elements will be converted + // to a name=value&name=value string and added to the request. The encoding kwArgs property is used + // to encode the names and values. + //postContent: String: Raw name=value&name=value string to be included as part of the request. + //back or backButton: Function: A function to be called if the back button is pressed. If this kwArgs property + // is used, then back button support via dojo.undo.browser will be used. See notes for dojo.undo.browser on usage. + // You need to set djConfig.preventBackButtonFix = false to enable back button support. + //changeUrl: boolean or String: Used as part of back button support. See notes for dojo.undo.browser on usage. + //user: String: The user name. Used in conjuction with password. Passed to XMLHttpRequest.open(). + //password: String: The user's password. Used in conjuction with user. Passed to XMLHttpRequest.open(). + //file: Object or Array of Objects: an object simulating a file to be uploaded. file objects should have the following properties: + // name or fileName: the name of the file + // contentType: the MIME content type for the file. + // content: the actual content of the file. + //multipart: boolean: indicates whether this should be a multipart mime request. If kwArgs.file exists, then this + // property is set to true automatically. + //sync: boolean: if true, then a synchronous XMLHttpRequest call is done, + // if false (the default), then an asynchronous call is used. + //preventCache: boolean: If true, then a cache busting parameter is added to the request URL. + // default value is false. + //useCache: boolean: If true, then XMLHttpTransport will keep an internal cache of the server + // response and use that response if a similar request is done again. + // A similar request is one that has the same URL, query string and HTTP method value. + // default is false. + if(!kwArgs["url"]){ + // are we performing a history action? + if( !kwArgs["formNode"] + && (kwArgs["backButton"] || kwArgs["back"] || kwArgs["changeUrl"] || kwArgs["watchForURL"]) + && (!djConfig.preventBackButtonFix)) { + dojo.deprecated("Using dojo.io.XMLHTTPTransport.bind() to add to browser history without doing an IO request", + "Use dojo.undo.browser.addToHistory() instead.", "0.4"); + dojo.undo.browser.addToHistory(kwArgs); + return true; + } + } + + // build this first for cache purposes + var url = kwArgs.url; + var query = ""; + if(kwArgs["formNode"]){ + var ta = kwArgs.formNode.getAttribute("action"); + if((ta)&&(!kwArgs["url"])){ url = ta; } + var tp = kwArgs.formNode.getAttribute("method"); + if((tp)&&(!kwArgs["method"])){ kwArgs.method = tp; } + query += dojo.io.encodeForm(kwArgs.formNode, kwArgs.encoding, kwArgs["formFilter"]); + } + + if(url.indexOf("#") > -1) { + dojo.debug("Warning: dojo.io.bind: stripping hash values from url:", url); + url = url.split("#")[0]; + } + + if(kwArgs["file"]){ + // force post for file transfer + kwArgs.method = "post"; + } + + if(!kwArgs["method"]){ + kwArgs.method = "get"; + } + + // guess the multipart value + if(kwArgs.method.toLowerCase() == "get"){ + // GET cannot use multipart + kwArgs.multipart = false; + }else{ + if(kwArgs["file"]){ + // enforce multipart when sending files + kwArgs.multipart = true; + }else if(!kwArgs["multipart"]){ + // default + kwArgs.multipart = false; + } + } + + if(kwArgs["backButton"] || kwArgs["back"] || kwArgs["changeUrl"]){ + dojo.undo.browser.addToHistory(kwArgs); + } + + var content = kwArgs["content"] || {}; + + if(kwArgs.sendTransport) { + content["dojo.transport"] = "xmlhttp"; + } + + do { // break-block + if(kwArgs.postContent){ + query = kwArgs.postContent; + break; + } + + if(content) { + query += dojo.io.argsFromMap(content, kwArgs.encoding); + } + + if(kwArgs.method.toLowerCase() == "get" || !kwArgs.multipart){ + break; + } + + var t = []; + if(query.length){ + var q = query.split("&"); + for(var i = 0; i < q.length; ++i){ + if(q[i].length){ + var p = q[i].split("="); + t.push( "--" + this.multipartBoundary, + "Content-Disposition: form-data; name=\"" + p[0] + "\"", + "", + p[1]); + } + } + } + + if(kwArgs.file){ + if(dojo.lang.isArray(kwArgs.file)){ + for(var i = 0; i < kwArgs.file.length; ++i){ + var o = kwArgs.file[i]; + t.push( "--" + this.multipartBoundary, + "Content-Disposition: form-data; name=\"" + o.name + "\"; filename=\"" + ("fileName" in o ? o.fileName : o.name) + "\"", + "Content-Type: " + ("contentType" in o ? o.contentType : "application/octet-stream"), + "", + o.content); + } + }else{ + var o = kwArgs.file; + t.push( "--" + this.multipartBoundary, + "Content-Disposition: form-data; name=\"" + o.name + "\"; filename=\"" + ("fileName" in o ? o.fileName : o.name) + "\"", + "Content-Type: " + ("contentType" in o ? o.contentType : "application/octet-stream"), + "", + o.content); + } + } + + if(t.length){ + t.push("--"+this.multipartBoundary+"--", ""); + query = t.join("\r\n"); + } + }while(false); + + // kwArgs.Connection = "close"; + + var async = kwArgs["sync"] ? false : true; + + var preventCache = kwArgs["preventCache"] || + (this.preventCache == true && kwArgs["preventCache"] != false); + var useCache = kwArgs["useCache"] == true || + (this.useCache == true && kwArgs["useCache"] != false ); + + // preventCache is browser-level (add query string junk), useCache + // is for the local cache. If we say preventCache, then don't attempt + // to look in the cache, but if useCache is true, we still want to cache + // the response + if(!preventCache && useCache){ + var cachedHttp = getFromCache(url, query, kwArgs.method); + if(cachedHttp){ + doLoad(kwArgs, cachedHttp, url, query, false); + return; + } + } + + // much of this is from getText, but reproduced here because we need + // more flexibility + var http = dojo.hostenv.getXmlhttpObject(kwArgs); + var received = false; + + // build a handler function that calls back to the handler obj + if(async){ + var startTime = + // FIXME: setting up this callback handler leaks on IE!!! + this.inFlight.push({ + "req": kwArgs, + "http": http, + "url": url, + "query": query, + "useCache": useCache, + "startTime": kwArgs.timeoutSeconds ? (new Date()).getTime() : 0 + }); + this.startWatchingInFlight(); + }else{ + // block async callbacks until sync is in, needed in khtml, others? + _this._blockAsync = true; + } + + if(kwArgs.method.toLowerCase() == "post"){ + // FIXME: need to hack in more flexible Content-Type setting here! + if (!kwArgs.user) { + http.open("POST", url, async); + }else{ + http.open("POST", url, async, kwArgs.user, kwArgs.password); + } + setHeaders(http, kwArgs); + http.setRequestHeader("Content-Type", kwArgs.multipart ? ("multipart/form-data; boundary=" + this.multipartBoundary) : + (kwArgs.contentType || "application/x-www-form-urlencoded")); + try{ + http.send(query); + }catch(e){ + if(typeof http.abort == "function"){ + http.abort(); + } + doLoad(kwArgs, {status: 404}, url, query, useCache); + } + }else{ + var tmpUrl = url; + if(query != "") { + tmpUrl += (tmpUrl.indexOf("?") > -1 ? "&" : "?") + query; + } + if(preventCache) { + tmpUrl += (dojo.string.endsWithAny(tmpUrl, "?", "&") + ? "" : (tmpUrl.indexOf("?") > -1 ? "&" : "?")) + "dojo.preventCache=" + new Date().valueOf(); + } + if (!kwArgs.user) { + http.open(kwArgs.method.toUpperCase(), tmpUrl, async); + }else{ + http.open(kwArgs.method.toUpperCase(), tmpUrl, async, kwArgs.user, kwArgs.password); + } + setHeaders(http, kwArgs); + try { + http.send(null); + }catch(e) { + if(typeof http.abort == "function"){ + http.abort(); + } + doLoad(kwArgs, {status: 404}, url, query, useCache); + } + } + + if( !async ) { + doLoad(kwArgs, http, url, query, useCache); + _this._blockAsync = false; + } + + kwArgs.abort = function(){ + try{// khtml doesent reset readyState on abort, need this workaround + http._aborted = true; + }catch(e){/*squelsh*/} + return http.abort(); + } + + return; + } + dojo.io.transports.addTransport("XMLHTTPTransport"); +} + +} + +dojo.provide("dojo.io.cookie"); + +dojo.io.cookie.setCookie = function(/*String*/name, /*String*/value, + /*Number?*/days, /*String?*/path, + /*String?*/domain, /*boolean?*/secure){ + //summary: sets a cookie. + var expires = -1; + if((typeof days == "number")&&(days >= 0)){ + var d = new Date(); + d.setTime(d.getTime()+(days*24*60*60*1000)); + expires = d.toGMTString(); + } + value = escape(value); + document.cookie = name + "=" + value + ";" + + (expires != -1 ? " expires=" + expires + ";" : "") + + (path ? "path=" + path : "") + + (domain ? "; domain=" + domain : "") + + (secure ? "; secure" : ""); +} + +dojo.io.cookie.set = dojo.io.cookie.setCookie; + +dojo.io.cookie.getCookie = function(/*String*/name){ + //summary: Gets a cookie with the given name. + + // FIXME: Which cookie should we return? + // If there are cookies set for different sub domains in the current + // scope there could be more than one cookie with the same name. + // I think taking the last one in the list takes the one from the + // deepest subdomain, which is what we're doing here. + var idx = document.cookie.lastIndexOf(name+'='); + if(idx == -1) { return null; } + var value = document.cookie.substring(idx+name.length+1); + var end = value.indexOf(';'); + if(end == -1) { end = value.length; } + value = value.substring(0, end); + value = unescape(value); + return value; //String +} + +dojo.io.cookie.get = dojo.io.cookie.getCookie; + +dojo.io.cookie.deleteCookie = function(/*String*/name){ + //summary: Deletes a cookie with the given name. + dojo.io.cookie.setCookie(name, "-", 0); +} + +dojo.io.cookie.setObjectCookie = function( /*String*/name, /*Object*/obj, + /*Number?*/days, /*String?*/path, + /*String?*/domain, /*boolean?*/secure, + /*boolean?*/clearCurrent){ + //summary: Takes an object, serializes it to a cookie value, and either + //sets a cookie with the serialized value. + //description: If clearCurrent is true, then any current cookie value + //for this object will be replaced with the the new serialized object value. + //If clearCurrent is false, then the existing cookie value will be modified + //with any changes from the new object value. + //Objects must be simple name/value pairs where the value is either a string + //or a number. Any other value will be ignored. + if(arguments.length == 5){ // for backwards compat + clearCurrent = domain; + domain = null; + secure = null; + } + var pairs = [], cookie, value = ""; + if(!clearCurrent){ + cookie = dojo.io.cookie.getObjectCookie(name); + } + if(days >= 0){ + if(!cookie){ cookie = {}; } + for(var prop in obj){ + if(obj[prop] == null){ + delete cookie[prop]; + }else if((typeof obj[prop] == "string")||(typeof obj[prop] == "number")){ + cookie[prop] = obj[prop]; + } + } + prop = null; + for(var prop in cookie){ + pairs.push(escape(prop) + "=" + escape(cookie[prop])); + } + value = pairs.join("&"); + } + dojo.io.cookie.setCookie(name, value, days, path, domain, secure); +} + +dojo.io.cookie.getObjectCookie = function(/*String*/name){ + //summary: Gets an object value for the given cookie name. The complement of + //dojo.io.cookie.setObjectCookie(). + var values = null, cookie = dojo.io.cookie.getCookie(name); + if(cookie){ + values = {}; + var pairs = cookie.split("&"); + for(var i = 0; i < pairs.length; i++){ + var pair = pairs[i].split("="); + var value = pair[1]; + if( isNaN(value) ){ value = unescape(pair[1]); } + values[ unescape(pair[0]) ] = value; + } + } + return values; +} + +dojo.io.cookie.isSupported = function(){ + //summary: Tests the browser to see if cookies are enabled. + if(typeof navigator.cookieEnabled != "boolean"){ + dojo.io.cookie.setCookie("__TestingYourBrowserForCookieSupport__", + "CookiesAllowed", 90, null); + var cookieVal = dojo.io.cookie.getCookie("__TestingYourBrowserForCookieSupport__"); + navigator.cookieEnabled = (cookieVal == "CookiesAllowed"); + if(navigator.cookieEnabled){ + // FIXME: should we leave this around? + this.deleteCookie("__TestingYourBrowserForCookieSupport__"); + } + } + return navigator.cookieEnabled; //boolean +} + +// need to leave this in for backwards-compat from 0.1 for when it gets pulled in by dojo.io.* +if(!dojo.io.cookies){ dojo.io.cookies = dojo.io.cookie; } + +dojo.kwCompoundRequire({ + common: ["dojo.io.common"], + rhino: ["dojo.io.RhinoIO"], + browser: ["dojo.io.BrowserIO", "dojo.io.cookie"], + dashboard: ["dojo.io.BrowserIO", "dojo.io.cookie"] +}); +dojo.provide("dojo.io.*"); + +dojo.provide("dojo.event.common"); + + + + + +// TODO: connection filter functions +// these are functions that accept a method invocation (like around +// advice) and return a boolean based on it. That value determines +// whether or not the connection proceeds. It could "feel" like around +// advice for those who know what it is (calling proceed() or not), +// but I think presenting it as a "filter" and/or calling it with the +// function args and not the MethodInvocation might make it more +// palletable to "normal" users than around-advice currently is +// TODO: execution scope mangling +// YUI's event facility by default executes listeners in the context +// of the source object. This is very odd, but should probably be +// supported as an option (both for the source and for the dest). It +// can be thought of as a connection-specific hitch(). +// TODO: more resiliency for 4+ arguments to connect() + +dojo.event = new function(){ + this._canTimeout = dojo.lang.isFunction(dj_global["setTimeout"])||dojo.lang.isAlien(dj_global["setTimeout"]); + + // FIXME: where should we put this method (not here!)? + function interpolateArgs(args, searchForNames){ + var dl = dojo.lang; + var ao = { + srcObj: dj_global, + srcFunc: null, + adviceObj: dj_global, + adviceFunc: null, + aroundObj: null, + aroundFunc: null, + adviceType: (args.length>2) ? args[0] : "after", + precedence: "last", + once: false, + delay: null, + rate: 0, + adviceMsg: false, + maxCalls: -1 + }; + + switch(args.length){ + case 0: return; + case 1: return; + case 2: + ao.srcFunc = args[0]; + ao.adviceFunc = args[1]; + break; + case 3: + if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isString(args[2]))){ + ao.adviceType = "after"; + ao.srcObj = args[0]; + ao.srcFunc = args[1]; + ao.adviceFunc = args[2]; + }else if((dl.isString(args[1]))&&(dl.isString(args[2]))){ + ao.srcFunc = args[1]; + ao.adviceFunc = args[2]; + }else if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isFunction(args[2]))){ + ao.adviceType = "after"; + ao.srcObj = args[0]; + ao.srcFunc = args[1]; + var tmpName = dl.nameAnonFunc(args[2], ao.adviceObj, searchForNames); + ao.adviceFunc = tmpName; + }else if((dl.isFunction(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))){ + ao.adviceType = "after"; + ao.srcObj = dj_global; + var tmpName = dl.nameAnonFunc(args[0], ao.srcObj, searchForNames); + ao.srcFunc = tmpName; + ao.adviceObj = args[1]; + ao.adviceFunc = args[2]; + } + break; + case 4: + if((dl.isObject(args[0]))&&(dl.isObject(args[2]))){ + // we can assume that we've got an old-style "connect" from + // the sigslot school of event attachment. We therefore + // assume after-advice. + ao.adviceType = "after"; + ao.srcObj = args[0]; + ao.srcFunc = args[1]; + ao.adviceObj = args[2]; + ao.adviceFunc = args[3]; + }else if((dl.isString(args[0]))&&(dl.isString(args[1]))&&(dl.isObject(args[2]))){ + ao.adviceType = args[0]; + ao.srcObj = dj_global; + ao.srcFunc = args[1]; + ao.adviceObj = args[2]; + ao.adviceFunc = args[3]; + }else if((dl.isString(args[0]))&&(dl.isFunction(args[1]))&&(dl.isObject(args[2]))){ + ao.adviceType = args[0]; + ao.srcObj = dj_global; + var tmpName = dl.nameAnonFunc(args[1], dj_global, searchForNames); + ao.srcFunc = tmpName; + ao.adviceObj = args[2]; + ao.adviceFunc = args[3]; + }else if((dl.isString(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))&&(dl.isFunction(args[3]))){ + ao.srcObj = args[1]; + ao.srcFunc = args[2]; + var tmpName = dl.nameAnonFunc(args[3], dj_global, searchForNames); + ao.adviceObj = dj_global; + ao.adviceFunc = tmpName; + }else if(dl.isObject(args[1])){ + ao.srcObj = args[1]; + ao.srcFunc = args[2]; + ao.adviceObj = dj_global; + ao.adviceFunc = args[3]; + }else if(dl.isObject(args[2])){ + ao.srcObj = dj_global; + ao.srcFunc = args[1]; + ao.adviceObj = args[2]; + ao.adviceFunc = args[3]; + }else{ + ao.srcObj = ao.adviceObj = ao.aroundObj = dj_global; + ao.srcFunc = args[1]; + ao.adviceFunc = args[2]; + ao.aroundFunc = args[3]; + } + break; + case 6: + ao.srcObj = args[1]; + ao.srcFunc = args[2]; + ao.adviceObj = args[3] + ao.adviceFunc = args[4]; + ao.aroundFunc = args[5]; + ao.aroundObj = dj_global; + break; + default: + ao.srcObj = args[1]; + ao.srcFunc = args[2]; + ao.adviceObj = args[3] + ao.adviceFunc = args[4]; + ao.aroundObj = args[5]; + ao.aroundFunc = args[6]; + ao.once = args[7]; + ao.delay = args[8]; + ao.rate = args[9]; + ao.adviceMsg = args[10]; + ao.maxCalls = (!isNaN(parseInt(args[11]))) ? args[11] : -1; + break; + } + + if(dl.isFunction(ao.aroundFunc)){ + var tmpName = dl.nameAnonFunc(ao.aroundFunc, ao.aroundObj, searchForNames); + ao.aroundFunc = tmpName; + } + + if(dl.isFunction(ao.srcFunc)){ + ao.srcFunc = dl.getNameInObj(ao.srcObj, ao.srcFunc); + } + + if(dl.isFunction(ao.adviceFunc)){ + ao.adviceFunc = dl.getNameInObj(ao.adviceObj, ao.adviceFunc); + } + + if((ao.aroundObj)&&(dl.isFunction(ao.aroundFunc))){ + ao.aroundFunc = dl.getNameInObj(ao.aroundObj, ao.aroundFunc); + } + + if(!ao.srcObj){ + dojo.raise("bad srcObj for srcFunc: "+ao.srcFunc); + } + if(!ao.adviceObj){ + dojo.raise("bad adviceObj for adviceFunc: "+ao.adviceFunc); + } + + if(!ao.adviceFunc){ + dojo.debug("bad adviceFunc for srcFunc: "+ao.srcFunc); + dojo.debugShallow(ao); + } + + return ao; + } + + this.connect = function(/*...*/){ + // summary: + // dojo.event.connect is the glue that holds most Dojo-based + // applications together. Most combinations of arguments are + // supported, with the connect() method attempting to disambiguate + // the implied types of positional parameters. The following will + // all work: + // dojo.event.connect("globalFunctionName1", "globalFunctionName2"); + // dojo.event.connect(functionReference1, functionReference2); + // dojo.event.connect("globalFunctionName1", functionReference2); + // dojo.event.connect(functionReference1, "globalFunctionName2"); + // dojo.event.connect(scope1, "functionName1", "globalFunctionName2"); + // dojo.event.connect("globalFunctionName1", scope2, "functionName2"); + // dojo.event.connect(scope1, "functionName1", scope2, "functionName2"); + // dojo.event.connect("after", scope1, "functionName1", scope2, "functionName2"); + // dojo.event.connect("before", scope1, "functionName1", scope2, "functionName2"); + // dojo.event.connect("around", scope1, "functionName1", + // scope2, "functionName2", + // aroundFunctionReference); + // dojo.event.connect("around", scope1, "functionName1", + // scope2, "functionName2", + // scope3, "aroundFunctionName"); + // dojo.event.connect("before-around", scope1, "functionName1", + // scope2, "functionName2", + // aroundFunctionReference); + // dojo.event.connect("after-around", scope1, "functionName1", + // scope2, "functionName2", + // aroundFunctionReference); + // dojo.event.connect("after-around", scope1, "functionName1", + // scope2, "functionName2", + // scope3, "aroundFunctionName"); + // dojo.event.connect("around", scope1, "functionName1", + // scope2, "functionName2", + // scope3, "aroundFunctionName", true, 30); + // dojo.event.connect("around", scope1, "functionName1", + // scope2, "functionName2", + // scope3, "aroundFunctionName", null, null, 10); + // adviceType: + // Optional. String. One of "before", "after", "around", + // "before-around", or "after-around". FIXME + // srcObj: + // the scope in which to locate/execute the named srcFunc. Along + // with srcFunc, this creates a way to dereference the function to + // call. So if the function in question is "foo.bar", the + // srcObj/srcFunc pair would be foo and "bar", where "bar" is a + // string and foo is an object reference. + // srcFunc: + // the name of the function to connect to. When it is executed, + // the listener being registered with this call will be called. + // The adviceType defines the call order between the source and + // the target functions. + // adviceObj: + // the scope in which to locate/execute the named adviceFunc. + // adviceFunc: + // the name of the function being conected to srcObj.srcFunc + // aroundObj: + // the scope in which to locate/execute the named aroundFunc. + // aroundFunc: + // the name of, or a reference to, the function that will be used + // to mediate the advice call. Around advice requires a special + // unary function that will be passed a "MethodInvocation" object. + // These objects have several important properties, namely: + // - args + // a mutable array of arguments to be passed into the + // wrapped function + // - proceed + // a function that "continues" the invocation. The result + // of this function is the return of the wrapped function. + // You can then manipulate this return before passing it + // back out (or take further action based on it). + // once: + // boolean that determines whether or not this connect() will + // create a new connection if an identical connect() has already + // been made. Defaults to "false". + // delay: + // an optional delay (in ms), as an integer, for dispatch of a + // listener after the source has been fired. + // rate: + // an optional rate throttling parameter (integer, in ms). When + // specified, this particular connection will not fire more than + // once in the interval specified by the rate + // adviceMsg: + // boolean. Should the listener have all the parameters passed in + // as a single argument? + + /* + ao.adviceType = args[0]; + ao.srcObj = args[1]; + ao.srcFunc = args[2]; + ao.adviceObj = args[3] + ao.adviceFunc = args[4]; + ao.aroundObj = args[5]; + ao.aroundFunc = args[6]; + ao.once = args[7]; + ao.delay = args[8]; + ao.rate = args[9]; + ao.adviceMsg = args[10]; + ao.maxCalls = args[11]; + */ + if(arguments.length == 1){ + var ao = arguments[0]; + }else{ + var ao = interpolateArgs(arguments, true); + } + if(dojo.lang.isString(ao.srcFunc) && (ao.srcFunc.toLowerCase() == "onkey") ){ + if(dojo.render.html.ie){ + ao.srcFunc = "onkeydown"; + this.connect(ao); + } + ao.srcFunc = "onkeypress"; + } + + if(dojo.lang.isArray(ao.srcObj) && ao.srcObj!=""){ + var tmpAO = {}; + for(var x in ao){ + tmpAO[x] = ao[x]; + } + var mjps = []; + dojo.lang.forEach(ao.srcObj, function(src){ + if((dojo.render.html.capable)&&(dojo.lang.isString(src))){ + src = dojo.byId(src); + // dojo.debug(src); + } + tmpAO.srcObj = src; + // dojo.debug(tmpAO.srcObj, tmpAO.srcFunc); + // dojo.debug(tmpAO.adviceObj, tmpAO.adviceFunc); + mjps.push(dojo.event.connect.call(dojo.event, tmpAO)); + }); + return mjps; + } + + // FIXME: just doing a "getForMethod()" seems to be enough to put this into infinite recursion!! + var mjp = dojo.event.MethodJoinPoint.getForMethod(ao.srcObj, ao.srcFunc); + if(ao.adviceFunc){ + var mjp2 = dojo.event.MethodJoinPoint.getForMethod(ao.adviceObj, ao.adviceFunc); + } + + mjp.kwAddAdvice(ao); + + // advanced users might want to fsck w/ the join point manually + return mjp; // a MethodJoinPoint object + } + + this.log = function(/*object or funcName*/ a1, /*funcName*/ a2){ + // summary: + // a function that will wrap and log all calls to the specified + // a1.a2() function. If only a1 is passed, it'll be used as a + // function or function name on the global context. Logging will + // be sent to dojo.debug + // a1: + // if a2 is passed, this should be an object. If not, it can be a + // function or function name. + // a2: + // a function name + var kwArgs; + if((arguments.length == 1)&&(typeof a1 == "object")){ + kwArgs = a1; + }else{ + kwArgs = { + srcObj: a1, + srcFunc: a2 + }; + } + kwArgs.adviceFunc = function(){ + var argsStr = []; + for(var x=0; x= this.jp_.around.length){ + return this.jp_.object[this.jp_.methodname].apply(this.jp_.object, this.args); + // return this.jp_.run_before_after(this.object, this.args); + }else{ + var ti = this.jp_.around[this.around_index]; + var mobj = ti[0]||dj_global; + var meth = ti[1]; + return mobj[meth].call(mobj, this); + } +} + + +dojo.event.MethodJoinPoint = function(/*Object*/obj, /*String*/funcName){ + this.object = obj||dj_global; + this.methodname = funcName; + this.methodfunc = this.object[funcName]; + this.squelch = false; + // this.before = []; + // this.after = []; + // this.around = []; +} + +dojo.event.MethodJoinPoint.getForMethod = function(/*Object*/obj, /*String*/funcName){ + // summary: + // "static" class function for returning a MethodJoinPoint from a + // scoped function. If one doesn't exist, one is created. + // obj: + // the scope to search for the function in + // funcName: + // the name of the function to return a MethodJoinPoint for + if(!obj){ obj = dj_global; } + var ofn = obj[funcName]; + if(!ofn){ + // supply a do-nothing method implementation + ofn = obj[funcName] = function(){}; + if(!obj[funcName]){ + // e.g. cannot add to inbuilt objects in IE6 + dojo.raise("Cannot set do-nothing method on that object "+funcName); + } + }else if((typeof ofn != "function")&&(!dojo.lang.isFunction(ofn))&&(!dojo.lang.isAlien(ofn))){ + // FIXME: should we throw an exception here instead? + return null; + } + // we hide our joinpoint instance in obj[funcName + '$joinpoint'] + var jpname = funcName + "$joinpoint"; + var jpfuncname = funcName + "$joinpoint$method"; + var joinpoint = obj[jpname]; + if(!joinpoint){ + var isNode = false; + if(dojo.event["browser"]){ + if( (obj["attachEvent"])|| + (obj["nodeType"])|| + (obj["addEventListener"]) ){ + isNode = true; + dojo.event.browser.addClobberNodeAttrs(obj, [jpname, jpfuncname, funcName]); + } + } + var origArity = ofn.length; + obj[jpfuncname] = ofn; + // joinpoint = obj[jpname] = new dojo.event.MethodJoinPoint(obj, funcName); + joinpoint = obj[jpname] = new dojo.event.MethodJoinPoint(obj, jpfuncname); + + if(!isNode){ + obj[funcName] = function(){ + // var args = []; + // for(var x=0; x -1){ + if(maxCount == 0){ + return; + } + marr[7]--; + } + var undef; + + var to = { + args: [], + jp_: this, + object: obj, + proceed: function(){ + return callObj[callFunc].apply(callObj, to.args); + } + }; + to.args = aargs; + + var delay = parseInt(marr[4]); + var hasDelay = ((!isNaN(delay))&&(marr[4]!==null)&&(typeof marr[4] != "undefined")); + if(marr[5]){ + var rate = parseInt(marr[5]); + var cur = new Date(); + var timerSet = false; + if((marr["last"])&&((cur-marr.last)<=rate)){ + if(dojo.event._canTimeout){ + if(marr["delayTimer"]){ + clearTimeout(marr.delayTimer); + } + var tod = parseInt(rate*2); // is rate*2 naive? + var mcpy = dojo.lang.shallowCopy(marr); + marr.delayTimer = setTimeout(function(){ + // FIXME: on IE at least, event objects from the + // browser can go out of scope. How (or should?) we + // deal with it? + mcpy[5] = 0; + unrollAdvice(mcpy); + }, tod); + } + return; + }else{ + marr.last = cur; + } + } + + // FIXME: need to enforce rates for a connection here! + + if(aroundFunc){ + // NOTE: around advice can't delay since we might otherwise depend + // on execution order! + aroundObj[aroundFunc].call(aroundObj, to); + }else{ + // var tmjp = dojo.event.MethodJoinPoint.getForMethod(obj, methname); + if((hasDelay)&&((dojo.render.html)||(dojo.render.svg))){ // FIXME: the render checks are grotty! + dj_global["setTimeout"](function(){ + if(msg){ + callObj[callFunc].call(callObj, to); + }else{ + callObj[callFunc].apply(callObj, args); + } + }, delay); + }else{ // many environments can't support delay! + if(msg){ + callObj[callFunc].call(callObj, to); + }else{ + callObj[callFunc].apply(callObj, args); + } + } + } + }; + + var unRollSquelch = function(){ + if(this.squelch){ + try{ + return unrollAdvice.apply(this, arguments); + }catch(e){ + dojo.debug(e); + } + }else{ + return unrollAdvice.apply(this, arguments); + } + }; + + if((this["before"])&&(this.before.length>0)){ + // pass a cloned array, if this event disconnects this event forEach on this.before wont work + dojo.lang.forEach(this.before.concat(new Array()), unRollSquelch); + } + + var result; + try{ + if((this["around"])&&(this.around.length>0)){ + var mi = new dojo.event.MethodInvocation(this, obj, args); + result = mi.proceed(); + }else if(this.methodfunc){ + result = this.object[this.methodname].apply(this.object, args); + } + }catch(e){ + if(!this.squelch){ + dojo.debug(e,"when calling",this.methodname,"on",this.object,"with arguments",args); + dojo.raise(e); + } + } + + if((this["after"])&&(this.after.length>0)){ + // see comment on this.before above + dojo.lang.forEach(this.after.concat(new Array()), unRollSquelch); + } + + return (this.methodfunc) ? result : null; + }, + + getArr: function(/*String*/kind){ + // summary: return a list of listeners of the past "kind" + // kind: + // can be one of: "before", "after", "around", "before-around", or + // "after-around" + var type = "after"; + // FIXME: we should be able to do this through props or Array.in() + if((typeof kind == "string")&&(kind.indexOf("before")!=-1)){ + type = "before"; + }else if(kind=="around"){ + type = "around"; + } + if(!this[type]){ this[type] = []; } + return this[type]; // Array + }, + + kwAddAdvice: function(/*Object*/args){ + // summary: + // adds advice to the joinpoint with arguments in a map + // args: + // An object that can have the following properties: + // - adviceType + // - adviceObj + // - adviceFunc + // - aroundObj + // - aroundFunc + // - once + // - delay + // - rate + // - adviceMsg + // - maxCalls + this.addAdvice( args["adviceObj"], args["adviceFunc"], + args["aroundObj"], args["aroundFunc"], + args["adviceType"], args["precedence"], + args["once"], args["delay"], args["rate"], + args["adviceMsg"], args["maxCalls"]); + }, + + addAdvice: function( thisAdviceObj, thisAdvice, + thisAroundObj, thisAround, + adviceType, precedence, + once, delay, rate, asMessage, + maxCalls){ + // summary: + // add advice to this joinpoint using positional parameters + // thisAdviceObj: + // the scope in which to locate/execute the named adviceFunc. + // thisAdviceFunc: + // the name of the function being conected + // thisAroundObj: + // the scope in which to locate/execute the named aroundFunc. + // thisAroundFunc: + // the name of the function that will be used to mediate the + // advice call. + // adviceType: + // Optional. String. One of "before", "after", "around", + // "before-around", or "after-around". FIXME + // once: + // boolean that determines whether or not this advice will create + // a new connection if an identical advice set has already been + // provided. Defaults to "false". + // delay: + // an optional delay (in ms), as an integer, for dispatch of a + // listener after the source has been fired. + // rate: + // an optional rate throttling parameter (integer, in ms). When + // specified, this particular connection will not fire more than + // once in the interval specified by the rate + // adviceMsg: + // boolean. Should the listener have all the parameters passed in + // as a single argument? + // maxCalls: + // Integer. The maximum number of times this connection can be + // used before being auto-disconnected. -1 signals that the + // connection should never be disconnected. + var arr = this.getArr(adviceType); + if(!arr){ + dojo.raise("bad this: " + this); + } + + var ao = [thisAdviceObj, thisAdvice, thisAroundObj, thisAround, delay, rate, asMessage, maxCalls]; + + if(once){ + if(this.hasAdvice(thisAdviceObj, thisAdvice, adviceType, arr) >= 0){ + return; + } + } + + if(precedence == "first"){ + arr.unshift(ao); + }else{ + arr.push(ao); + } + }, + + hasAdvice: function(thisAdviceObj, thisAdvice, adviceType, arr){ + // summary: + // returns the array index of the first existing connection + // betweened the passed advice and this joinpoint. Will be -1 if + // none exists. + // thisAdviceObj: + // the scope in which to locate/execute the named adviceFunc. + // thisAdviceFunc: + // the name of the function being conected + // adviceType: + // Optional. String. One of "before", "after", "around", + // "before-around", or "after-around". FIXME + // arr: + // Optional. The list of advices to search. Will be found via + // adviceType if not passed + if(!arr){ arr = this.getArr(adviceType); } + var ind = -1; + for(var x=0; x=0; i=i-1){ + var el = na[i]; + try{ + if(el && el["__clobberAttrs__"]){ + for(var j=0; j= 65 && unifiedCharCode <= 90 && evt.shiftKey == false){ + unifiedCharCode += 32; + } + if(unifiedCharCode >= 1 && unifiedCharCode <= 26 && evt.ctrlKey){ + unifiedCharCode += 96; // 001-032 = ctrl+[a-z] + } + evt.key = String.fromCharCode(unifiedCharCode); + } + } + } else if(evt["type"] == "keypress"){ + if(dojo.render.html.opera){ + if(evt.which == 0){ + evt.key = evt.keyCode; + }else if(evt.which > 0){ + switch(evt.which){ + case evt.KEY_SHIFT: + case evt.KEY_CTRL: + case evt.KEY_ALT: + case evt.KEY_CAPS_LOCK: + case evt.KEY_NUM_LOCK: + case evt.KEY_SCROLL_LOCK: + break; + case evt.KEY_PAUSE: + case evt.KEY_TAB: + case evt.KEY_BACKSPACE: + case evt.KEY_ENTER: + case evt.KEY_ESCAPE: + evt.key = evt.which; + break; + default: + var unifiedCharCode = evt.which; + if((evt.ctrlKey || evt.altKey || evt.metaKey) && (evt.which >= 65 && evt.which <= 90 && evt.shiftKey == false)){ + unifiedCharCode += 32; + } + evt.key = String.fromCharCode(unifiedCharCode); + } + } + }else if(dojo.render.html.ie){ // catch some IE keys that are hard to get in keyDown + // key combinations were handled in onKeyDown + if(!evt.ctrlKey && !evt.altKey && evt.keyCode >= evt.KEY_SPACE){ + evt.key = String.fromCharCode(evt.keyCode); + } + }else if(dojo.render.html.safari){ + switch(evt.keyCode){ + case 25: evt.key = evt.KEY_TAB; evt.shift = true;break; + case 63232: evt.key = evt.KEY_UP_ARROW; break; + case 63233: evt.key = evt.KEY_DOWN_ARROW; break; + case 63234: evt.key = evt.KEY_LEFT_ARROW; break; + case 63235: evt.key = evt.KEY_RIGHT_ARROW; break; + case 63236: evt.key = evt.KEY_F1; break; + case 63237: evt.key = evt.KEY_F2; break; + case 63238: evt.key = evt.KEY_F3; break; + case 63239: evt.key = evt.KEY_F4; break; + case 63240: evt.key = evt.KEY_F5; break; + case 63241: evt.key = evt.KEY_F6; break; + case 63242: evt.key = evt.KEY_F7; break; + case 63243: evt.key = evt.KEY_F8; break; + case 63244: evt.key = evt.KEY_F9; break; + case 63245: evt.key = evt.KEY_F10; break; + case 63246: evt.key = evt.KEY_F11; break; + case 63247: evt.key = evt.KEY_F12; break; + case 63250: evt.key = evt.KEY_PAUSE; break; + case 63272: evt.key = evt.KEY_DELETE; break; + case 63273: evt.key = evt.KEY_HOME; break; + case 63275: evt.key = evt.KEY_END; break; + case 63276: evt.key = evt.KEY_PAGE_UP; break; + case 63277: evt.key = evt.KEY_PAGE_DOWN; break; + case 63302: evt.key = evt.KEY_INSERT; break; + case 63248://prtscr + case 63249://scrolllock + case 63289://numlock + break; + default: + evt.key = evt.charCode >= evt.KEY_SPACE ? String.fromCharCode(evt.charCode) : evt.keyCode; + } + }else{ + evt.key = evt.charCode > 0 ? String.fromCharCode(evt.charCode) : evt.keyCode; + } + } + } + if(dojo.render.html.ie){ + if(!evt.target){ evt.target = evt.srcElement; } + if(!evt.currentTarget){ evt.currentTarget = (sender ? sender : evt.srcElement); } + if(!evt.layerX){ evt.layerX = evt.offsetX; } + if(!evt.layerY){ evt.layerY = evt.offsetY; } + // FIXME: scroll position query is duped from dojo.html to avoid dependency on that entire module + // DONOT replace the following to use dojo.body(), in IE, document.documentElement should be used + // here rather than document.body + var doc = (evt.srcElement && evt.srcElement.ownerDocument) ? evt.srcElement.ownerDocument : document; + var docBody = ((dojo.render.html.ie55)||(doc["compatMode"] == "BackCompat")) ? doc.body : doc.documentElement; + if(!evt.pageX){ evt.pageX = evt.clientX + (docBody.scrollLeft || 0) } + if(!evt.pageY){ evt.pageY = evt.clientY + (docBody.scrollTop || 0) } + // mouseover + if(evt.type == "mouseover"){ evt.relatedTarget = evt.fromElement; } + // mouseout + if(evt.type == "mouseout"){ evt.relatedTarget = evt.toElement; } + this.currentEvent = evt; + evt.callListener = this.callListener; + evt.stopPropagation = this._stopPropagation; + evt.preventDefault = this._preventDefault; + } + return evt; // Event + } + + this.stopEvent = function(/*Event*/evt){ + // summary: + // prevents propigation and clobbers the default action of the + // passed event + // evt: Optional for IE. The native event object. + if(window.event){ + evt.cancelBubble = true; + evt.returnValue = false; + }else{ + evt.preventDefault(); + evt.stopPropagation(); + } + } +} + +dojo.kwCompoundRequire({ + common: ["dojo.event.common", "dojo.event.topic"], + browser: ["dojo.event.browser"], + dashboard: ["dojo.event.browser"] +}); +dojo.provide("dojo.event.*"); + +dojo.provide("dojo.gfx.color"); + + + +// TODO: rewrite the "x2y" methods to take advantage of the parsing +// abilities of the Color object. Also, beef up the Color +// object (as possible) to parse most common formats + +// takes an r, g, b, a(lpha) value, [r, g, b, a] array, "rgb(...)" string, hex string (#aaa, #aaaaaa, aaaaaaa) +dojo.gfx.color.Color = function(r, g, b, a) { + // dojo.debug("r:", r[0], "g:", r[1], "b:", r[2]); + if(dojo.lang.isArray(r)){ + this.r = r[0]; + this.g = r[1]; + this.b = r[2]; + this.a = r[3]||1.0; + }else if(dojo.lang.isString(r)){ + var rgb = dojo.gfx.color.extractRGB(r); + this.r = rgb[0]; + this.g = rgb[1]; + this.b = rgb[2]; + this.a = g||1.0; + }else if(r instanceof dojo.gfx.color.Color){ + // why does this create a new instance if we were passed one? + this.r = r.r; + this.b = r.b; + this.g = r.g; + this.a = r.a; + }else{ + this.r = r; + this.g = g; + this.b = b; + this.a = a; + } +} + +dojo.gfx.color.Color.fromArray = function(arr) { + return new dojo.gfx.color.Color(arr[0], arr[1], arr[2], arr[3]); +} + +dojo.extend(dojo.gfx.color.Color, { + toRgb: function(includeAlpha) { + if(includeAlpha) { + return this.toRgba(); + } else { + return [this.r, this.g, this.b]; + } + }, + toRgba: function() { + return [this.r, this.g, this.b, this.a]; + }, + toHex: function() { + return dojo.gfx.color.rgb2hex(this.toRgb()); + }, + toCss: function() { + return "rgb(" + this.toRgb().join() + ")"; + }, + toString: function() { + return this.toHex(); // decent default? + }, + blend: function(color, weight){ + var rgb = null; + if(dojo.lang.isArray(color)){ + rgb = color; + }else if(color instanceof dojo.gfx.color.Color){ + rgb = color.toRgb(); + }else{ + rgb = new dojo.gfx.color.Color(color).toRgb(); + } + return dojo.gfx.color.blend(this.toRgb(), rgb, weight); + } +}); + +dojo.gfx.color.named = { + white: [255,255,255], + black: [0,0,0], + red: [255,0,0], + green: [0,255,0], + lime: [0,255,0], + blue: [0,0,255], + navy: [0,0,128], + gray: [128,128,128], + silver: [192,192,192] +}; + +dojo.gfx.color.blend = function(a, b, weight){ + // summary: + // blend colors a and b (both as RGB array or hex strings) with weight + // from -1 to +1, 0 being a 50/50 blend + if(typeof a == "string"){ + return dojo.gfx.color.blendHex(a, b, weight); + } + if(!weight){ + weight = 0; + } + weight = Math.min(Math.max(-1, weight), 1); + + // alex: this interface blows. + // map -1 to 1 to the range 0 to 1 + weight = ((weight + 1)/2); + + var c = []; + + // var stop = (1000*weight); + for(var x = 0; x < 3; x++){ + c[x] = parseInt( b[x] + ( (a[x] - b[x]) * weight) ); + } + return c; +} + +// very convenient blend that takes and returns hex values +// (will get called automatically by blend when blend gets strings) +dojo.gfx.color.blendHex = function(a, b, weight) { + return dojo.gfx.color.rgb2hex(dojo.gfx.color.blend(dojo.gfx.color.hex2rgb(a), dojo.gfx.color.hex2rgb(b), weight)); +} + +// get RGB array from css-style color declarations +dojo.gfx.color.extractRGB = function(color) { + var hex = "0123456789abcdef"; + color = color.toLowerCase(); + if( color.indexOf("rgb") == 0 ) { + var matches = color.match(/rgba*\((\d+), *(\d+), *(\d+)/i); + var ret = matches.splice(1, 3); + return ret; + } else { + var colors = dojo.gfx.color.hex2rgb(color); + if(colors) { + return colors; + } else { + // named color (how many do we support?) + return dojo.gfx.color.named[color] || [255, 255, 255]; + } + } +} + +dojo.gfx.color.hex2rgb = function(hex) { + var hexNum = "0123456789ABCDEF"; + var rgb = new Array(3); + if( hex.indexOf("#") == 0 ) { hex = hex.substring(1); } + hex = hex.toUpperCase(); + if(hex.replace(new RegExp("["+hexNum+"]", "g"), "") != "") { + return null; + } + if( hex.length == 3 ) { + rgb[0] = hex.charAt(0) + hex.charAt(0) + rgb[1] = hex.charAt(1) + hex.charAt(1) + rgb[2] = hex.charAt(2) + hex.charAt(2); + } else { + rgb[0] = hex.substring(0, 2); + rgb[1] = hex.substring(2, 4); + rgb[2] = hex.substring(4); + } + for(var i = 0; i < rgb.length; i++) { + rgb[i] = hexNum.indexOf(rgb[i].charAt(0)) * 16 + hexNum.indexOf(rgb[i].charAt(1)); + } + return rgb; +} + +dojo.gfx.color.rgb2hex = function(r, g, b) { + if(dojo.lang.isArray(r)) { + g = r[1] || 0; + b = r[2] || 0; + r = r[0] || 0; + } + var ret = dojo.lang.map([r, g, b], function(x) { + x = new Number(x); + var s = x.toString(16); + while(s.length < 2) { s = "0" + s; } + return s; + }); + ret.unshift("#"); + return ret.join(""); +} + +dojo.provide("dojo.lfx.Animation"); + + + +/* + Animation package based on Dan Pupius' work: http://pupius.co.uk/js/Toolkit.Drawing.js +*/ +dojo.lfx.Line = function(/*int*/ start, /*int*/ end){ + // summary: dojo.lfx.Line is the object used to generate values + // from a start value to an end value + this.start = start; + this.end = end; + if(dojo.lang.isArray(start)){ + /* start: Array + end: Array + pId: a */ + var diff = []; + dojo.lang.forEach(this.start, function(s,i){ + diff[i] = this.end[i] - s; + }, this); + + this.getValue = function(/*float*/ n){ + var res = []; + dojo.lang.forEach(this.start, function(s, i){ + res[i] = (diff[i] * n) + s; + }, this); + return res; // Array + } + }else{ + var diff = end - start; + + this.getValue = function(/*float*/ n){ + // summary: returns the point on the line + // n: a floating point number greater than 0 and less than 1 + return (diff * n) + this.start; // Decimal + } + } +} + +if((dojo.render.html.khtml)&&(!dojo.render.html.safari)){ + // the cool kids are obviously not using konqueror... + // found a very wierd bug in floats constants, 1.5 evals as 1 + // seems somebody mixed up ints and floats in 3.5.4 ?? + // FIXME: investigate more and post a KDE bug (Fredrik) + dojo.lfx.easeDefault = function(/*Decimal?*/ n){ + // summary: Returns the point for point n on a sin wave. + return (parseFloat("0.5")+((Math.sin( (n+parseFloat("1.5")) * Math.PI))/2)); + } +}else{ + dojo.lfx.easeDefault = function(/*Decimal?*/ n){ + return (0.5+((Math.sin( (n+1.5) * Math.PI))/2)); + } +} + +dojo.lfx.easeIn = function(/*Decimal?*/ n){ + // summary: returns the point on an easing curve + // n: a floating point number greater than 0 and less than 1 + return Math.pow(n, 3); +} + +dojo.lfx.easeOut = function(/*Decimal?*/ n){ + // summary: returns the point on the line + // n: a floating point number greater than 0 and less than 1 + return ( 1 - Math.pow(1 - n, 3) ); +} + +dojo.lfx.easeInOut = function(/*Decimal?*/ n){ + // summary: returns the point on the line + // n: a floating point number greater than 0 and less than 1 + return ( (3 * Math.pow(n, 2)) - (2 * Math.pow(n, 3)) ); +} + +dojo.lfx.IAnimation = function(){ + // summary: dojo.lfx.IAnimation is an interface that implements + // commonly used functions of animation objects +} +dojo.lang.extend(dojo.lfx.IAnimation, { + // public properties + curve: null, + duration: 1000, + easing: null, + repeatCount: 0, + rate: 10, + + // events + handler: null, + beforeBegin: null, + onBegin: null, + onAnimate: null, + onEnd: null, + onPlay: null, + onPause: null, + onStop: null, + + // public methods + play: null, + pause: null, + stop: null, + + connect: function(/*Event*/ evt, /*Object*/ scope, /*Function*/ newFunc){ + // summary: Convenience function. Quickly connect to an event + // of this object and save the old functions connected to it. + // evt: The name of the event to connect to. + // scope: the scope in which to run newFunc. + // newFunc: the function to run when evt is fired. + if(!newFunc){ + /* scope: Function + newFunc: null + pId: f */ + newFunc = scope; + scope = this; + } + newFunc = dojo.lang.hitch(scope, newFunc); + var oldFunc = this[evt]||function(){}; + this[evt] = function(){ + var ret = oldFunc.apply(this, arguments); + newFunc.apply(this, arguments); + return ret; + } + return this; // dojo.lfx.IAnimation + }, + + fire: function(/*Event*/ evt, /*Array*/ args){ + // summary: Convenience function. Fire event "evt" and pass it + // the arguments specified in "args". + // evt: The event to fire. + // args: The arguments to pass to the event. + if(this[evt]){ + this[evt].apply(this, (args||[])); + } + return this; // dojo.lfx.IAnimation + }, + + repeat: function(/*int*/ count){ + // summary: Set the repeat count of this object. + // count: How many times to repeat the animation. + this.repeatCount = count; + return this; // dojo.lfx.IAnimation + }, + + // private properties + _active: false, + _paused: false +}); + +dojo.lfx.Animation = function( /*Object*/ handlers, + /*int*/ duration, + /*dojo.lfx.Line*/ curve, + /*function*/ easing, + /*int*/ repeatCount, + /*int*/ rate){ + // summary + // a generic animation object that fires callbacks into it's handlers + // object at various states + // handlers: { handler: Function?, onstart: Function?, onstop: Function?, onanimate: Function? } + dojo.lfx.IAnimation.call(this); + if(dojo.lang.isNumber(handlers)||(!handlers && duration.getValue)){ + // no handlers argument: + rate = repeatCount; + repeatCount = easing; + easing = curve; + curve = duration; + duration = handlers; + handlers = null; + }else if(handlers.getValue||dojo.lang.isArray(handlers)){ + // no handlers or duration: + rate = easing; + repeatCount = curve; + easing = duration; + curve = handlers; + duration = null; + handlers = null; + } + if(dojo.lang.isArray(curve)){ + /* curve: Array + pId: a */ + this.curve = new dojo.lfx.Line(curve[0], curve[1]); + }else{ + this.curve = curve; + } + if(duration != null && duration > 0){ this.duration = duration; } + if(repeatCount){ this.repeatCount = repeatCount; } + if(rate){ this.rate = rate; } + if(handlers){ + dojo.lang.forEach([ + "handler", "beforeBegin", "onBegin", + "onEnd", "onPlay", "onStop", "onAnimate" + ], function(item){ + if(handlers[item]){ + this.connect(item, handlers[item]); + } + }, this); + } + if(easing && dojo.lang.isFunction(easing)){ + this.easing=easing; + } +} +dojo.inherits(dojo.lfx.Animation, dojo.lfx.IAnimation); +dojo.lang.extend(dojo.lfx.Animation, { + // "private" properties + _startTime: null, + _endTime: null, + _timer: null, + _percent: 0, + _startRepeatCount: 0, + + // public methods + play: function(/*int?*/ delay, /*bool?*/ gotoStart){ + // summary: Start the animation. + // delay: How many milliseconds to delay before starting. + // gotoStart: If true, starts the animation from the beginning; otherwise, + // starts it from its current position. + if(gotoStart){ + clearTimeout(this._timer); + this._active = false; + this._paused = false; + this._percent = 0; + }else if(this._active && !this._paused){ + return this; // dojo.lfx.Animation + } + + this.fire("handler", ["beforeBegin"]); + this.fire("beforeBegin"); + + if(delay > 0){ + setTimeout(dojo.lang.hitch(this, function(){ this.play(null, gotoStart); }), delay); + return this; // dojo.lfx.Animation + } + + this._startTime = new Date().valueOf(); + if(this._paused){ + this._startTime -= (this.duration * this._percent / 100); + } + this._endTime = this._startTime + this.duration; + + this._active = true; + this._paused = false; + + var step = this._percent / 100; + var value = this.curve.getValue(step); + if(this._percent == 0 ){ + if(!this._startRepeatCount){ + this._startRepeatCount = this.repeatCount; + } + this.fire("handler", ["begin", value]); + this.fire("onBegin", [value]); + } + + this.fire("handler", ["play", value]); + this.fire("onPlay", [value]); + + this._cycle(); + return this; // dojo.lfx.Animation + }, + + pause: function(){ + // summary: Pauses a running animation. + clearTimeout(this._timer); + if(!this._active){ return this; /*dojo.lfx.Animation*/} + this._paused = true; + var value = this.curve.getValue(this._percent / 100); + this.fire("handler", ["pause", value]); + this.fire("onPause", [value]); + return this; // dojo.lfx.Animation + }, + + gotoPercent: function(/*Decimal*/ pct, /*bool?*/ andPlay){ + // summary: Sets the progress of the animation. + // pct: A percentage in decimal notation (between and including 0.0 and 1.0). + // andPlay: If true, play the animation after setting the progress. + clearTimeout(this._timer); + this._active = true; + this._paused = true; + this._percent = pct; + if(andPlay){ this.play(); } + return this; // dojo.lfx.Animation + }, + + stop: function(/*bool?*/ gotoEnd){ + // summary: Stops a running animation. + // gotoEnd: If true, the animation will end. + clearTimeout(this._timer); + var step = this._percent / 100; + if(gotoEnd){ + step = 1; + } + var value = this.curve.getValue(step); + this.fire("handler", ["stop", value]); + this.fire("onStop", [value]); + this._active = false; + this._paused = false; + return this; // dojo.lfx.Animation + }, + + status: function(){ + // summary: Returns a string representation of the status of + // the animation. + if(this._active){ + return this._paused ? "paused" : "playing"; // String + }else{ + return "stopped"; // String + } + return this; + }, + + // "private" methods + _cycle: function(){ + clearTimeout(this._timer); + if(this._active){ + var curr = new Date().valueOf(); + var step = (curr - this._startTime) / (this._endTime - this._startTime); + + if(step >= 1){ + step = 1; + this._percent = 100; + }else{ + this._percent = step * 100; + } + + // Perform easing + if((this.easing)&&(dojo.lang.isFunction(this.easing))){ + step = this.easing(step); + } + + var value = this.curve.getValue(step); + this.fire("handler", ["animate", value]); + this.fire("onAnimate", [value]); + + if( step < 1 ){ + this._timer = setTimeout(dojo.lang.hitch(this, "_cycle"), this.rate); + }else{ + this._active = false; + this.fire("handler", ["end"]); + this.fire("onEnd"); + + if(this.repeatCount > 0){ + this.repeatCount--; + this.play(null, true); + }else if(this.repeatCount == -1){ + this.play(null, true); + }else{ + if(this._startRepeatCount){ + this.repeatCount = this._startRepeatCount; + this._startRepeatCount = 0; + } + } + } + } + return this; // dojo.lfx.Animation + } +}); + +dojo.lfx.Combine = function(/*dojo.lfx.IAnimation...*/ animations){ + // summary: An animation object to play animations passed to it at the same time. + dojo.lfx.IAnimation.call(this); + this._anims = []; + this._animsEnded = 0; + + var anims = arguments; + if(anims.length == 1 && (dojo.lang.isArray(anims[0]) || dojo.lang.isArrayLike(anims[0]))){ + /* animations: dojo.lfx.IAnimation[] + pId: a */ + anims = anims[0]; + } + + dojo.lang.forEach(anims, function(anim){ + this._anims.push(anim); + anim.connect("onEnd", dojo.lang.hitch(this, "_onAnimsEnded")); + }, this); +} +dojo.inherits(dojo.lfx.Combine, dojo.lfx.IAnimation); +dojo.lang.extend(dojo.lfx.Combine, { + // private members + _animsEnded: 0, + + // public methods + play: function(/*int?*/ delay, /*bool?*/ gotoStart){ + // summary: Start the animations. + // delay: How many milliseconds to delay before starting. + // gotoStart: If true, starts the animations from the beginning; otherwise, + // starts them from their current position. + if( !this._anims.length ){ return this; /*dojo.lfx.Combine*/} + + this.fire("beforeBegin"); + + if(delay > 0){ + setTimeout(dojo.lang.hitch(this, function(){ this.play(null, gotoStart); }), delay); + return this; // dojo.lfx.Combine + } + + if(gotoStart || this._anims[0].percent == 0){ + this.fire("onBegin"); + } + this.fire("onPlay"); + this._animsCall("play", null, gotoStart); + return this; // dojo.lfx.Combine + }, + + pause: function(){ + // summary: Pauses the running animations. + this.fire("onPause"); + this._animsCall("pause"); + return this; // dojo.lfx.Combine + }, + + stop: function(/*bool?*/ gotoEnd){ + // summary: Stops the running animations. + // gotoEnd: If true, the animations will end. + this.fire("onStop"); + this._animsCall("stop", gotoEnd); + return this; // dojo.lfx.Combine + }, + + // private methods + _onAnimsEnded: function(){ + this._animsEnded++; + if(this._animsEnded >= this._anims.length){ + this.fire("onEnd"); + } + return this; // dojo.lfx.Combine + }, + + _animsCall: function(/*String*/ funcName){ + var args = []; + if(arguments.length > 1){ + for(var i = 1 ; i < arguments.length ; i++){ + args.push(arguments[i]); + } + } + var _this = this; + dojo.lang.forEach(this._anims, function(anim){ + anim[funcName](args); + }, _this); + return this; // dojo.lfx.Combine + } +}); + +dojo.lfx.Chain = function(/*dojo.lfx.IAnimation...*/ animations) { + // summary: An animation object to play animations passed to it + // one after another. + dojo.lfx.IAnimation.call(this); + this._anims = []; + this._currAnim = -1; + + var anims = arguments; + if(anims.length == 1 && (dojo.lang.isArray(anims[0]) || dojo.lang.isArrayLike(anims[0]))){ + /* animations: dojo.lfx.IAnimation[] + pId: a */ + anims = anims[0]; + } + + var _this = this; + dojo.lang.forEach(anims, function(anim, i, anims_arr){ + this._anims.push(anim); + if(i < anims_arr.length - 1){ + anim.connect("onEnd", dojo.lang.hitch(this, "_playNext") ); + }else{ + anim.connect("onEnd", dojo.lang.hitch(this, function(){ this.fire("onEnd"); }) ); + } + }, this); +} +dojo.inherits(dojo.lfx.Chain, dojo.lfx.IAnimation); +dojo.lang.extend(dojo.lfx.Chain, { + // private members + _currAnim: -1, + + // public methods + play: function(/*int?*/ delay, /*bool?*/ gotoStart){ + // summary: Start the animation sequence. + // delay: How many milliseconds to delay before starting. + // gotoStart: If true, starts the sequence from the beginning; otherwise, + // starts it from its current position. + if( !this._anims.length ) { return this; /*dojo.lfx.Chain*/} + if( gotoStart || !this._anims[this._currAnim] ) { + this._currAnim = 0; + } + + var currentAnimation = this._anims[this._currAnim]; + + this.fire("beforeBegin"); + if(delay > 0){ + setTimeout(dojo.lang.hitch(this, function(){ this.play(null, gotoStart); }), delay); + return this; // dojo.lfx.Chain + } + + if(currentAnimation){ + if(this._currAnim == 0){ + this.fire("handler", ["begin", this._currAnim]); + this.fire("onBegin", [this._currAnim]); + } + this.fire("onPlay", [this._currAnim]); + currentAnimation.play(null, gotoStart); + } + return this; // dojo.lfx.Chain + }, + + pause: function(){ + // summary: Pauses the running animation sequence. + if( this._anims[this._currAnim] ) { + this._anims[this._currAnim].pause(); + this.fire("onPause", [this._currAnim]); + } + return this; // dojo.lfx.Chain + }, + + playPause: function(){ + // summary: If the animation sequence is playing, pause it; otherwise, + // play it. + if(this._anims.length == 0){ return this; } + if(this._currAnim == -1){ this._currAnim = 0; } + var currAnim = this._anims[this._currAnim]; + if( currAnim ) { + if( !currAnim._active || currAnim._paused ) { + this.play(); + } else { + this.pause(); + } + } + return this; // dojo.lfx.Chain + }, + + stop: function(){ + // summary: Stops the running animations. + var currAnim = this._anims[this._currAnim]; + if(currAnim){ + currAnim.stop(); + this.fire("onStop", [this._currAnim]); + } + return currAnim; // dojo.lfx.IAnimation + }, + + // private methods + _playNext: function(){ + if( this._currAnim == -1 || this._anims.length == 0 ) { return this; } + this._currAnim++; + if( this._anims[this._currAnim] ){ + this._anims[this._currAnim].play(null, true); + } + return this; // dojo.lfx.Chain + } +}); + +dojo.lfx.combine = function(/*dojo.lfx.IAnimation...*/ animations){ + // summary: Convenience function. Returns a dojo.lfx.Combine created + // using the animations passed in. + var anims = arguments; + if(dojo.lang.isArray(arguments[0])){ + /* animations: dojo.lfx.IAnimation[] + pId: a */ + anims = arguments[0]; + } + if(anims.length == 1){ return anims[0]; } + return new dojo.lfx.Combine(anims); // dojo.lfx.Combine +} + +dojo.lfx.chain = function(/*dojo.lfx.IAnimation...*/ animations){ + // summary: Convenience function. Returns a dojo.lfx.Chain created + // using the animations passed in. + var anims = arguments; + if(dojo.lang.isArray(arguments[0])){ + /* animations: dojo.lfx.IAnimation[] + pId: a */ + anims = arguments[0]; + } + if(anims.length == 1){ return anims[0]; } + return new dojo.lfx.Chain(anims); // dojo.lfx.Combine +} + +dojo.provide("dojo.html.common"); + + + +dojo.lang.mixin(dojo.html, dojo.dom); + +dojo.html.body = function(){ + dojo.deprecated("dojo.html.body() moved to dojo.body()", "0.5"); + return dojo.body(); +} + +// FIXME: we are going to assume that we can throw any and every rendering +// engine into the IE 5.x box model. In Mozilla, we do this w/ CSS. +// Need to investigate for KHTML and Opera + +dojo.html.getEventTarget = function(/* DOMEvent */evt){ + // summary + // Returns the target of an event + if(!evt) { evt = dojo.global().event || {} }; + var t = (evt.srcElement ? evt.srcElement : (evt.target ? evt.target : null)); + while((t)&&(t.nodeType!=1)){ t = t.parentNode; } + return t; // HTMLElement +} + +dojo.html.getViewport = function(){ + // summary + // Returns the dimensions of the viewable area of a browser window + var _window = dojo.global(); + var _document = dojo.doc(); + var w = 0; + var h = 0; + + if(dojo.render.html.mozilla){ + // mozilla + w = _document.documentElement.clientWidth; + h = _window.innerHeight; + }else if(!dojo.render.html.opera && _window.innerWidth){ + //in opera9, dojo.body().clientWidth should be used, instead + //of window.innerWidth/document.documentElement.clientWidth + //so we have to check whether it is opera + w = _window.innerWidth; + h = _window.innerHeight; + } else if (!dojo.render.html.opera && dojo.exists(_document, "documentElement.clientWidth")){ + // IE6 Strict + var w2 = _document.documentElement.clientWidth; + // this lets us account for scrollbars + if(!w || w2 && w2 < w) { + w = w2; + } + h = _document.documentElement.clientHeight; + } else if (dojo.body().clientWidth){ + // IE, Opera + w = dojo.body().clientWidth; + h = dojo.body().clientHeight; + } + return { width: w, height: h }; // object +} + +dojo.html.getScroll = function(){ + // summary + // Returns the scroll position of the document + var _window = dojo.global(); + var _document = dojo.doc(); + var top = _window.pageYOffset || _document.documentElement.scrollTop || dojo.body().scrollTop || 0; + var left = _window.pageXOffset || _document.documentElement.scrollLeft || dojo.body().scrollLeft || 0; + return { + top: top, + left: left, + offset:{ x: left, y: top } // note the change, NOT an Array with added properties. + }; // object +} + +dojo.html.getParentByType = function(/* HTMLElement */node, /* string */type) { + // summary + // Returns the first ancestor of node with tagName type. + var _document = dojo.doc(); + var parent = dojo.byId(node); + type = type.toLowerCase(); + while((parent)&&(parent.nodeName.toLowerCase()!=type)){ + if(parent==(_document["body"]||_document["documentElement"])){ + return null; + } + parent = parent.parentNode; + } + return parent; // HTMLElement +} + +dojo.html.getAttribute = function(/* HTMLElement */node, /* string */attr){ + // summary + // Returns the value of attribute attr from node. + node = dojo.byId(node); + // FIXME: need to add support for attr-specific accessors + if((!node)||(!node.getAttribute)){ + // if(attr !== 'nwType'){ + // alert("getAttr of '" + attr + "' with bad node"); + // } + return null; + } + var ta = typeof attr == 'string' ? attr : new String(attr); + + // first try the approach most likely to succeed + var v = node.getAttribute(ta.toUpperCase()); + if((v)&&(typeof v == 'string')&&(v!="")){ + return v; // string + } + + // try returning the attributes value, if we couldn't get it as a string + if(v && v.value){ + return v.value; // string + } + + // this should work on Opera 7, but it's a little on the crashy side + if((node.getAttributeNode)&&(node.getAttributeNode(ta))){ + return (node.getAttributeNode(ta)).value; // string + }else if(node.getAttribute(ta)){ + return node.getAttribute(ta); // string + }else if(node.getAttribute(ta.toLowerCase())){ + return node.getAttribute(ta.toLowerCase()); // string + } + return null; // string +} + +dojo.html.hasAttribute = function(/* HTMLElement */node, /* string */attr){ + // summary + // Determines whether or not the specified node carries a value for the attribute in question. + return dojo.html.getAttribute(dojo.byId(node), attr) ? true : false; // boolean +} + +dojo.html.getCursorPosition = function(/* DOMEvent */e){ + // summary + // Returns the mouse position relative to the document (not the viewport). + // For example, if you have a document that is 10000px tall, + // but your browser window is only 100px tall, + // if you scroll to the bottom of the document and call this function it + // will return {x: 0, y: 10000} + // NOTE: for events delivered via dojo.event.connect() and/or dojoAttachEvent (for widgets), + // you can just access evt.pageX and evt.pageY, rather than calling this function. + e = e || dojo.global().event; + var cursor = {x:0, y:0}; + if(e.pageX || e.pageY){ + cursor.x = e.pageX; + cursor.y = e.pageY; + }else{ + var de = dojo.doc().documentElement; + var db = dojo.body(); + cursor.x = e.clientX + ((de||db)["scrollLeft"]) - ((de||db)["clientLeft"]); + cursor.y = e.clientY + ((de||db)["scrollTop"]) - ((de||db)["clientTop"]); + } + return cursor; // object +} + +dojo.html.isTag = function(/* HTMLElement */node) { + // summary + // Like dojo.dom.isTag, except case-insensitive + node = dojo.byId(node); + if(node && node.tagName) { + for (var i=1; i, + //which will be treated as an external javascript file in IE + var xscript = dojo.doc().createElement('script'); + xscript.src = "javascript:'dojo.html.createExternalElement=function(doc, tag){ return doc.createElement(tag); }'"; + dojo.doc().getElementsByTagName("head")[0].appendChild(xscript); + })(); + } +}else{ + //for other browsers, simply use document.createElement + //is enough + dojo.html.createExternalElement = function(/* HTMLDocument */doc, /* string */tag){ + // summary + // Creates an element in the HTML document, here for ActiveX activation workaround. + return doc.createElement(tag); // HTMLElement + } +} + +dojo.html._callDeprecated = function(inFunc, replFunc, args, argName, retValue){ + dojo.deprecated("dojo.html." + inFunc, + "replaced by dojo.html." + replFunc + "(" + (argName ? "node, {"+ argName + ": " + argName + "}" : "" ) + ")" + (retValue ? "." + retValue : ""), "0.5"); + var newArgs = []; + if(argName){ var argsIn = {}; argsIn[argName] = args[1]; newArgs.push(args[0]); newArgs.push(argsIn); } + else { newArgs = args } + var ret = dojo.html[replFunc].apply(dojo.html, args); + if(retValue){ return ret[retValue]; } + else { return ret; } +} + +dojo.html.getViewportWidth = function(){ + return dojo.html._callDeprecated("getViewportWidth", "getViewport", arguments, null, "width"); +} +dojo.html.getViewportHeight = function(){ + return dojo.html._callDeprecated("getViewportHeight", "getViewport", arguments, null, "height"); +} +dojo.html.getViewportSize = function(){ + return dojo.html._callDeprecated("getViewportSize", "getViewport", arguments); +} +dojo.html.getScrollTop = function(){ + return dojo.html._callDeprecated("getScrollTop", "getScroll", arguments, null, "top"); +} +dojo.html.getScrollLeft = function(){ + return dojo.html._callDeprecated("getScrollLeft", "getScroll", arguments, null, "left"); +} +dojo.html.getScrollOffset = function(){ + return dojo.html._callDeprecated("getScrollOffset", "getScroll", arguments, null, "offset"); +} + +dojo.provide("dojo.uri.Uri"); + +dojo.uri = new function() { + this.dojoUri = function (/*dojo.uri.Uri||String*/uri) { + // summary: returns a Uri object resolved relative to the dojo root + return new dojo.uri.Uri(dojo.hostenv.getBaseScriptUri(), uri); + } + + this.moduleUri = function(/*String*/module, /*dojo.uri.Uri||String*/uri){ + // summary: returns a Uri object relative to a module + // description: Examples: dojo.uri.moduleUri("dojo.widget","templates/template.html"), or dojo.uri.moduleUri("acme","images/small.png") + var loc = dojo.hostenv.getModuleSymbols(module).join('/'); + if(!loc){ + return null; + } + if(loc.lastIndexOf("/") != loc.length-1){ + loc += "/"; + } + + //If the path is an absolute path (starts with a / or is on another domain/xdomain) + //then don't add the baseScriptUri. + var colonIndex = loc.indexOf(":"); + var slashIndex = loc.indexOf("/"); + if(loc.charAt(0) != "/" && (colonIndex == -1 || colonIndex > slashIndex)){ + loc = dojo.hostenv.getBaseScriptUri() + loc; + } + + return new dojo.uri.Uri(loc,uri); + } + + this.Uri = function (/*dojo.uri.Uri||String...*/) { + // summary: Constructor to create an object representing a URI. + // description: + // Each argument is evaluated in order relative to the next until + // a canonical uri is produced. To get an absolute Uri relative + // to the current document use + // new dojo.uri.Uri(document.baseURI, uri) + + // TODO: support for IPv6, see RFC 2732 + + // resolve uri components relative to each other + var uri = arguments[0]; + for (var i = 1; i < arguments.length; i++) { + if(!arguments[i]) { continue; } + + // Safari doesn't support this.constructor so we have to be explicit + var relobj = new dojo.uri.Uri(arguments[i].toString()); + var uriobj = new dojo.uri.Uri(uri.toString()); + + if ((relobj.path=="")&&(relobj.scheme==null)&&(relobj.authority==null)&&(relobj.query==null)) { + if (relobj.fragment != null) { uriobj.fragment = relobj.fragment; } + relobj = uriobj; + } else if (relobj.scheme == null) { + relobj.scheme = uriobj.scheme; + + if (relobj.authority == null) { + relobj.authority = uriobj.authority; + + if (relobj.path.charAt(0) != "/") { + var path = uriobj.path.substring(0, + uriobj.path.lastIndexOf("/") + 1) + relobj.path; + + var segs = path.split("/"); + for (var j = 0; j < segs.length; j++) { + if (segs[j] == ".") { + if (j == segs.length - 1) { segs[j] = ""; } + else { segs.splice(j, 1); j--; } + } else if (j > 0 && !(j == 1 && segs[0] == "") && + segs[j] == ".." && segs[j-1] != "..") { + + if (j == segs.length - 1) { segs.splice(j, 1); segs[j - 1] = ""; } + else { segs.splice(j - 1, 2); j -= 2; } + } + } + relobj.path = segs.join("/"); + } + } + } + + uri = ""; + if (relobj.scheme != null) { uri += relobj.scheme + ":"; } + if (relobj.authority != null) { uri += "//" + relobj.authority; } + uri += relobj.path; + if (relobj.query != null) { uri += "?" + relobj.query; } + if (relobj.fragment != null) { uri += "#" + relobj.fragment; } + } + + this.uri = uri.toString(); + + // break the uri into its main components + var regexp = "^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"; + var r = this.uri.match(new RegExp(regexp)); + + this.scheme = r[2] || (r[1] ? "" : null); + this.authority = r[4] || (r[3] ? "" : null); + this.path = r[5]; // can never be undefined + this.query = r[7] || (r[6] ? "" : null); + this.fragment = r[9] || (r[8] ? "" : null); + + if (this.authority != null) { + // server based naming authority + regexp = "^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$"; + r = this.authority.match(new RegExp(regexp)); + + this.user = r[3] || null; + this.password = r[4] || null; + this.host = r[5]; + this.port = r[7] || null; + } + + this.toString = function(){ return this.uri; } + } +}; + +dojo.provide("dojo.html.style"); + + + +dojo.html.getClass = function(/* HTMLElement */node){ + // summary + // Returns the string value of the list of CSS classes currently assigned directly + // to the node in question. Returns an empty string if no class attribute is found; + node = dojo.byId(node); + if(!node){ return ""; } + var cs = ""; + if(node.className){ + cs = node.className; + }else if(dojo.html.hasAttribute(node, "class")){ + cs = dojo.html.getAttribute(node, "class"); + } + return cs.replace(/^\s+|\s+$/g, ""); // string +} + +dojo.html.getClasses = function(/* HTMLElement */node) { + // summary + // Returns an array of CSS classes currently assigned directly to the node in question. + // Returns an empty array if no classes are found; + var c = dojo.html.getClass(node); + return (c == "") ? [] : c.split(/\s+/g); // array +} + +dojo.html.hasClass = function(/* HTMLElement */node, /* string */classname){ + // summary + // Returns whether or not the specified classname is a portion of the + // class list currently applied to the node. Does not cover cascaded + // styles, only classes directly applied to the node. + return (new RegExp('(^|\\s+)'+classname+'(\\s+|$)')).test(dojo.html.getClass(node)) // boolean +} + +dojo.html.prependClass = function(/* HTMLElement */node, /* string */classStr){ + // summary + // Adds the specified class to the beginning of the class list on the + // passed node. This gives the specified class the highest precidence + // when style cascading is calculated for the node. Returns true or + // false; indicating success or failure of the operation, respectively. + classStr += " " + dojo.html.getClass(node); + return dojo.html.setClass(node, classStr); // boolean +} + +dojo.html.addClass = function(/* HTMLElement */node, /* string */classStr){ + // summary + // Adds the specified class to the end of the class list on the + // passed &node;. Returns &true; or &false; indicating success or failure. + if (dojo.html.hasClass(node, classStr)) { + return false; + } + classStr = (dojo.html.getClass(node) + " " + classStr).replace(/^\s+|\s+$/g,""); + return dojo.html.setClass(node, classStr); // boolean +} + +dojo.html.setClass = function(/* HTMLElement */node, /* string */classStr){ + // summary + // Clobbers the existing list of classes for the node, replacing it with + // the list given in the 2nd argument. Returns true or false + // indicating success or failure. + node = dojo.byId(node); + var cs = new String(classStr); + try{ + if(typeof node.className == "string"){ + node.className = cs; + }else if(node.setAttribute){ + node.setAttribute("class", classStr); + node.className = cs; + }else{ + return false; + } + }catch(e){ + dojo.debug("dojo.html.setClass() failed", e); + } + return true; +} + +dojo.html.removeClass = function(/* HTMLElement */node, /* string */classStr, /* boolean? */allowPartialMatches){ + // summary + // Removes the className from the node;. Returns true or false indicating success or failure. + try{ + if (!allowPartialMatches) { + var newcs = dojo.html.getClass(node).replace(new RegExp('(^|\\s+)'+classStr+'(\\s+|$)'), "$1$2"); + } else { + var newcs = dojo.html.getClass(node).replace(classStr,''); + } + dojo.html.setClass(node, newcs); + }catch(e){ + dojo.debug("dojo.html.removeClass() failed", e); + } + return true; // boolean +} + +dojo.html.replaceClass = function(/* HTMLElement */node, /* string */newClass, /* string */oldClass) { + // summary + // Replaces 'oldClass' and adds 'newClass' to node + dojo.html.removeClass(node, oldClass); + dojo.html.addClass(node, newClass); +} + +// Enum type for getElementsByClass classMatchType arg: +dojo.html.classMatchType = { + ContainsAll : 0, // all of the classes are part of the node's class (default) + ContainsAny : 1, // any of the classes are part of the node's class + IsOnly : 2 // only all of the classes are part of the node's class +} + + +dojo.html.getElementsByClass = function( + /* string */classStr, + /* HTMLElement? */parent, + /* string? */nodeType, + /* integer? */classMatchType, + /* boolean? */useNonXpath +){ + // summary + // Returns an array of nodes for the given classStr, children of a + // parent, and optionally of a certain nodeType + // FIXME: temporarily set to false because of several dojo tickets related + // to the xpath version not working consistently in firefox. + useNonXpath = false; + var _document = dojo.doc(); + parent = dojo.byId(parent) || _document; + var classes = classStr.split(/\s+/g); + var nodes = []; + if( classMatchType != 1 && classMatchType != 2 ) classMatchType = 0; // make it enum + var reClass = new RegExp("(\\s|^)((" + classes.join(")|(") + "))(\\s|$)"); + var srtLength = classes.join(" ").length; + var candidateNodes = []; + + if(!useNonXpath && _document.evaluate) { // supports dom 3 xpath + var xpath = ".//" + (nodeType || "*") + "[contains("; + if(classMatchType != dojo.html.classMatchType.ContainsAny){ + xpath += "concat(' ',@class,' '), ' " + + classes.join(" ') and contains(concat(' ',@class,' '), ' ") + + " ')"; + if (classMatchType == 2) { + xpath += " and string-length(@class)="+srtLength+"]"; + }else{ + xpath += "]"; + } + }else{ + xpath += "concat(' ',@class,' '), ' " + + classes.join(" ') or contains(concat(' ',@class,' '), ' ") + + " ')]"; + } + var xpathResult = _document.evaluate(xpath, parent, null, XPathResult.ANY_TYPE, null); + var result = xpathResult.iterateNext(); + while(result){ + try{ + candidateNodes.push(result); + result = xpathResult.iterateNext(); + }catch(e){ break; } + } + return candidateNodes; // NodeList + }else{ + if(!nodeType){ + nodeType = "*"; + } + candidateNodes = parent.getElementsByTagName(nodeType); + + var node, i = 0; + outer: + while(node = candidateNodes[i++]){ + var nodeClasses = dojo.html.getClasses(node); + if(nodeClasses.length == 0){ continue outer; } + var matches = 0; + + for(var j = 0; j < nodeClasses.length; j++){ + if(reClass.test(nodeClasses[j])){ + if(classMatchType == dojo.html.classMatchType.ContainsAny){ + nodes.push(node); + continue outer; + }else{ + matches++; + } + }else{ + if(classMatchType == dojo.html.classMatchType.IsOnly){ + continue outer; + } + } + } + + if(matches == classes.length){ + if( (classMatchType == dojo.html.classMatchType.IsOnly)&& + (matches == nodeClasses.length)){ + nodes.push(node); + }else if(classMatchType == dojo.html.classMatchType.ContainsAll){ + nodes.push(node); + } + } + } + return nodes; // NodeList + } +} +dojo.html.getElementsByClassName = dojo.html.getElementsByClass; + +dojo.html.toCamelCase = function(/* string */selector){ + // summary + // Translates a CSS selector string to a camel-cased one. + var arr = selector.split('-'), cc = arr[0]; + for(var i = 1; i < arr.length; i++) { + cc += arr[i].charAt(0).toUpperCase() + arr[i].substring(1); + } + return cc; // string +} + +dojo.html.toSelectorCase = function(/* string */selector){ + // summary + // Translates a camel cased string to a selector cased one. + return selector.replace(/([A-Z])/g, "-$1" ).toLowerCase(); // string +} + +if (dojo.render.html.ie) { + // IE branch + dojo.html.getComputedStyle = function(/*HTMLElement|String*/node, /*String*/property, /*String*/value) { + // summary + // Get the computed style value for style "property" on "node" (IE). + node = dojo.byId(node); // FIXME: remove ability to access nodes by id for this time-critical function + if(!node || !node.currentStyle){return value;} + // FIXME: standardize on camel-case input to improve speed + return node.currentStyle[dojo.html.toCamelCase(property)]; // String + } + // SJM: getComputedStyle should be abandoned and replaced with the below function. + // All our supported browsers can return CSS2 compliant CssStyleDeclaration objects + // which can be queried directly for multiple styles. + dojo.html.getComputedStyles = function(/*HTMLElement*/node) { + // summary + // Get a style object containing computed styles for HTML Element node (IE). + return node.currentStyle; // CSSStyleDeclaration + } +} else { + // non-IE branch + dojo.html.getComputedStyle = function(/*HTMLElement|String*/node, /*String*/property, /*Any*/value) { + // summary + // Get the computed style value for style "property" on "node" (non-IE). + node = dojo.byId(node); + if(!node || !node.style){return value;} + var s = document.defaultView.getComputedStyle(node, null); + // s may be null on Safari + return (s&&s[dojo.html.toCamelCase(property)])||''; // String + } + // SJM: getComputedStyle should be abandoned and replaced with the below function. + // All our supported browsers can return CSS2 compliant CssStyleDeclaration objects + // which can be queried directly for multiple styles. + dojo.html.getComputedStyles = function(node) { + // summary + // Get a style object containing computed styles for HTML Element node (non-IE). + return document.defaultView.getComputedStyle(node, null); // CSSStyleDeclaration + } +} + +dojo.html.getStyleProperty = function(/* HTMLElement */node, /* string */cssSelector){ + // summary + // Returns the value of the passed style + node = dojo.byId(node); + return (node && node.style ? node.style[dojo.html.toCamelCase(cssSelector)] : undefined); // string +} + +dojo.html.getStyle = function(/* HTMLElement */node, /* string */cssSelector){ + // summary + // Returns the computed value of the passed style + var value = dojo.html.getStyleProperty(node, cssSelector); + return (value ? value : dojo.html.getComputedStyle(node, cssSelector)); // string || integer +} + +dojo.html.setStyle = function(/* HTMLElement */node, /* string */cssSelector, /* string */value){ + // summary + // Set the value of passed style on node + node = dojo.byId(node); + if(node && node.style){ + var camelCased = dojo.html.toCamelCase(cssSelector); + node.style[camelCased] = value; + } +} + +dojo.html.setStyleText = function (/* HTMLElement */target, /* string */text) { + // summary + // Try to set the entire cssText property of the passed target; equiv of setting style attribute. + try { + target.style.cssText = text; + } catch (e) { + target.setAttribute("style", text); + } +} + +dojo.html.copyStyle = function(/* HTMLElement */target, /* HTMLElement */source){ + // summary + // work around for opera which doesn't have cssText, and for IE which fails on setAttribute + if(!source.style.cssText){ + target.setAttribute("style", source.getAttribute("style")); + }else{ + target.style.cssText = source.style.cssText; + } + dojo.html.addClass(target, dojo.html.getClass(source)); +} + +dojo.html.getUnitValue = function(/* HTMLElement */node, /* string */cssSelector, /* boolean? */autoIsZero){ + // summary + // Get the value of passed selector, with the specific units used + var s = dojo.html.getComputedStyle(node, cssSelector); + if((!s)||((s == 'auto')&&(autoIsZero))){ + return { value: 0, units: 'px' }; // object + } + // FIXME: is regex inefficient vs. parseInt or some manual test? + var match = s.match(/(\-?[\d.]+)([a-z%]*)/i); + if (!match){return dojo.html.getUnitValue.bad;} + return { value: Number(match[1]), units: match[2].toLowerCase() }; // object +} +dojo.html.getUnitValue.bad = { value: NaN, units: '' }; + +if (dojo.render.html.ie) { + // IE branch + dojo.html.toPixelValue = function(/* HTMLElement */element, /* String */styleValue){ + // summary + // Extract value in pixels from styleValue (IE version). + // If a value cannot be extracted, zero is returned. + if(!styleValue){return 0;} + if(styleValue.slice(-2) == 'px'){return parseFloat(styleValue);} + var pixelValue = 0; + with(element){ + var sLeft = style.left; + var rsLeft = runtimeStyle.left; + runtimeStyle.left = currentStyle.left; + try { + style.left = styleValue || 0; + pixelValue = style.pixelLeft; + style.left = sLeft; + runtimeStyle.left = rsLeft; + }catch(e){ + // FIXME: it's possible for styleValue to be incompatible with + // style.left. In particular, border width values of + // "thick", "medium", or "thin" will provoke an exception. + } + } + return pixelValue; // Number + } +} else { + // non-IE branch + dojo.html.toPixelValue = function(/* HTMLElement */element, /* String */styleValue){ + // summary + // Extract value in pixels from styleValue (non-IE version). + // If a value cannot be extracted, zero is returned. + return (styleValue && (styleValue.slice(-2)=='px') ? parseFloat(styleValue) : 0); // Number + } +} + +dojo.html.getPixelValue = function(/* HTMLElement */node, /* string */styleProperty, /* boolean? */autoIsZero){ + // summary + // Get a computed style value, in pixels. + // node: HTMLElement + // Node to interrogate + // styleProperty: String + // Style property to query, in either css-selector or camelCase (property) format. + // autoIsZero: Boolean + // Deprecated. Any value that cannot be converted to pixels is returned as zero. + // + // summary + // Get the value of passed selector in pixels. + // + return dojo.html.toPixelValue(node, dojo.html.getComputedStyle(node, styleProperty)); +} + +dojo.html.setPositivePixelValue = function(/* HTMLElement */node, /* string */selector, /* integer */value){ + // summary + // Attempt to set the value of selector on node as a positive pixel value. + if(isNaN(value)){return false;} + node.style[selector] = Math.max(0, value) + 'px'; + return true; // boolean +} + +dojo.html.styleSheet = null; + +// FIXME: this is a really basic stub for adding and removing cssRules, but +// it assumes that you know the index of the cssRule that you want to add +// or remove, making it less than useful. So we need something that can +// search for the selector that you you want to remove. +dojo.html.insertCssRule = function(/* string */selector, /* string */declaration, /* integer? */index) { + // summary + // Attempt to insert declaration as selector on the internal stylesheet; if index try to set it there. + if (!dojo.html.styleSheet) { + if (document.createStyleSheet) { // IE + dojo.html.styleSheet = document.createStyleSheet(); + } else if (document.styleSheets[0]) { // rest + // FIXME: should create a new style sheet here + // fall back on an exsiting style sheet + dojo.html.styleSheet = document.styleSheets[0]; + } else { + return null; // integer + } // fail + } + + if (arguments.length < 3) { // index may == 0 + if (dojo.html.styleSheet.cssRules) { // W3 + index = dojo.html.styleSheet.cssRules.length; + } else if (dojo.html.styleSheet.rules) { // IE + index = dojo.html.styleSheet.rules.length; + } else { + return null; // integer + } // fail + } + + if (dojo.html.styleSheet.insertRule) { // W3 + var rule = selector + " { " + declaration + " }"; + return dojo.html.styleSheet.insertRule(rule, index); // integer + } else if (dojo.html.styleSheet.addRule) { // IE + return dojo.html.styleSheet.addRule(selector, declaration, index); // integer + } else { + return null; // integer + } // fail +} + +dojo.html.removeCssRule = function(/* integer? */index){ + // summary + // Attempt to remove the rule at index. + if(!dojo.html.styleSheet){ + dojo.debug("no stylesheet defined for removing rules"); + return false; + } + if(dojo.render.html.ie){ + if(!index){ + index = dojo.html.styleSheet.rules.length; + dojo.html.styleSheet.removeRule(index); + } + }else if(document.styleSheets[0]){ + if(!index){ + index = dojo.html.styleSheet.cssRules.length; + } + dojo.html.styleSheet.deleteRule(index); + } + return true; // boolean +} + +dojo.html._insertedCssFiles = []; // cache container needed because IE reformats cssText when added to DOM +dojo.html.insertCssFile = function(/* string */URI, /* HTMLDocument? */doc, /* boolean? */checkDuplicates, /* boolean */fail_ok){ + // summary + // calls css by XmlHTTP and inserts it into DOM as + if(!URI){ return; } + if(!doc){ doc = document; } + var cssStr = dojo.hostenv.getText(URI, false, fail_ok); + if(cssStr===null){ return; } + cssStr = dojo.html.fixPathsInCssText(cssStr, URI); + + if(checkDuplicates){ + var idx = -1, node, ent = dojo.html._insertedCssFiles; + for(var i = 0; i < ent.length; i++){ + if((ent[i].doc == doc) && (ent[i].cssText == cssStr)){ + idx = i; node = ent[i].nodeRef; + break; + } + } + // make sure we havent deleted our node + if(node){ + var styles = doc.getElementsByTagName("style"); + for(var i = 0; i < styles.length; i++){ + if(styles[i] == node){ + return; + } + } + // delete this entry + dojo.html._insertedCssFiles.shift(idx, 1); + } + } + + var style = dojo.html.insertCssText(cssStr, doc); + dojo.html._insertedCssFiles.push({'doc': doc, 'cssText': cssStr, 'nodeRef': style}); + + // insert custom attribute ex dbgHref="../foo.css" usefull when debugging in DOM inspectors, no? + if(style && djConfig.isDebug){ + style.setAttribute("dbgHref", URI); + } + return style; // HTMLStyleElement +} + +dojo.html.insertCssText = function(/* string */cssStr, /* HTMLDocument? */doc, /* string? */URI){ + // summary + // Attempt to insert CSS rules into the document through inserting a style element + // DomNode Style = insertCssText(String ".dojoMenu {color: green;}"[, DomDoc document, dojo.uri.Uri Url ]) + if(!cssStr){ + return; // HTMLStyleElement + } + if(!doc){ doc = document; } + if(URI){// fix paths in cssStr + cssStr = dojo.html.fixPathsInCssText(cssStr, URI); + } + var style = doc.createElement("style"); + style.setAttribute("type", "text/css"); + // IE is b0rken enough to require that we add the element to the doc + // before changing it's properties + var head = doc.getElementsByTagName("head")[0]; + if(!head){ // must have a head tag + dojo.debug("No head tag in document, aborting styles"); + return; // HTMLStyleElement + }else{ + head.appendChild(style); + } + if(style.styleSheet){// IE + var setFunc = function(){ + try{ + style.styleSheet.cssText = cssStr; + }catch(e){ dojo.debug(e); } + }; + if(style.styleSheet.disabled){ + setTimeout(setFunc, 10); + }else{ + setFunc(); + } + }else{ // w3c + var cssText = doc.createTextNode(cssStr); + style.appendChild(cssText); + } + return style; // HTMLStyleElement +} + +dojo.html.fixPathsInCssText = function(/* string */cssStr, /* string */URI){ + // summary + // usage: cssText comes from dojoroot/src/widget/templates/Foobar.css + // it has .dojoFoo { background-image: url(images/bar.png);} then uri should point to dojoroot/src/widget/templates/ + if(!cssStr || !URI){ return; } + var match, str = "", url = "", urlChrs = "[\\t\\s\\w\\(\\)\\/\\.\\\\'\"-:#=&?~]+"; + var regex = new RegExp('url\\(\\s*('+urlChrs+')\\s*\\)'); + var regexProtocol = /(file|https?|ftps?):\/\//; + regexTrim = new RegExp("^[\\s]*(['\"]?)("+urlChrs+")\\1[\\s]*?$"); + if(dojo.render.html.ie55 || dojo.render.html.ie60){ + var regexIe = new RegExp("AlphaImageLoader\\((.*)src\=['\"]("+urlChrs+")['\"]"); + // TODO: need to decide how to handle relative paths and AlphaImageLoader see #1441 + // current implementation breaks on build with intern_strings + while(match = regexIe.exec(cssStr)){ + url = match[2].replace(regexTrim, "$2"); + if(!regexProtocol.exec(url)){ + url = (new dojo.uri.Uri(URI, url).toString()); + } + str += cssStr.substring(0, match.index) + "AlphaImageLoader(" + match[1] + "src='" + url + "'"; + cssStr = cssStr.substr(match.index + match[0].length); + } + cssStr = str + cssStr; + str = ""; + } + + while(match = regex.exec(cssStr)){ + url = match[1].replace(regexTrim, "$2"); + if(!regexProtocol.exec(url)){ + url = (new dojo.uri.Uri(URI, url).toString()); + } + str += cssStr.substring(0, match.index) + "url(" + url + ")"; + cssStr = cssStr.substr(match.index + match[0].length); + } + return str + cssStr; // string +} + +dojo.html.setActiveStyleSheet = function(/* string */title){ + // summary + // Activate style sheet with specified title. + var i = 0, a, els = dojo.doc().getElementsByTagName("link"); + while (a = els[i++]) { + if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")){ + a.disabled = true; + if (a.getAttribute("title") == title) { a.disabled = false; } + } + } +} + +dojo.html.getActiveStyleSheet = function(){ + // summary + // return the title of the currently active stylesheet + var i = 0, a, els = dojo.doc().getElementsByTagName("link"); + while (a = els[i++]) { + if (a.getAttribute("rel").indexOf("style") != -1 + && a.getAttribute("title") + && !a.disabled + ){ + return a.getAttribute("title"); // string + } + } + return null; // string +} + +dojo.html.getPreferredStyleSheet = function(){ + // summary + // Return the preferred stylesheet title (i.e. link without alt attribute) + var i = 0, a, els = dojo.doc().getElementsByTagName("link"); + while (a = els[i++]) { + if(a.getAttribute("rel").indexOf("style") != -1 + && a.getAttribute("rel").indexOf("alt") == -1 + && a.getAttribute("title") + ){ + return a.getAttribute("title"); // string + } + } + return null; // string +} + +dojo.html.applyBrowserClass = function(/* HTMLElement */node){ + // summary + // Applies pre-set class names based on browser & version to the passed node. + // Modified version of Morris' CSS hack. + var drh=dojo.render.html; + var classes = { + dj_ie: drh.ie, + dj_ie55: drh.ie55, + dj_ie6: drh.ie60, + dj_ie7: drh.ie70, + dj_iequirks: drh.ie && drh.quirks, + dj_opera: drh.opera, + dj_opera8: drh.opera && (Math.floor(dojo.render.version)==8), + dj_opera9: drh.opera && (Math.floor(dojo.render.version)==9), + dj_khtml: drh.khtml, + dj_safari: drh.safari, + dj_gecko: drh.mozilla + }; // no dojo unsupported browsers + for(var p in classes){ + if(classes[p]){ + dojo.html.addClass(node, p); + } + } +}; + +dojo.provide("dojo.html.display"); + + +dojo.html._toggle = function(node, tester, setter){ + node = dojo.byId(node); + setter(node, !tester(node)); + return tester(node); +} + +dojo.html.show = function(/* HTMLElement */node){ + // summary + // Show the passed element by reverting display property set by dojo.html.hide + node = dojo.byId(node); + if(dojo.html.getStyleProperty(node, 'display')=='none'){ + dojo.html.setStyle(node, 'display', (node.dojoDisplayCache||'')); + node.dojoDisplayCache = undefined; // cannot use delete on a node in IE6 + } +} + +dojo.html.hide = function(/* HTMLElement */node){ + // summary + // Hide the passed element by setting display:none + node = dojo.byId(node); + if(typeof node["dojoDisplayCache"] == "undefined"){ // it could == '', so we cannot say !node.dojoDisplayCount + var d = dojo.html.getStyleProperty(node, 'display') + if(d!='none'){ + node.dojoDisplayCache = d; + } + } + dojo.html.setStyle(node, 'display', 'none'); +} + +dojo.html.setShowing = function(/* HTMLElement */node, /* boolean? */showing){ + // summary + // Calls show() if showing is true, hide() otherwise + dojo.html[(showing ? 'show' : 'hide')](node); +} + +dojo.html.isShowing = function(/* HTMLElement */node){ + // summary + // Returns whether the element is displayed or not. + // FIXME: returns true if node is bad, isHidden would be easier to make correct + return (dojo.html.getStyleProperty(node, 'display') != 'none'); // boolean +} + +dojo.html.toggleShowing = function(/* HTMLElement */node){ + // summary + // Call setShowing() on node with the complement of isShowing(), then return the new value of isShowing() + return dojo.html._toggle(node, dojo.html.isShowing, dojo.html.setShowing); // boolean +} + +// Simple mapping of tag names to display values +// FIXME: simplistic +dojo.html.displayMap = { tr: '', td: '', th: '', img: 'inline', span: 'inline', input: 'inline', button: 'inline' }; + +dojo.html.suggestDisplayByTagName = function(/* HTMLElement */node){ + // summary + // Suggest a value for the display property that will show 'node' based on it's tag + node = dojo.byId(node); + if(node && node.tagName){ + var tag = node.tagName.toLowerCase(); + return (tag in dojo.html.displayMap ? dojo.html.displayMap[tag] : 'block'); // string + } +} + +dojo.html.setDisplay = function(/* HTMLElement */node, /* string */display){ + // summary + // Sets the value of style.display to value of 'display' parameter if it is a string. + // Otherwise, if 'display' is false, set style.display to 'none'. + // Finally, set 'display' to a suggested display value based on the node's tag + dojo.html.setStyle(node, 'display', ((display instanceof String || typeof display == "string") ? display : (display ? dojo.html.suggestDisplayByTagName(node) : 'none'))); +} + +dojo.html.isDisplayed = function(/* HTMLElement */node){ + // summary + // Is true if the the computed display style for node is not 'none' + // FIXME: returns true if node is bad, isNotDisplayed would be easier to make correct + return (dojo.html.getComputedStyle(node, 'display') != 'none'); // boolean +} + +dojo.html.toggleDisplay = function(/* HTMLElement */node){ + // summary + // Call setDisplay() on node with the complement of isDisplayed(), then + // return the new value of isDisplayed() + return dojo.html._toggle(node, dojo.html.isDisplayed, dojo.html.setDisplay); // boolean +} + +dojo.html.setVisibility = function(/* HTMLElement */node, /* string */visibility){ + // summary + // Sets the value of style.visibility to value of 'visibility' parameter if it is a string. + // Otherwise, if 'visibility' is false, set style.visibility to 'hidden'. Finally, set style.visibility to 'visible'. + dojo.html.setStyle(node, 'visibility', ((visibility instanceof String || typeof visibility == "string") ? visibility : (visibility ? 'visible' : 'hidden'))); +} + +dojo.html.isVisible = function(/* HTMLElement */node){ + // summary + // Returns true if the the computed visibility style for node is not 'hidden' + // FIXME: returns true if node is bad, isInvisible would be easier to make correct + return (dojo.html.getComputedStyle(node, 'visibility') != 'hidden'); // boolean +} + +dojo.html.toggleVisibility = function(node){ + // summary + // Call setVisibility() on node with the complement of isVisible(), then return the new value of isVisible() + return dojo.html._toggle(node, dojo.html.isVisible, dojo.html.setVisibility); // boolean +} + +dojo.html.setOpacity = function(/* HTMLElement */node, /* float */opacity, /* boolean? */dontFixOpacity){ + // summary + // Sets the opacity of node in a cross-browser way. + // float between 0.0 (transparent) and 1.0 (opaque) + node = dojo.byId(node); + var h = dojo.render.html; + if(!dontFixOpacity){ + if( opacity >= 1.0){ + if(h.ie){ + dojo.html.clearOpacity(node); + return; + }else{ + opacity = 0.999999; + } + }else if( opacity < 0.0){ opacity = 0; } + } + if(h.ie){ + if(node.nodeName.toLowerCase() == "tr"){ + // FIXME: is this too naive? will we get more than we want? + var tds = node.getElementsByTagName("td"); + for(var x=0; x= 0.999999 ? 1.0 : Number(opac); // float +} + + +dojo.provide("dojo.html.color"); + + + + +dojo.html.getBackgroundColor = function(/* HTMLElement */node){ + // summary + // returns the background color of the passed node as a 32-bit color (RGBA) + node = dojo.byId(node); + var color; + do{ + color = dojo.html.getStyle(node, "background-color"); + // Safari doesn't say "transparent" + if(color.toLowerCase() == "rgba(0, 0, 0, 0)") { color = "transparent"; } + if(node == document.getElementsByTagName("body")[0]) { node = null; break; } + node = node.parentNode; + }while(node && dojo.lang.inArray(["transparent", ""], color)); + if(color == "transparent"){ + color = [255, 255, 255, 0]; + }else{ + color = dojo.gfx.color.extractRGB(color); + } + return color; // array +} + +dojo.provide("dojo.html.layout"); + + + + + +dojo.html.sumAncestorProperties = function(/* HTMLElement */node, /* string */prop){ + // summary + // Returns the sum of the passed property on all ancestors of node. + node = dojo.byId(node); + if(!node){ return 0; } // FIXME: throw an error? + + var retVal = 0; + while(node){ + if(dojo.html.getComputedStyle(node, 'position') == 'fixed'){ + return 0; + } + var val = node[prop]; + if(val){ + retVal += val - 0; + if(node==dojo.body()){ break; }// opera and khtml #body & #html has the same values, we only need one value + } + node = node.parentNode; + } + return retVal; // integer +} + +dojo.html.setStyleAttributes = function(/* HTMLElement */node, /* string */attributes) { + // summary + // allows a dev to pass a string similar to what you'd pass in style="", and apply it to a node. + node = dojo.byId(node); + var splittedAttribs=attributes.replace(/(;)?\s*$/, "").split(";"); + for(var i=0; i0){ + ret.x += isNaN(n) ? 0 : n; + } + var m = curnode["offsetTop"]; + ret.y += isNaN(m) ? 0 : m; + curnode = curnode.offsetParent; + }while((curnode != endNode)&&(curnode != null)); + }else if(node["x"]&&node["y"]){ + ret.x += isNaN(node.x) ? 0 : node.x; + ret.y += isNaN(node.y) ? 0 : node.y; + } + } + + // account for document scrolling! + if(includeScroll){ + var scroll = dojo.html.getScroll(); + ret.y += scroll.top; + ret.x += scroll.left; + } + + var extentFuncArray=[dojo.html.getPaddingExtent, dojo.html.getBorderExtent, dojo.html.getMarginExtent]; + if(nativeBoxType > targetBoxType){ + for(var i=targetBoxType;inativeBoxType;--i){ + ret.y -= extentFuncArray[i-1](node, 'top'); + ret.x -= extentFuncArray[i-1](node, 'left'); + } + } + ret.top = ret.y; + ret.left = ret.x; + return ret; // object +} + +dojo.html.isPositionAbsolute = function(/* HTMLElement */node){ + // summary + // Returns true if the element is absolutely positioned. + return (dojo.html.getComputedStyle(node, 'position') == 'absolute'); // boolean +} + +dojo.html._sumPixelValues = function(/* HTMLElement */node, selectors, autoIsZero){ + var total = 0; + for(var x=0; x 4 ) { coords.pop(); } + var ret = { + left: coords[0], + top: coords[1], + width: coords[2], + height: coords[3] + }; + }else if(!coords.nodeType && !(coords instanceof String || typeof coords == "string") && + ('width' in coords || 'height' in coords || 'left' in coords || + 'x' in coords || 'top' in coords || 'y' in coords)){ + // coords is a coordinate object or at least part of one + var ret = { + left: coords.left||coords.x||0, + top: coords.top||coords.y||0, + width: coords.width||0, + height: coords.height||0 + }; + }else{ + // coords is an dom object (or dom object id); return it's coordinates + var node = dojo.byId(coords); + var pos = dojo.html.abs(node, includeScroll, boxtype); + var marginbox = dojo.html.getMarginBox(node); + var ret = { + left: pos.left, + top: pos.top, + width: marginbox.width, + height: marginbox.height + }; + } + ret.x = ret.left; + ret.y = ret.top; + return ret; // object +} + +dojo.html.setMarginBoxWidth = dojo.html.setOuterWidth = function(node, width){ + return dojo.html._callDeprecated("setMarginBoxWidth", "setMarginBox", arguments, "width"); +} +dojo.html.setMarginBoxHeight = dojo.html.setOuterHeight = function(){ + return dojo.html._callDeprecated("setMarginBoxHeight", "setMarginBox", arguments, "height"); +} +dojo.html.getMarginBoxWidth = dojo.html.getOuterWidth = function(){ + return dojo.html._callDeprecated("getMarginBoxWidth", "getMarginBox", arguments, null, "width"); +} +dojo.html.getMarginBoxHeight = dojo.html.getOuterHeight = function(){ + return dojo.html._callDeprecated("getMarginBoxHeight", "getMarginBox", arguments, null, "height"); +} +dojo.html.getTotalOffset = function(node, type, includeScroll){ + return dojo.html._callDeprecated("getTotalOffset", "getAbsolutePosition", arguments, null, type); +} +dojo.html.getAbsoluteX = function(node, includeScroll){ + return dojo.html._callDeprecated("getAbsoluteX", "getAbsolutePosition", arguments, null, "x"); +} +dojo.html.getAbsoluteY = function(node, includeScroll){ + return dojo.html._callDeprecated("getAbsoluteY", "getAbsolutePosition", arguments, null, "y"); +} +dojo.html.totalOffsetLeft = function(node, includeScroll){ + return dojo.html._callDeprecated("totalOffsetLeft", "getAbsolutePosition", arguments, null, "left"); +} +dojo.html.totalOffsetTop = function(node, includeScroll){ + return dojo.html._callDeprecated("totalOffsetTop", "getAbsolutePosition", arguments, null, "top"); +} +dojo.html.getMarginWidth = function(node){ + return dojo.html._callDeprecated("getMarginWidth", "getMargin", arguments, null, "width"); +} +dojo.html.getMarginHeight = function(node){ + return dojo.html._callDeprecated("getMarginHeight", "getMargin", arguments, null, "height"); +} +dojo.html.getBorderWidth = function(node){ + return dojo.html._callDeprecated("getBorderWidth", "getBorder", arguments, null, "width"); +} +dojo.html.getBorderHeight = function(node){ + return dojo.html._callDeprecated("getBorderHeight", "getBorder", arguments, null, "height"); +} +dojo.html.getPaddingWidth = function(node){ + return dojo.html._callDeprecated("getPaddingWidth", "getPadding", arguments, null, "width"); +} +dojo.html.getPaddingHeight = function(node){ + return dojo.html._callDeprecated("getPaddingHeight", "getPadding", arguments, null, "height"); +} +dojo.html.getPadBorderWidth = function(node){ + return dojo.html._callDeprecated("getPadBorderWidth", "getPadBorder", arguments, null, "width"); +} +dojo.html.getPadBorderHeight = function(node){ + return dojo.html._callDeprecated("getPadBorderHeight", "getPadBorder", arguments, null, "height"); +} +dojo.html.getBorderBoxWidth = dojo.html.getInnerWidth = function(){ + return dojo.html._callDeprecated("getBorderBoxWidth", "getBorderBox", arguments, null, "width"); +} +dojo.html.getBorderBoxHeight = dojo.html.getInnerHeight = function(){ + return dojo.html._callDeprecated("getBorderBoxHeight", "getBorderBox", arguments, null, "height"); +} +dojo.html.getContentBoxWidth = dojo.html.getContentWidth = function(){ + return dojo.html._callDeprecated("getContentBoxWidth", "getContentBox", arguments, null, "width"); +} +dojo.html.getContentBoxHeight = dojo.html.getContentHeight = function(){ + return dojo.html._callDeprecated("getContentBoxHeight", "getContentBox", arguments, null, "height"); +} +dojo.html.setContentBoxWidth = dojo.html.setContentWidth = function(node, width){ + return dojo.html._callDeprecated("setContentBoxWidth", "setContentBox", arguments, "width"); +} +dojo.html.setContentBoxHeight = dojo.html.setContentHeight = function(node, height){ + return dojo.html._callDeprecated("setContentBoxHeight", "setContentBox", arguments, "height"); +} + +dojo.provide("dojo.lfx.html"); + + + + + + + + +dojo.lfx.html._byId = function(nodes){ + if(!nodes){ return []; } + if(dojo.lang.isArrayLike(nodes)){ + if(!nodes.alreadyChecked){ + var n = []; + dojo.lang.forEach(nodes, function(node){ + n.push(dojo.byId(node)); + }); + n.alreadyChecked = true; + return n; + }else{ + return nodes; + } + }else{ + var n = []; + n.push(dojo.byId(nodes)); + n.alreadyChecked = true; + return n; + } +} + +dojo.lfx.html.propertyAnimation = function( /*DOMNode[]*/ nodes, + /*Object[]*/ propertyMap, + /*int*/ duration, + /*function*/ easing, + /*Object*/ handlers){ + // summary: Returns an animation that will transition the properties of "nodes" + // depending how they are defined in "propertyMap". + // nodes: An array of DOMNodes or one DOMNode. + // propertyMap: { property: String, start: Decimal?, end: Decimal?, units: String? } + // An array of objects defining properties to change. + // duration: Duration of the animation in milliseconds. + // easing: An easing function. + // handlers: { handler: Function?, onstart: Function?, onstop: Function?, onanimate: Function? } + nodes = dojo.lfx.html._byId(nodes); + + var targs = { + "propertyMap": propertyMap, + "nodes": nodes, + "duration": duration, + "easing": easing||dojo.lfx.easeDefault + }; + + var setEmUp = function(args){ + if(args.nodes.length==1){ + // FIXME: we're only supporting start-value filling when one node is + // passed + + var pm = args.propertyMap; + if(!dojo.lang.isArray(args.propertyMap)){ + // it's stupid to have to pack an array with a set of objects + // when you can just pass in an object list + var parr = []; + for(var pname in pm){ + pm[pname].property = pname; + parr.push(pm[pname]); + } + pm = args.propertyMap = parr; + } + dojo.lang.forEach(pm, function(prop){ + if(dj_undef("start", prop)){ + if(prop.property != "opacity"){ + prop.start = parseInt(dojo.html.getComputedStyle(args.nodes[0], prop.property)); + }else{ + prop.start = dojo.html.getOpacity(args.nodes[0]); + } + } + }); + } + } + + var coordsAsInts = function(coords){ + var cints = []; + dojo.lang.forEach(coords, function(c){ + cints.push(Math.round(c)); + }); + return cints; + } + + var setStyle = function(n, style){ + n = dojo.byId(n); + if(!n || !n.style){ return; } + for(var s in style){ + try{ + if(s == "opacity"){ + dojo.html.setOpacity(n, style[s]); + }else{ + n.style[s] = style[s]; + } + }catch(e){ dojo.debug(e); } + } + } + + var propLine = function(properties){ + this._properties = properties; + this.diffs = new Array(properties.length); + dojo.lang.forEach(properties, function(prop, i){ + // calculate the end - start to optimize a bit + if(dojo.lang.isFunction(prop.start)){ + prop.start = prop.start(prop, i); + } + if(dojo.lang.isFunction(prop.end)){ + prop.end = prop.end(prop, i); + } + if(dojo.lang.isArray(prop.start)){ + // don't loop through the arrays + this.diffs[i] = null; + }else if(prop.start instanceof dojo.gfx.color.Color){ + // save these so we don't have to call toRgb() every getValue() call + prop.startRgb = prop.start.toRgb(); + prop.endRgb = prop.end.toRgb(); + }else{ + this.diffs[i] = prop.end - prop.start; + } + }, this); + + this.getValue = function(n){ + var ret = {}; + dojo.lang.forEach(this._properties, function(prop, i){ + var value = null; + if(dojo.lang.isArray(prop.start)){ + // FIXME: what to do here? + }else if(prop.start instanceof dojo.gfx.color.Color){ + value = (prop.units||"rgb") + "("; + for(var j = 0 ; j < prop.startRgb.length ; j++){ + value += Math.round(((prop.endRgb[j] - prop.startRgb[j]) * n) + prop.startRgb[j]) + (j < prop.startRgb.length - 1 ? "," : ""); + } + value += ")"; + }else{ + value = ((this.diffs[i]) * n) + prop.start + (prop.property != "opacity" ? prop.units||"px" : ""); + } + ret[dojo.html.toCamelCase(prop.property)] = value; + }, this); + return ret; + } + } + + var anim = new dojo.lfx.Animation({ + beforeBegin: function(){ + setEmUp(targs); + anim.curve = new propLine(targs.propertyMap); + }, + onAnimate: function(propValues){ + dojo.lang.forEach(targs.nodes, function(node){ + setStyle(node, propValues); + }); + } + }, + targs.duration, + null, + targs.easing + ); + if(handlers){ + for(var x in handlers){ + if(dojo.lang.isFunction(handlers[x])){ + anim.connect(x, anim, handlers[x]); + } + } + } + + return anim; // dojo.lfx.Animation +} + +dojo.lfx.html._makeFadeable = function(nodes){ + var makeFade = function(node){ + if(dojo.render.html.ie){ + // only set the zoom if the "tickle" value would be the same as the + // default + if( (node.style.zoom.length == 0) && + (dojo.html.getStyle(node, "zoom") == "normal") ){ + // make sure the node "hasLayout" + // NOTE: this has been tested with larger and smaller user-set text + // sizes and works fine + node.style.zoom = "1"; + // node.style.zoom = "normal"; + } + // don't set the width to auto if it didn't already cascade that way. + // We don't want to f anyones designs + if( (node.style.width.length == 0) && + (dojo.html.getStyle(node, "width") == "auto") ){ + node.style.width = "auto"; + } + } + } + if(dojo.lang.isArrayLike(nodes)){ + dojo.lang.forEach(nodes, makeFade); + }else{ + makeFade(nodes); + } +} + +dojo.lfx.html.fade = function(/*DOMNode[]*/ nodes, + /*Object*/values, + /*int?*/ duration, + /*Function?*/ easing, + /*Function?*/ callback){ + // summary:Returns an animation that will fade the "nodes" from the start to end values passed. + // nodes: An array of DOMNodes or one DOMNode. + // values: { start: Decimal?, end: Decimal? } + // duration: Duration of the animation in milliseconds. + // easing: An easing function. + // callback: Function to run at the end of the animation. + nodes = dojo.lfx.html._byId(nodes); + var props = { property: "opacity" }; + if(!dj_undef("start", values)){ + props.start = values.start; + }else{ + props.start = function(){ return dojo.html.getOpacity(nodes[0]); }; + } + + if(!dj_undef("end", values)){ + props.end = values.end; + }else{ + dojo.raise("dojo.lfx.html.fade needs an end value"); + } + + var anim = dojo.lfx.propertyAnimation(nodes, [ props ], duration, easing); + anim.connect("beforeBegin", function(){ + dojo.lfx.html._makeFadeable(nodes); + }); + if(callback){ + anim.connect("onEnd", function(){ callback(nodes, anim); }); + } + + return anim; // dojo.lfx.Animation +} + +dojo.lfx.html.fadeIn = function(/*DOMNode[]*/ nodes, /*int?*/ duration, /*Function?*/ easing, /*Function?*/ callback){ + // summary: Returns an animation that will fade "nodes" from its current opacity to fully opaque. + // nodes: An array of DOMNodes or one DOMNode. + // duration: Duration of the animation in milliseconds. + // easing: An easing function. + // callback: Function to run at the end of the animation. + return dojo.lfx.html.fade(nodes, { end: 1 }, duration, easing, callback); // dojo.lfx.Animation +} + +dojo.lfx.html.fadeOut = function(/*DOMNode[]*/ nodes, /*int?*/ duration, /*Function?*/ easing, /*Function?*/ callback){ + // summary: Returns an animation that will fade "nodes" from its current opacity to fully transparent. + // nodes: An array of DOMNodes or one DOMNode. + // duration: Duration of the animation in milliseconds. + // easing: An easing function. + // callback: Function to run at the end of the animation. + return dojo.lfx.html.fade(nodes, { end: 0 }, duration, easing, callback); // dojo.lfx.Animation +} + +dojo.lfx.html.fadeShow = function(/*DOMNode[]*/ nodes, /*int?*/ duration, /*Function?*/ easing, /*Function?*/ callback){ + // summary: Returns an animation that will fade "nodes" from transparent to opaque and shows + // "nodes" at the end if it is hidden. + // nodes: An array of DOMNodes or one DOMNode. + // duration: Duration of the animation in milliseconds. + // easing: An easing function. + // callback: Function to run at the end of the animation. + nodes=dojo.lfx.html._byId(nodes); + dojo.lang.forEach(nodes, function(node){ + dojo.html.setOpacity(node, 0.0); + }); + + var anim = dojo.lfx.html.fadeIn(nodes, duration, easing, callback); + anim.connect("beforeBegin", function(){ + if(dojo.lang.isArrayLike(nodes)){ + dojo.lang.forEach(nodes, dojo.html.show); + }else{ + dojo.html.show(nodes); + } + }); + + return anim; // dojo.lfx.Animation +} + +dojo.lfx.html.fadeHide = function(/*DOMNode[]*/ nodes, /*int?*/ duration, /*Function?*/ easing, /*Function?*/ callback){ + // summary: Returns an animation that will fade "nodes" from its current opacity to opaque and hides + // "nodes" at the end. + // nodes: An array of DOMNodes or one DOMNode. + // duration: Duration of the animation in milliseconds. + // easing: An easing function. + // callback: Function to run at the end of the animation. + var anim = dojo.lfx.html.fadeOut(nodes, duration, easing, function(){ + if(dojo.lang.isArrayLike(nodes)){ + dojo.lang.forEach(nodes, dojo.html.hide); + }else{ + dojo.html.hide(nodes); + } + if(callback){ callback(nodes, anim); } + }); + + return anim; // dojo.lfx.Animation +} + +dojo.lfx.html.wipeIn = function(/*DOMNode[]*/ nodes, /*int?*/ duration, /*Function?*/ easing, /*Function?*/ callback){ + // summary: Returns an animation that will show and wipe in "nodes". + // nodes: An array of DOMNodes or one DOMNode. + // duration: Duration of the animation in milliseconds. + // easing: An easing function. + // callback: Function to run at the end of the animation. + nodes = dojo.lfx.html._byId(nodes); + var anims = []; + + dojo.lang.forEach(nodes, function(node){ + var oprop = { }; // old properties of node (before we mucked w/them) + + // get node height, either it's natural height or it's height specified via style or class attributes + // (for FF, the node has to be (temporarily) rendered to measure height) + // TODO: should this offscreen code be part of dojo.html, so that getBorderBox() works on hidden nodes? + var origTop, origLeft, origPosition; + with(node.style){ + origTop=top; origLeft=left; origPosition=position; + top="-9999px"; left="-9999px"; position="absolute"; + display=""; + } + var nodeHeight = dojo.html.getBorderBox(node).height; + with(node.style){ + top=origTop; left=origLeft; position=origPosition; + display="none"; + } + + var anim = dojo.lfx.propertyAnimation(node, + { "height": { + start: 1, // 0 causes IE to display the whole panel + end: function(){ return nodeHeight; } + } + }, + duration, + easing); + + anim.connect("beforeBegin", function(){ + oprop.overflow = node.style.overflow; + oprop.height = node.style.height; + with(node.style){ + overflow = "hidden"; + height = "1px"; // 0 causes IE to display the whole panel + } + dojo.html.show(node); + }); + + anim.connect("onEnd", function(){ + with(node.style){ + overflow = oprop.overflow; + height = oprop.height; + } + if(callback){ callback(node, anim); } + }); + anims.push(anim); + }); + + return dojo.lfx.combine(anims); // dojo.lfx.Combine +} + +dojo.lfx.html.wipeOut = function(/*DOMNode[]*/ nodes, /*int?*/ duration, /*Function?*/ easing, /*Function?*/ callback){ + // summary: Returns an animation that will wipe out and hide "nodes". + // nodes: An array of DOMNodes or one DOMNode. + // duration: Duration of the animation in milliseconds. + // easing: An easing function. + // callback: Function to run at the end of the animation. + nodes = dojo.lfx.html._byId(nodes); + var anims = []; + + dojo.lang.forEach(nodes, function(node){ + var oprop = { }; // old properties of node (before we mucked w/them) + var anim = dojo.lfx.propertyAnimation(node, + { "height": { + start: function(){ return dojo.html.getContentBox(node).height; }, + end: 1 // 0 causes IE to display the whole panel + } + }, + duration, + easing, + { + "beforeBegin": function(){ + oprop.overflow = node.style.overflow; + oprop.height = node.style.height; + with(node.style){ + overflow = "hidden"; + } + dojo.html.show(node); + }, + + "onEnd": function(){ + dojo.html.hide(node); + with(node.style){ + overflow = oprop.overflow; + height = oprop.height; + } + if(callback){ callback(node, anim); } + } + } + ); + anims.push(anim); + }); + + return dojo.lfx.combine(anims); // dojo.lfx.Combine +} + +dojo.lfx.html.slideTo = function(/*DOMNode*/ nodes, + /*Object*/ coords, + /*int?*/ duration, + /*Function?*/ easing, + /*Function?*/ callback){ + // summary: Returns an animation that will slide "nodes" from its current position to + // the position defined in "coords". + // nodes: An array of DOMNodes or one DOMNode. + // coords: { top: Decimal?, left: Decimal? } + // duration: Duration of the animation in milliseconds. + // easing: An easing function. + // callback: Function to run at the end of the animation. + nodes = dojo.lfx.html._byId(nodes); + var anims = []; + var compute = dojo.html.getComputedStyle; + + if(dojo.lang.isArray(coords)){ + /* coords: Array + pId: a */ + dojo.deprecated('dojo.lfx.html.slideTo(node, array)', 'use dojo.lfx.html.slideTo(node, {top: value, left: value});', '0.5'); + coords = { top: coords[0], left: coords[1] }; + } + dojo.lang.forEach(nodes, function(node){ + var top = null; + var left = null; + + var init = (function(){ + var innerNode = node; + return function(){ + var pos = compute(innerNode, 'position'); + top = (pos == 'absolute' ? node.offsetTop : parseInt(compute(node, 'top')) || 0); + left = (pos == 'absolute' ? node.offsetLeft : parseInt(compute(node, 'left')) || 0); + + if (!dojo.lang.inArray(['absolute', 'relative'], pos)) { + var ret = dojo.html.abs(innerNode, true); + dojo.html.setStyleAttributes(innerNode, "position:absolute;top:"+ret.y+"px;left:"+ret.x+"px;"); + top = ret.y; + left = ret.x; + } + } + })(); + init(); + + var anim = dojo.lfx.propertyAnimation(node, + { "top": { start: top, end: (coords.top||0) }, + "left": { start: left, end: (coords.left||0) } + }, + duration, + easing, + { "beforeBegin": init } + ); + + if(callback){ + anim.connect("onEnd", function(){ callback(nodes, anim); }); + } + + anims.push(anim); + }); + + return dojo.lfx.combine(anims); // dojo.lfx.Combine +} + +dojo.lfx.html.slideBy = function(/*DOMNode*/ nodes, /*Object*/ coords, /*int?*/ duration, /*Function?*/ easing, /*Function?*/ callback){ + // summary: Returns an animation that will slide "nodes" from its current position + // to its current position plus the numbers defined in "coords". + // nodes: An array of DOMNodes or one DOMNode. + // coords: { top: Decimal?, left: Decimal? } + // duration: Duration of the animation in milliseconds. + // easing: An easing function. + // callback: Function to run at the end of the animation. + nodes = dojo.lfx.html._byId(nodes); + var anims = []; + var compute = dojo.html.getComputedStyle; + + if(dojo.lang.isArray(coords)){ + /* coords: Array + pId: a */ + dojo.deprecated('dojo.lfx.html.slideBy(node, array)', 'use dojo.lfx.html.slideBy(node, {top: value, left: value});', '0.5'); + coords = { top: coords[0], left: coords[1] }; + } + + dojo.lang.forEach(nodes, function(node){ + var top = null; + var left = null; + + var init = (function(){ + var innerNode = node; + return function(){ + var pos = compute(innerNode, 'position'); + top = (pos == 'absolute' ? node.offsetTop : parseInt(compute(node, 'top')) || 0); + left = (pos == 'absolute' ? node.offsetLeft : parseInt(compute(node, 'left')) || 0); + + if (!dojo.lang.inArray(['absolute', 'relative'], pos)) { + var ret = dojo.html.abs(innerNode, true); + dojo.html.setStyleAttributes(innerNode, "position:absolute;top:"+ret.y+"px;left:"+ret.x+"px;"); + top = ret.y; + left = ret.x; + } + } + })(); + init(); + + var anim = dojo.lfx.propertyAnimation(node, + { + "top": { start: top, end: top+(coords.top||0) }, + "left": { start: left, end: left+(coords.left||0) } + }, + duration, + easing).connect("beforeBegin", init); + + if(callback){ + anim.connect("onEnd", function(){ callback(nodes, anim); }); + } + + anims.push(anim); + }); + + return dojo.lfx.combine(anims); // dojo.lfx.Combine +} + +dojo.lfx.html.explode = function(/*DOMNode*/ start, + /*DOMNode*/ endNode, + /*int?*/ duration, + /*Function?*/ easing, + /*Function?*/ callback){ + // summary: Returns an animation that will + // start: + // endNode: + // duration: Duration of the animation in milliseconds. + // easing: An easing function. + // callback: Function to run at the end of the animation. + var h = dojo.html; + start = dojo.byId(start); + endNode = dojo.byId(endNode); + var startCoords = h.toCoordinateObject(start, true); + var outline = document.createElement("div"); + h.copyStyle(outline, endNode); + if(endNode.explodeClassName){ outline.className = endNode.explodeClassName; } + with(outline.style){ + position = "absolute"; + display = "none"; + // border = "1px solid black"; + var backgroundStyle = h.getStyle(start, "background-color"); + backgroundColor = backgroundStyle ? backgroundStyle.toLowerCase() : "transparent"; + backgroundColor = (backgroundColor == "transparent") ? "rgb(221, 221, 221)" : backgroundColor; + } + dojo.body().appendChild(outline); + + with(endNode.style){ + visibility = "hidden"; + display = "block"; + } + var endCoords = h.toCoordinateObject(endNode, true); + with(endNode.style){ + display = "none"; + visibility = "visible"; + } + + var props = { opacity: { start: 0.5, end: 1.0 } }; + dojo.lang.forEach(["height", "width", "top", "left"], function(type){ + props[type] = { start: startCoords[type], end: endCoords[type] } + }); + + var anim = new dojo.lfx.propertyAnimation(outline, + props, + duration, + easing, + { + "beforeBegin": function(){ + h.setDisplay(outline, "block"); + }, + "onEnd": function(){ + h.setDisplay(endNode, "block"); + outline.parentNode.removeChild(outline); + } + } + ); + + if(callback){ + anim.connect("onEnd", function(){ callback(endNode, anim); }); + } + return anim; // dojo.lfx.Animation +} + +dojo.lfx.html.implode = function(/*DOMNode*/ startNode, + /*DOMNode*/ end, + /*int?*/ duration, + /*Function?*/ easing, + /*Function?*/ callback){ + // summary: Returns an animation that will + // startNode: + // end: + // duration: Duration of the animation in milliseconds. + // easing: An easing function. + // callback: Function to run at the end of the animation. + var h = dojo.html; + startNode = dojo.byId(startNode); + end = dojo.byId(end); + var startCoords = dojo.html.toCoordinateObject(startNode, true); + var endCoords = dojo.html.toCoordinateObject(end, true); + + var outline = document.createElement("div"); + dojo.html.copyStyle(outline, startNode); + if (startNode.explodeClassName) { outline.className = startNode.explodeClassName; } + dojo.html.setOpacity(outline, 0.3); + with(outline.style){ + position = "absolute"; + display = "none"; + backgroundColor = h.getStyle(startNode, "background-color").toLowerCase(); + } + dojo.body().appendChild(outline); + + var props = { opacity: { start: 1.0, end: 0.5 } }; + dojo.lang.forEach(["height", "width", "top", "left"], function(type){ + props[type] = { start: startCoords[type], end: endCoords[type] } + }); + + var anim = new dojo.lfx.propertyAnimation(outline, + props, + duration, + easing, + { + "beforeBegin": function(){ + dojo.html.hide(startNode); + dojo.html.show(outline); + }, + "onEnd": function(){ + outline.parentNode.removeChild(outline); + } + } + ); + + if(callback){ + anim.connect("onEnd", function(){ callback(startNode, anim); }); + } + return anim; // dojo.lfx.Animation +} + +dojo.lfx.html.highlight = function(/*DOMNode[]*/ nodes, + /*dojo.gfx.color.Color*/ startColor, + /*int?*/ duration, + /*Function?*/ easing, + /*Function?*/ callback){ + // summary: Returns an animation that will set the background color + // of "nodes" to startColor and transition it to "nodes" + // original color. + // startColor: Color to transition from. + // duration: Duration of the animation in milliseconds. + // easing: An easing function. + // callback: Function to run at the end of the animation. + nodes = dojo.lfx.html._byId(nodes); + var anims = []; + + dojo.lang.forEach(nodes, function(node){ + var color = dojo.html.getBackgroundColor(node); + var bg = dojo.html.getStyle(node, "background-color").toLowerCase(); + var bgImage = dojo.html.getStyle(node, "background-image"); + var wasTransparent = (bg == "transparent" || bg == "rgba(0, 0, 0, 0)"); + while(color.length > 3) { color.pop(); } + + var rgb = new dojo.gfx.color.Color(startColor); + var endRgb = new dojo.gfx.color.Color(color); + + var anim = dojo.lfx.propertyAnimation(node, + { "background-color": { start: rgb, end: endRgb } }, + duration, + easing, + { + "beforeBegin": function(){ + if(bgImage){ + node.style.backgroundImage = "none"; + } + node.style.backgroundColor = "rgb(" + rgb.toRgb().join(",") + ")"; + }, + "onEnd": function(){ + if(bgImage){ + node.style.backgroundImage = bgImage; + } + if(wasTransparent){ + node.style.backgroundColor = "transparent"; + } + if(callback){ + callback(node, anim); + } + } + } + ); + + anims.push(anim); + }); + return dojo.lfx.combine(anims); // dojo.lfx.Combine +} + +dojo.lfx.html.unhighlight = function(/*DOMNode[]*/ nodes, + /*dojo.gfx.color.Color*/ endColor, + /*int?*/ duration, + /*Function?*/ easing, + /*Function?*/ callback){ + // summary: Returns an animation that will transition "nodes" background color + // from its current color to "endColor". + // endColor: Color to transition to. + // duration: Duration of the animation in milliseconds. + // easing: An easing function. + // callback: Function to run at the end of the animation. + nodes = dojo.lfx.html._byId(nodes); + var anims = []; + + dojo.lang.forEach(nodes, function(node){ + var color = new dojo.gfx.color.Color(dojo.html.getBackgroundColor(node)); + var rgb = new dojo.gfx.color.Color(endColor); + + var bgImage = dojo.html.getStyle(node, "background-image"); + + var anim = dojo.lfx.propertyAnimation(node, + { "background-color": { start: color, end: rgb } }, + duration, + easing, + { + "beforeBegin": function(){ + if(bgImage){ + node.style.backgroundImage = "none"; + } + node.style.backgroundColor = "rgb(" + color.toRgb().join(",") + ")"; + }, + "onEnd": function(){ + if(callback){ + callback(node, anim); + } + } + } + ); + anims.push(anim); + }); + return dojo.lfx.combine(anims); // dojo.lfx.Combine +} + +dojo.lang.mixin(dojo.lfx, dojo.lfx.html); + +dojo.kwCompoundRequire({ + browser: ["dojo.lfx.html"], + dashboard: ["dojo.lfx.html"] +}); +dojo.provide("dojo.lfx.*"); + +if(!this["dojo"]){ + alert("\"dojo/__package__.js\" is now located at \"dojo/dojo.js\". Please update your includes accordingly"); +} + +dojo.provide("dojo.xml.Parse"); + + +//TODO: determine dependencies +// currently has dependency on dojo.xml.DomUtil nodeTypes constants... + +// using documentFragment nomenclature to generalize in case we don't want to require passing a collection of nodes with a single parent + +dojo.xml.Parse = function(){ + // summary: + // generic class for taking a DOM node and parsing it into an object + // based on the "dojo tag name" of that node. + // + // supported dojoTagName's: + // => prefix:tag + // => dojo:tag + // => dojo:tag + // => dojo:type + // => prefix:type + // => dojo:type + // => dojo:type + + var isIE = ((dojo.render.html.capable)&&(dojo.render.html.ie)); + + // get normalized (lowercase) tagName + // some browsers report tagNames in lowercase no matter what + function getTagName(node){ + /* + return ((node)&&(node["tagName"]) ? node.tagName.toLowerCase() : ''); + */ + try{ + return node.tagName.toLowerCase(); + }catch(e){ + return ""; + } + } + + // locate dojo qualified tag name + function getDojoTagName(node){ + var tagName = getTagName(node); + if (!tagName){ + return ''; + } + // any registered tag + if((dojo.widget)&&(dojo.widget.tags[tagName])){ + return tagName; + } + // => prefix:tag + var p = tagName.indexOf(":"); + if(p>=0){ + return tagName; + } + // => dojo:tag + if(tagName.substr(0,5) == "dojo:"){ + return tagName; + } + if(dojo.render.html.capable && dojo.render.html.ie && node.scopeName != 'HTML'){ + return node.scopeName.toLowerCase() + ':' + tagName; + } + // => dojo:tag + if(tagName.substr(0,4) == "dojo"){ + // FIXME: this assumes tag names are always lower case + return "dojo:" + tagName.substring(4); + } + // => prefix:type + // => dojo:type + var djt = node.getAttribute("dojoType") || node.getAttribute("dojotype"); + if(djt){ + if (djt.indexOf(":")<0){ + djt = "dojo:"+djt; + } + return djt.toLowerCase(); + } + // => dojo:type + djt = node.getAttributeNS && node.getAttributeNS(dojo.dom.dojoml,"type"); + if(djt){ + return "dojo:" + djt.toLowerCase(); + } + // => dojo:type + try{ + // FIXME: IE really really doesn't like this, so we squelch errors for it + djt = node.getAttribute("dojo:type"); + }catch(e){ + // FIXME: log? + } + if(djt){ return "dojo:"+djt.toLowerCase(); } + // => dojo:type + if((dj_global["djConfig"])&&(!djConfig["ignoreClassNames"])){ + // FIXME: should we make this optionally enabled via djConfig? + var classes = node.className||node.getAttribute("class"); + // FIXME: following line, without check for existence of classes.indexOf + // breaks firefox 1.5's svg widgets + if((classes )&&(classes.indexOf)&&(classes.indexOf("dojo-")!=-1)){ + var aclasses = classes.split(" "); + for(var x=0, c=aclasses.length; x as nodes that should be parsed. Ignore these + if(isIE && tagName.indexOf("/")==0){ return null; } + + try{ + var attr = node.getAttribute("parseWidgets"); + if(attr && attr.toLowerCase() == "false"){ + return {}; + } + }catch(e){/*continue*/} + + + // look for a dojoml qualified name + // process dojoml only when optimizeForDojoML is true + var process = true; + if(optimizeForDojoML){ + var dojoTagName = getDojoTagName(node); + tagName = dojoTagName || tagName; + process = Boolean(dojoTagName); + } + + var parsedNodeSet = {}; + parsedNodeSet[tagName] = []; + var pos = tagName.indexOf(":"); + if(pos>0){ + var ns = tagName.substring(0,pos); + parsedNodeSet["ns"] = ns; + // honor user namespace filters + if((dojo.ns)&&(!dojo.ns.allow(ns))){process=false;} + } + + if(process){ + var attributeSet = this.parseAttributes(node); + for(var attr in attributeSet){ + if((!parsedNodeSet[tagName][attr])||(typeof parsedNodeSet[tagName][attr] != "array")){ + parsedNodeSet[tagName][attr] = []; + } + parsedNodeSet[tagName][attr].push(attributeSet[attr]); + } + // FIXME: we might want to make this optional or provide cloning instead of + // referencing, but for now, we include a node reference to allow + // instantiated components to figure out their "roots" + parsedNodeSet[tagName].nodeRef = node; + parsedNodeSet.tagName = tagName; + parsedNodeSet.index = thisIdx||0; + } + + var count = 0; + for(var i = 0; i < node.childNodes.length; i++){ + var tcn = node.childNodes.item(i); + switch(tcn.nodeType){ + case dojo.dom.ELEMENT_NODE: // element nodes, call this function recursively + var ctn = getDojoTagName(tcn) || getTagName(tcn); + if(!parsedNodeSet[ctn]){ + parsedNodeSet[ctn] = []; + } + parsedNodeSet[ctn].push(this.parseElement(tcn, true, optimizeForDojoML, count)); + if( (tcn.childNodes.length == 1)&& + (tcn.childNodes.item(0).nodeType == dojo.dom.TEXT_NODE)){ + parsedNodeSet[ctn][parsedNodeSet[ctn].length-1].value = tcn.childNodes.item(0).nodeValue; + } + count++; + break; + case dojo.dom.TEXT_NODE: // if a single text node is the child, treat it as an attribute + if(node.childNodes.length == 1){ + parsedNodeSet[tagName].push({ value: node.childNodes.item(0).nodeValue }); + } + break; + default: break; + /* + case dojo.dom.ATTRIBUTE_NODE: // attribute node... not meaningful here + break; + case dojo.dom.CDATA_SECTION_NODE: // cdata section... not sure if this would ever be meaningful... might be... + break; + case dojo.dom.ENTITY_REFERENCE_NODE: // entity reference node... not meaningful here + break; + case dojo.dom.ENTITY_NODE: // entity node... not sure if this would ever be meaningful + break; + case dojo.dom.PROCESSING_INSTRUCTION_NODE: // processing instruction node... not meaningful here + break; + case dojo.dom.COMMENT_NODE: // comment node... not not sure if this would ever be meaningful + break; + case dojo.dom.DOCUMENT_NODE: // document node... not sure if this would ever be meaningful + break; + case dojo.dom.DOCUMENT_TYPE_NODE: // document type node... not meaningful here + break; + case dojo.dom.DOCUMENT_FRAGMENT_NODE: // document fragment node... not meaningful here + break; + case dojo.dom.NOTATION_NODE:// notation node... not meaningful here + break; + */ + } + } + //return (hasParentNodeSet) ? parsedNodeSet[node.tagName] : parsedNodeSet; + //if(parsedNodeSet.tagName)dojo.debug("parseElement: RETURNING NODE WITH TAGNAME "+parsedNodeSet.tagName); + return parsedNodeSet; + }; + + + /* parses a set of attributes on a node into an object tree */ + this.parseAttributes = function(/*DomNode*/node){ + // summary: + // creates an attribute object that maps attribute values for the + // passed node. Note that this is similar to creating a JSON + // representation of a DOM node. + // usage: + // a node with the following serialization: + //
    ...
    + // would yeild the following return structure when passed into this + // function: + // { + // "foo": { + // "value": "bar" + // }, + // "baz": { + // "value": "thud" + // } + // } + // + var parsedAttributeSet = {}; + var atts = node.attributes; + // TODO: should we allow for duplicate attributes at this point... + // would any of the relevant dom implementations even allow this? + var attnode, i=0; + while((attnode=atts[i++])){ + if(isIE){ + if(!attnode){ continue; } + if((typeof attnode == "object")&& + (typeof attnode.nodeValue == 'undefined')|| + (attnode.nodeValue == null)|| + (attnode.nodeValue == '')){ + continue; + } + } + + var nn = attnode.nodeName.split(":"); + nn = (nn.length == 2) ? nn[1] : attnode.nodeName; + + parsedAttributeSet[nn] = { + value: attnode.nodeValue + }; + } + return parsedAttributeSet; + }; +}; + +dojo.provide("dojo.lang.declare"); + + + + +dojo.lang.declare = function( /*String*/ className, + /*Function|Array*/ superclass, + /*Function?*/ init, + /*Object|Array*/ props){ + /* + * summary: Create a feature-rich constructor with a compact notation + * className: the name of the constructor (loosely, a "class") + * superclass: + * may be a Function, or an Array of Functions. If "superclass" is an + * array, the first element is used as the prototypical ancestor and + * any following Functions become mixin ancestors. + * init: an initializer function + * props: + * an object (or array of objects) whose properties are copied to the + * created prototype + * description: + * Create a constructor using a compact notation for inheritance and + * prototype extension. "superclass" argument may be a Function, or an + * array of Functions. + * + * If "superclass" is an array, the first element is used as the + * prototypical ancestor and any following Functions become mixin + * ancestors. + * + * All "superclass(es)" must be Functions (not mere Objects). + * + * Using mixin ancestors provides a type of multiple inheritance. + * Mixin ancestors prototypical properties are copied to the subclass, + * and any inializater/constructor is invoked. + * + * Properties of object "props" are copied to the constructor + * prototype. If "props" is an array, properties of each object in the + * array are copied to the constructor prototype. + * + * name of the class ("className" argument) is stored in + * "declaredClass" property + * + * Initializer functions are called when an object is instantiated + * from this constructor. + * + * Aliased as "dojo.declare" + * + * Usage: + * + * dojo.declare("my.classes.bar", my.classes.foo, + * function(){ + * // initialization function + * this.myComplicatedObject = new ReallyComplicatedObject(); + * }, + * { // properties to be added to the class prototype + * someValue: 2, + * someMethod: function(){ + * doStuff(); + * } + * } + * ); + * + */ + if((dojo.lang.isFunction(props))||((!props)&&(!dojo.lang.isFunction(init)))){ + // parameter juggling to support omitting init param (also allows + // reordering init and props arguments) + var temp = props; + props = init; + init = temp; + } + var mixins = [ ]; + if(dojo.lang.isArray(superclass)){ + mixins = superclass; + superclass = mixins.shift(); + } + if(!init){ + init = dojo.evalObjPath(className, false); + if((init)&&(!dojo.lang.isFunction(init))){ init = null }; + } + var ctor = dojo.lang.declare._makeConstructor(); + var scp = (superclass ? superclass.prototype : null); + if(scp){ + scp.prototyping = true; + ctor.prototype = new superclass(); + scp.prototyping = false; + } + ctor.superclass = scp; + ctor.mixins = mixins; + for(var i=0,l=mixins.length; i by convention + if(!dojo.hostenv.moduleHasPrefix(name)){ + dojo.registerModulePath(name, "../" + name); + } + req([name, 'manifest'].join('.'), false, true); + } + if(!this.namespaces[name]){ + this.failed[name] = true; //only look for a namespace once + } + }finally{ + this.loading[name]=false; + } + return this.namespaces[name]; // Ns + } +} + +dojo.ns.Ns = function(/*String*/name, /*String*/module, /*Function?*/resolver){ + // summary: this object simply encapsulates namespace data + this.name = name; + this.module = module; + this.resolver = resolver; + this._loaded = [ ]; + this._failed = [ ]; +} + +dojo.ns.Ns.prototype.resolve = function(/*String*/name, /*String*/domain, /*Boolean?*/omitModuleCheck){ + //summary: map component with 'name' and 'domain' to a module via namespace resolver, if specified + if(!this.resolver || djConfig["skipAutoRequire"]){return false;} // Boolean + var fullName = this.resolver(name, domain); + //only load a widget once. This is a quicker check than dojo.require does + if((fullName)&&(!this._loaded[fullName])&&(!this._failed[fullName])){ + //workaround so we don't break the build system + var req = dojo.require; + req(fullName, false, true); //omit the module check, we'll do it ourselves. + if(dojo.hostenv.findModule(fullName, false)){ + this._loaded[fullName] = true; + }else{ + if(!omitModuleCheck){dojo.raise("dojo.ns.Ns.resolve: module '" + fullName + "' not found after loading via namespace '" + this.name + "'");} + this._failed[fullName] = true; + } + } + return Boolean(this._loaded[fullName]); // Boolean +} + +dojo.registerNamespace = function(/*String*/name, /*String*/module, /*Function?*/resolver){ + // summary: maps a module name to a namespace for widgets, and optionally maps widget names to modules for auto-loading + // description: An unregistered namespace is mapped to an eponymous module. + // For example, namespace acme is mapped to module acme, and widgets are + // assumed to belong to acme.widget. If you want to use a different widget + // module, use dojo.registerNamespace. + dojo.ns.register.apply(dojo.ns, arguments); +} + +dojo.registerNamespaceResolver = function(/*String*/name, /*Function*/resolver){ + // summary: a resolver function maps widget names to modules, so the + // widget manager can auto-load needed widget implementations + // + // description: The resolver provides information to allow Dojo + // to load widget modules on demand. When a widget is created, + // a namespace resolver can tell Dojo what module to require + // to ensure that the widget implementation code is loaded. + // + // name: will always be lower-case. + // + // example: + // dojo.registerNamespaceResolver("acme", + // function(name){ + // return "acme.widget."+dojo.string.capitalize(name); + // } + // ); + var n = dojo.ns.namespaces[name]; + if(n){ + n.resolver = resolver; + } +} + +dojo.registerNamespaceManifest = function(/*String*/module, /*String*/path, /*String*/name, /*String*/widgetModule, /*Function?*/resolver){ + // summary: convenience function to register a module path, a namespace, and optionally a resolver all at once. + dojo.registerModulePath(name, path); + dojo.registerNamespace(name, widgetModule, resolver); +} + +// NOTE: rather put this in dojo.widget.Widget, but that fubars debugAtAllCosts +dojo.registerNamespace("dojo", "dojo.widget"); + +dojo.provide("dojo.widget.Manager"); + + + + +// summary +// Manager class for the widgets. +// This is an internal class used by dojo; users shouldn't call this class directly. +dojo.widget.manager = new function(){ + this.widgets = []; + this.widgetIds = []; + + // map of widgetId-->widget for widgets without parents (top level widgets) + this.topWidgets = {}; + + var widgetTypeCtr = {}; + var renderPrefixCache = []; + + this.getUniqueId = function (widgetType) { + var widgetId; + do{ + widgetId = widgetType + "_" + (widgetTypeCtr[widgetType] != undefined ? + ++widgetTypeCtr[widgetType] : widgetTypeCtr[widgetType] = 0); + }while(this.getWidgetById(widgetId)); + return widgetId; + } + + this.add = function(widget){ + //dojo.profile.start("dojo.widget.manager.add"); + this.widgets.push(widget); + // Opera9 uses ID (caps) + if(!widget.extraArgs["id"]){ + widget.extraArgs["id"] = widget.extraArgs["ID"]; + } + // FIXME: the rest of this method is very slow! + if(widget.widgetId == ""){ + if(widget["id"]){ + widget.widgetId = widget["id"]; + }else if(widget.extraArgs["id"]){ + widget.widgetId = widget.extraArgs["id"]; + }else{ + widget.widgetId = this.getUniqueId(widget.ns+'_'+widget.widgetType); + } + } + if(this.widgetIds[widget.widgetId]){ + dojo.debug("widget ID collision on ID: "+widget.widgetId); + } + this.widgetIds[widget.widgetId] = widget; + // Widget.destroy already calls removeById(), so we don't need to + // connect() it here + //dojo.profile.end("dojo.widget.manager.add"); + } + + this.destroyAll = function(){ + for(var x=this.widgets.length-1; x>=0; x--){ + try{ + // this.widgets[x].destroyChildren(); + this.widgets[x].destroy(true); + delete this.widgets[x]; + }catch(e){ } + } + } + + // FIXME: we should never allow removal of the root widget until all others + // are removed! + this.remove = function(widgetIndex){ + if(dojo.lang.isNumber(widgetIndex)){ + var tw = this.widgets[widgetIndex].widgetId; + delete this.topWidgets[tw]; + delete this.widgetIds[tw]; + this.widgets.splice(widgetIndex, 1); + }else{ + this.removeById(widgetIndex); + } + } + + // FIXME: suboptimal performance + this.removeById = function(id) { + if(!dojo.lang.isString(id)){ + id = id["widgetId"]; + if(!id){ dojo.debug("invalid widget or id passed to removeById"); return; } + } + for (var i=0; i.widget by convention + dojo.ns.register(ns, ns + '.widget'); + nsObj = dojo.ns.get(ns); + } + + // allow the namespace to resolve the widget module + if(nsObj){nsObj.resolve(widgetName);} + + // locate a widget implementation in the registered module for our current rendering environment + impl = findImplementation(lowerCaseWidgetName, nsObj.module); + if(impl){return(imps[lowerCaseWidgetName] = impl)}; + + // try to load a manifest to resolve this implemenation + nsObj = dojo.ns.require(ns); + if((nsObj)&&(nsObj.resolver)){ + nsObj.resolve(widgetName); + impl = findImplementation(lowerCaseWidgetName, nsObj.module); + if(impl){return(imps[lowerCaseWidgetName] = impl)}; + } + + // this is an error condition under new rules + dojo.deprecated('dojo.widget.Manager.getImplementationName', + 'Could not locate widget implementation for "' + widgetName + '" in "' + nsObj.module + '" registered to namespace "' + nsObj.name + '". ' + + "Developers must specify correct namespaces for all non-Dojo widgets", "0.5"); + + // backward compat: if the user has not specified any namespace and their widget is not in dojo.widget.* + // search registered widget packages [sic] + // note: registerWidgetPackage itself is now deprecated + for(var i=0; i 0) { + return widgets[n]; + } + return widgets; + } + g("registerWidgetPackage"); + g("getImplementation", "getWidgetImplementation"); + g("getImplementationName", "getWidgetImplementationName"); + + dw.widgets = dwm.widgets; + dw.widgetIds = dwm.widgetIds; + dw.root = dwm.root; +})(); + +dojo.kwCompoundRequire({ + common: [["dojo.uri.Uri", false, false]] +}); +dojo.provide("dojo.uri.*"); + +dojo.provide("dojo.a11y"); + + + + +dojo.a11y = { + // imgPath: String path to the test image for determining if images are displayed or not + // doAccessibleCheck: Boolean if true will perform check for need to create accessible widgets + // accessible: Boolean uninitialized when null (accessible check has not been performed) + // if true generate accessible widgets + imgPath:dojo.uri.moduleUri("dojo.widget", "templates/images"), + doAccessibleCheck: true, + accessible: null, + + checkAccessible: function(){ + // summary: + // perform check for accessibility if accessibility checking is turned + // on and the accessibility test has not been performed yet + if(this.accessible === null){ + this.accessible = false; //default + if(this.doAccessibleCheck == true){ + this.accessible = this.testAccessible(); + } + } + return this.accessible; /* Boolean */ + }, + + testAccessible: function(){ + // summary: + // Always perform the accessibility check to determine if high + // contrast mode is on or display of images are turned off. Currently only checks + // in IE and Mozilla. + this.accessible = false; //default + if (dojo.render.html.ie || dojo.render.html.mozilla){ + var div = document.createElement("div"); + //div.style.color="rgb(153,204,204)"; + div.style.backgroundImage = "url(\"" + this.imgPath + "/tab_close.gif\")"; + // must add to hierarchy before can view currentStyle below + dojo.body().appendChild(div); + // in FF and IE the value for the current background style of the added div + // will be "none" in high contrast mode + // in FF the return value will be url(invalid-url:) when running over http + var bkImg = null; + if (window.getComputedStyle ) { + var cStyle = getComputedStyle(div, ""); + bkImg = cStyle.getPropertyValue("background-image"); + }else{ + bkImg = div.currentStyle.backgroundImage; + } + var bUseImgElem = false; + if (bkImg != null && (bkImg == "none" || bkImg == "url(invalid-url:)" )) { + this.accessible = true; + } + /* + if(this.accessible == false && document.images){ + // test if images are off in IE + var testImg = new Image(); + if(testImg.fileSize) { + testImg.src = this.imgPath + "/tab_close.gif"; + if(testImg.fileSize < 0){ + this.accessible = true; + } + } + }*/ + dojo.body().removeChild(div); + } + return this.accessible; /* Boolean */ + }, + + setCheckAccessible: function(/* Boolean */ bTest){ + // summary: + // Set whether or not to check for accessibility mode. Default value + // of module is true - perform check for accessibility modes. + // bTest: Boolean - true to check; false to turn off checking + this.doAccessibleCheck = bTest; + }, + + setAccessibleMode: function(){ + // summary: + // perform the accessibility check and sets the correct mode to load + // a11y widgets. Only runs if test for accessiiblity has not been performed yet. + // Call testAccessible() to force the test. + if (this.accessible === null){ + if (this.checkAccessible()){ + dojo.render.html.prefixes.unshift("a11y"); + } + } + return this.accessible; /* Boolean */ + } +}; + +//dojo.hostenv.modulesLoadedListeners.unshift(function() { dojo.a11y.setAccessibleMode(); }); +//dojo.event.connect("before", dojo.hostenv, "makeWidgets", dojo.a11y, "setAccessibleMode"); + +dojo.provide("dojo.widget.Widget"); + + + + + + + + + + +dojo.declare("dojo.widget.Widget", null, + function(){ + // these properties aren't primitives and need to be created on a per-item + // basis. + + // children: Array + // a list of all of the widgets that have been added as children of + // this component. Should only have values if isContainer is true. + this.children = []; + + // extraArgs: Object + // a map of properties which the widget system tried to assign from + // user input but did not correspond to any of the properties set on + // the class prototype. These names will also be available in all + // lower-case form in this map + this.extraArgs = {}; + }, +{ + // parent: Widget + // the parent of this widget + parent: null, + + // isTopLevel: Boolean + // should this widget eat all events that bubble up to it? + // obviously, top-level and modal widgets should set these appropriately + isTopLevel: false, + + // disabled: Boolean + // should this widget respond to user input? + // in markup, this is specified as "disabled='disabled'", or just "disabled" + disabled: false, + + // isContainer: Boolean + // can this widget contain other widgets? + isContainer: false, + + // widgetId: String + // a unique, opaque ID string that can be assigned by users or by the + // system. If the developer passes an ID which is known not to be + // unique, the specified ID is ignored and the system-generated ID is + // used instead. + widgetId: "", + + // widgetType: String + // used for building generic widgets + widgetType: "Widget", + + // ns: String + // defaults to 'dojo'. "namespace" is a reserved word in JavaScript, so we abbreviate + ns: "dojo", + + getNamespacedType: function(){ + // summary: + // get the "full" name of the widget. If the widget comes from the + // "dojo" namespace and is a Button, calling this method will + // return "dojo:button", all lower-case + return (this.ns ? this.ns + ":" + this.widgetType : this.widgetType).toLowerCase(); // String + }, + + toString: function(){ + // summary: + // returns a string that represents the widget. When a widget is + // cast to a string, this method will be used to generate the + // output. Currently, it does not implement any sort of reversable + // serialization. + return '[Widget ' + this.getNamespacedType() + ', ' + (this.widgetId || 'NO ID') + ']'; // String + }, + + repr: function(){ + // summary: returns the string representation of the widget. + return this.toString(); // String + }, + + enable: function(){ + // summary: + // enables the widget, usually involving unmasking inputs and + // turning on event handlers. Not implemented here. + this.disabled = false; + }, + + disable: function(){ + // summary: + // disables the widget, usually involves masking inputs and + // unsetting event handlers. Not implemented here. + this.disabled = true; + }, + + // TODO: + // 1) this would be better in HtmlWidget rather than here? + // 2) since many widgets don't care if they've been resized, maybe this should be a mixin? + onResized: function(){ + // summary: + // A signal that widgets will call when they have been resized. + // Can be connected to for determining if a layout needs to be + // reflowed. Clients should override this function to do special + // processing, then call this.notifyChildrenOfResize() to notify + // children of resize. + this.notifyChildrenOfResize(); + }, + + notifyChildrenOfResize: function(){ + // summary: dispatches resized events to all children of this widget + for(var i=0; i mixInProperties"); + //dojo.profile.start(this.widgetType + " mixInProperties"); + this.mixInProperties(args, fragment, parent); + //dojo.profile.end(this.widgetType + " mixInProperties"); + // dojo.debug(this.widgetType, "-> postMixInProperties"); + //dojo.profile.start(this.widgetType + " postMixInProperties"); + this.postMixInProperties(args, fragment, parent); + //dojo.profile.end(this.widgetType + " postMixInProperties"); + // dojo.debug(this.widgetType, "-> dojo.widget.manager.add"); + dojo.widget.manager.add(this); + // dojo.debug(this.widgetType, "-> buildRendering"); + //dojo.profile.start(this.widgetType + " buildRendering"); + this.buildRendering(args, fragment, parent); + //dojo.profile.end(this.widgetType + " buildRendering"); + // dojo.debug(this.widgetType, "-> initialize"); + //dojo.profile.start(this.widgetType + " initialize"); + this.initialize(args, fragment, parent); + //dojo.profile.end(this.widgetType + " initialize"); + // dojo.debug(this.widgetType, "-> postInitialize"); + // postinitialize includes subcomponent creation + // profile is put directly to function + this.postInitialize(args, fragment, parent); + // dojo.debug(this.widgetType, "-> postCreate"); + //dojo.profile.start(this.widgetType + " postCreate"); + this.postCreate(args, fragment, parent); + //dojo.profile.end(this.widgetType + " postCreate"); + // dojo.debug(this.widgetType, "done!"); + + //dojo.profile.end(this.widgetType + " create"); + + return this; + }, + + destroy: function(finalize){ + // summary: + // Destroy this widget and it's descendants. This is the generic + // "destructor" function that all widget users should call to + // clealy discard with a widget. Once a widget is destroyed, it's + // removed from the manager object. + // finalize: Boolean + // is this function being called part of global environment + // tear-down? + + // FIXME: this is woefully incomplete + if(this.parent){ + this.parent.removeChild(this); + } + this.destroyChildren(); + this.uninitialize(); + this.destroyRendering(finalize); + dojo.widget.manager.removeById(this.widgetId); + }, + + destroyChildren: function(){ + // summary: + // Recursively destroy the children of this widget and their + // descendents. + var widget; + var i=0; + while(this.children.length > i){ + widget = this.children[i]; + if (widget instanceof dojo.widget.Widget) { // find first widget + this.removeChild(widget); + widget.destroy(); + continue; + } + + i++; // skip data object + } + + }, + + getChildrenOfType: function(/*String*/type, recurse){ + // summary: + // return an array of descendant widgets who match the passed type + // recurse: Boolean + // should we try to get all descendants that match? Defaults to + // false. + var ret = []; + var isFunc = dojo.lang.isFunction(type); + if(!isFunc){ + type = type.toLowerCase(); + } + for(var x=0; xsi)){ + this[x][pairs[y].substr(0, si).replace(/^\s+|\s+$/g, "")] = pairs[y].substr(si+1); + } + } + } + }else{ + // the default is straight-up string assignment. When would + // we ever hit this? + this[x] = args[x]; + } + } + }else{ + // collect any extra 'non mixed in' args + this.extraArgs[x.toLowerCase()] = args[x]; + } + } + // dojo.profile.end("mixInProperties"); + }, + + postMixInProperties: function(/*Object*/args, /*Object*/frag, /*Widget*/parent){ + // summary + // Called after the parameters to the widget have been read-in, + // but before the widget template is instantiated. + // Especially useful to set properties that are referenced in the widget template. + }, + + initialize: function(/*Object*/args, /*Object*/frag, /*Widget*/parent){ + // summary: stub function. + return false; + // dojo.unimplemented("dojo.widget.Widget.initialize"); + }, + + postInitialize: function(/*Object*/args, /*Object*/frag, /*Widget*/parent){ + // summary: stub function. + return false; + }, + + postCreate: function(/*Object*/args, /*Object*/frag, /*Widget*/parent){ + // summary: stub function. + return false; + }, + + uninitialize: function(){ + // summary: + // stub function. Over-ride to implement custom widget tear-down + // behavior. + return false; + }, + + buildRendering: function(/*Object*/args, /*Object*/frag, /*Widget*/parent){ + // summary: stub function. SUBCLASSES MUST IMPLEMENT + dojo.unimplemented("dojo.widget.Widget.buildRendering, on "+this.toString()+", "); + return false; + }, + + destroyRendering: function(){ + // summary: stub function. SUBCLASSES MUST IMPLEMENT + dojo.unimplemented("dojo.widget.Widget.destroyRendering"); + return false; + }, + + addedTo: function(parent){ + // summary: + // stub function this is just a signal that can be caught + // parent: Widget + // instance of dojo.widget.Widget that we were added to + }, + + addChild: function(child){ + // summary: stub function. SUBCLASSES MUST IMPLEMENT + dojo.unimplemented("dojo.widget.Widget.addChild"); + return false; + }, + + // Detach the given child widget from me, but don't destroy it + removeChild: function(/*Widget*/widget){ + // summary: + // removes the passed widget instance from this widget but does + // not destroy it + for(var x=0; x +dojo.widget.tags["dojo:connect"] = function(fragment, widgetParser, parentComp){ + var properties = widgetParser.parseProperties(fragment["dojo:connect"]); +} + +// FIXME: if we know the insertion point (to a reasonable location), why then do we: +// - create a template node +// - clone the template node +// - render the clone and set properties +// - remove the clone from the render tree +// - place the clone +// this is quite dumb +dojo.widget.buildWidgetFromParseTree = function(/*String*/ type, + /*Object*/ frag, + /*dojo.widget.Parse*/ parser, + /*Widget, optional*/ parentComp, + /*int, optional*/ insertionIndex, + /*Object*/ localProps){ + + // summary: creates a tree of widgets from the data structure produced by the first-pass parser (frag) + + // test for accessibility mode + dojo.a11y.setAccessibleMode(); + //dojo.profile.start("buildWidgetFromParseTree"); + // FIXME: for codepath from createComponentFromScript, we are now splitting a path + // that we already split and then joined + var stype = type.split(":"); + stype = (stype.length == 2) ? stype[1] : type; + + // FIXME: we don't seem to be doing anything with this! + // var propertySets = parser.getPropertySets(frag); + var localProperties = localProps || parser.parseProperties(frag[frag["ns"]+":"+stype]); + var twidget = dojo.widget.manager.getImplementation(stype,null,null,frag["ns"]); + if(!twidget){ + throw new Error('cannot find "' + type + '" widget'); + }else if (!twidget.create){ + throw new Error('"' + type + '" widget object has no "create" method and does not appear to implement *Widget'); + } + localProperties["dojoinsertionindex"] = insertionIndex; + // FIXME: we lose no less than 5ms in construction! + var ret = twidget.create(localProperties, frag, parentComp, frag["ns"]); + // dojo.profile.end("buildWidgetFromParseTree"); + return ret; +} + +dojo.widget.defineWidget = function(widgetClass, renderer, superclasses, init, props){ + // summary: Create a widget constructor function (aka widgetClass) + // widgetClass: String + // the location in the object hierarchy to place the new widget class constructor + // renderer: String + // usually "html", determines when this delcaration will be used + // superclasses: Function||Function[] + // can be either a single function or an array of functions to be + // mixed in as superclasses. If an array, only the first will be used + // to set prototype inheritance. + // init: Function + // an optional constructor function. Will be called after superclasses are mixed in. + // props: Object + // a map of properties and functions to extend the class prototype with + + // This meta-function does parameter juggling for backward compat and overloading + // if 4th argument is a string, we are using the old syntax + // old sig: widgetClass, superclasses, props (object), renderer (string), init (function) + if(dojo.lang.isString(arguments[3])){ + dojo.widget._defineWidget(arguments[0], arguments[3], arguments[1], arguments[4], arguments[2]); + }else{ + // widgetClass + var args = [ arguments[0] ], p = 3; + if(dojo.lang.isString(arguments[1])){ + // renderer, superclass + args.push(arguments[1], arguments[2]); + }else{ + // superclass + args.push('', arguments[1]); + p = 2; + } + if(dojo.lang.isFunction(arguments[p])){ + // init (function), props (object) + args.push(arguments[p], arguments[p+1]); + }else{ + // props (object) + args.push(null, arguments[p]); + } + dojo.widget._defineWidget.apply(this, args); + } +} + +dojo.widget.defineWidget.renderers = "html|svg|vml"; + +dojo.widget._defineWidget = function(widgetClass /*string*/, renderer /*string*/, superclasses /*function||array*/, init /*function*/, props /*object*/){ + // FIXME: uncomment next line to test parameter juggling ... remove when confidence improves + // dojo.debug('(c:)' + widgetClass + '\n\n(r:)' + renderer + '\n\n(i:)' + init + '\n\n(p:)' + props); + // widgetClass takes the form foo.bar.baz<.renderer>.WidgetName (e.g. foo.bar.baz.WidgetName or foo.bar.baz.html.WidgetName) + var module = widgetClass.split("."); + var type = module.pop(); // type <= WidgetName, module <= foo.bar.baz<.renderer> + var regx = "\\.(" + (renderer ? renderer + '|' : '') + dojo.widget.defineWidget.renderers + ")\\."; + var r = widgetClass.search(new RegExp(regx)); + module = (r < 0 ? module.join(".") : widgetClass.substr(0, r)); + + // deprecated in favor of namespace system, remove for 0.5 + dojo.widget.manager.registerWidgetPackage(module); + + var pos = module.indexOf("."); + var nsName = (pos > -1) ? module.substring(0,pos) : module; + + // FIXME: hrm, this might make things simpler + //dojo.widget.tags.addParseTreeHandler(nsName+":"+type.toLowerCase()); + + props=(props)||{}; + props.widgetType = type; + if((!init)&&(props["classConstructor"])){ + init = props.classConstructor; + delete props.classConstructor; + } + dojo.declare(widgetClass, superclasses, init, props); +} + +dojo.provide("dojo.widget.Parse"); + + + +// +// dojoML parser should be moved out of 'widget', codifying the difference between a 'component' +// and a 'widget'. A 'component' being anything that can be generated from a tag. +// +// a particular dojoML tag would be handled by a registered tagHandler with a hook for a default handler +// if the widget system is loaded, a widget builder would be attach itself as the default handler +// +// widget tags are no longer registered themselves: +// they are now arbitrarily namespaced, so we cannot register them all, and the non-prefixed portions +// are no longer guaranteed unique +// +// therefore dojo.widget.tags should go with this parser code out of the widget module +// + +dojo.widget.Parse = function(/*Object*/fragment){ + this.propertySetsList = []; + this.fragment = fragment; + + this.createComponents = function(/*Object*/frag, /*Object*/parentComp){ + var comps = []; + var built = false; + // if we have items to parse/create at this level, do it! + try{ + if(frag && frag.tagName && (frag != frag.nodeRef)){ + + // these are in fact, not ever for widgets per-se anymore, + // but for other markup elements (aka components) + var djTags = dojo.widget.tags; + + // we split so that you can declare multiple + // non-destructive components from the same ctor node + var tna = String(frag.tagName).split(";"); + for(var x=0; x -1) ? name.substring(0,pos) : "dojo"; + if(pos > -1){ name = name.substring(pos+1); } + var lowerCaseName = name.toLowerCase(); + var namespacedName = ns + ":" + lowerCaseName; + isNode = (dojo.byId(name) && !dojo.widget.tags[namespacedName]); + } + + if((arguments.length == 1) && (isNode || !isNameStr)){ + // we got a DOM node + var xp = new dojo.xml.Parse(); + // FIXME: we should try to find the parent! + var tn = isNode ? dojo.byId(name) : name; + return dojo.widget.getParser().createComponents(xp.parseElement(tn, null, true))[0]; + } + + function fromScript(placeKeeperNode, name, props, ns){ + props[namespacedName] = { + dojotype: [{value: lowerCaseName}], + nodeRef: placeKeeperNode, + fastMixIn: true + }; + props.ns = ns; + return dojo.widget.getParser().createComponentFromScript(placeKeeperNode, name, props, ns); + } + + props = props||{}; + var notRef = false; + var tn = null; + var h = dojo.render.html.capable; + if(h){ + tn = document.createElement("span"); + } + if(!refNode){ + notRef = true; + refNode = tn; + if(h){ + dojo.body().appendChild(refNode); + } + }else if(position){ + dojo.dom.insertAtPosition(tn, refNode, position); + }else{ // otherwise don't replace, but build in-place + tn = refNode; + } + var widgetArray = fromScript(tn, name.toLowerCase(), props, ns); + if( (!widgetArray)||(!widgetArray[0])|| + (typeof widgetArray[0].widgetType == "undefined") ){ + throw new Error("createWidget: Creation of \"" + name + "\" widget failed."); + } + try{ + if(notRef && widgetArray[0].domNode.parentNode){ + widgetArray[0].domNode.parentNode.removeChild(widgetArray[0].domNode); + } + }catch(e){ + /* squelch for Safari */ + dojo.debug(e); + } + return widgetArray[0]; // Widget +} + +dojo.provide("dojo.widget.DomWidget"); + + + + + + + + + + +dojo.widget._cssFiles = {}; +dojo.widget._cssStrings = {}; +dojo.widget._templateCache = {}; + +dojo.widget.defaultStrings = { + // summary: a mapping of strings that are used in template variable replacement + dojoRoot: dojo.hostenv.getBaseScriptUri(), + dojoWidgetModuleUri: dojo.uri.moduleUri("dojo.widget"), + baseScriptUri: dojo.hostenv.getBaseScriptUri() +}; + +dojo.widget.fillFromTemplateCache = function(obj, templatePath, templateString, avoidCache){ + // summary: + // static method to build from a template w/ or w/o a real widget in + // place + // obj: DomWidget + // an instance of dojo.widget.DomWidget to initialize the template for + // templatePath: String + // the URL to get the template from. dojo.uri.Uri is often passed as well. + // templateString: String? + // a string to use in lieu of fetching the template from a URL + // avoidCache: Boolean? + // should the template system not use whatever is in the cache and + // always use the passed templatePath or templateString? + + // dojo.debug("avoidCache:", avoidCache); + var tpath = templatePath || obj.templatePath; + + var tmplts = dojo.widget._templateCache; + if(!tpath && !obj["widgetType"]) { // don't have a real template here + do { + var dummyName = "__dummyTemplate__" + dojo.widget._templateCache.dummyCount++; + } while(tmplts[dummyName]); + obj.widgetType = dummyName; + } + var wt = tpath?tpath.toString():obj.widgetType; + + var ts = tmplts[wt]; + if(!ts){ + tmplts[wt] = {"string": null, "node": null}; + if(avoidCache){ + ts = {}; + }else{ + ts = tmplts[wt]; + } + } + + if((!obj.templateString)&&(!avoidCache)){ + obj.templateString = templateString || ts["string"]; + } + if(obj.templateString){ + obj.templateString = this._sanitizeTemplateString(obj.templateString); + } + + if((!obj.templateNode)&&(!avoidCache)){ + obj.templateNode = ts["node"]; + } + if((!obj.templateNode)&&(!obj.templateString)&&(tpath)){ + // fetch a text fragment and assign it to templateString + // NOTE: we rely on blocking IO here! + var tstring = this._sanitizeTemplateString(dojo.hostenv.getText(tpath)); + + obj.templateString = tstring; + if(!avoidCache){ + tmplts[wt]["string"] = tstring; + } + } + if((!ts["string"])&&(!avoidCache)){ + ts.string = obj.templateString; + } +} + +dojo.widget._sanitizeTemplateString = function(/*String*/tString){ + //summary: Strips declarations so that external SVG and XML + //documents can be added to a document without worry. Also, if the string + //is an HTML document, only the part inside the body tag is returned. + if(tString){ + tString = tString.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im, ""); + var matches = tString.match(/]*>\s*([\s\S]+)\s*<\/body>/im); + if(matches){ + tString = matches[1]; + } + }else{ + tString = ""; + } + return tString; //String +} + +dojo.widget._templateCache.dummyCount = 0; + +// Array: list of properties to search for node-to-property mappings +dojo.widget.attachProperties = ["dojoAttachPoint", "id"]; + +// String: name of the property to use for mapping DOM events to widget functions +dojo.widget.eventAttachProperty = "dojoAttachEvent"; + +// String: property name of code to evaluate when the widget is constructed +dojo.widget.onBuildProperty = "dojoOnBuild"; + +// Array: possible accessibility values to set on widget elements - role or state +dojo.widget.waiNames = ["waiRole", "waiState"]; + +dojo.widget.wai = { + // summary: Contains functions to set accessibility roles and states + // onto widget elements + waiRole: { + // name: String: + // information for mapping accessibility role + name: "waiRole", + // namespace: String: + // URI of the namespace for the set of roles + "namespace": "http://www.w3.org/TR/xhtml2", + // alias: String: + // The alias to assign the namespace + alias: "x2", + // prefix: String: + // The prefix to assign to the role value + prefix: "wairole:" + }, + waiState: { + // name: String: + // information for mapping accessibility state + name: "waiState", + // namespace: String: + // URI of the namespace for the set of states + "namespace": "http://www.w3.org/2005/07/aaa", + // alias: String: + // The alias to assign the namespace + alias: "aaa", + // prefix: String: + // empty string - state value does not require prefix + prefix: "" + }, + setAttr: function(/*DomNode*/node, /*String*/ ns, /*String*/ attr, /*String|Boolean*/value){ + // summary: Use appropriate API to set the role or state attribute onto the element. + // description: In IE use the generic setAttribute() api. Append a namespace + // alias to the attribute name and appropriate prefix to the value. + // Otherwise, use the setAttribueNS api to set the namespaced attribute. Also + // add the appropriate prefix to the attribute value. + if(dojo.render.html.ie){ + node.setAttribute(this[ns].alias+":"+ attr, this[ns].prefix+value); + }else{ + node.setAttributeNS(this[ns]["namespace"], attr, this[ns].prefix+value); + } + }, + + getAttr: function(/*DomNode*/ node, /*String*/ ns, /*String|Boolena*/ attr){ + // Summary: Use the appropriate API to retrieve the role or state value + // Description: In IE use the generic getAttribute() api. An alias value + // was added to the attribute name to simulate a namespace when the attribute + // was set. Otherwise use the getAttributeNS() api to retrieve the state value + if(dojo.render.html.ie){ + return node.getAttribute(this[ns].alias+":"+attr); + }else{ + return node.getAttributeNS(this[ns]["namespace"], attr); + } + }, + removeAttr: function(/*DomNode*/ node, /*String*/ ns, /*String|Boolena*/ attr){ + // summary: Use the appropriate API to remove the role or state value + // description: In IE use the generic removeAttribute() api. An alias value + // was added to the attribute name to simulate a namespace when the attribute + // was set. Otherwise use the removeAttributeNS() api to remove the state value + var success = true; //only IE returns a value + if(dojo.render.html.ie){ + success = node.removeAttribute(this[ns].alias+":"+attr); + }else{ + node.removeAttributeNS(this[ns]["namespace"], attr); + } + return success; + } +}; + +dojo.widget.attachTemplateNodes = function(rootNode, /*Widget*/ targetObj, events ){ + // summary: + // map widget properties and functions to the handlers specified in + // the dom node and it's descendants. This function iterates over all + // nodes and looks for these properties: + // * dojoAttachPoint + // * dojoAttachEvent + // * waiRole + // * waiState + // * any "dojoOn*" proprties passed in the events array + // rootNode: DomNode + // the node to search for properties. All children will be searched. + // events: Array + // a list of properties generated from getDojoEventsFromStr. + + // FIXME: this method is still taking WAAAY too long. We need ways of optimizing: + // a.) what we are looking for on each node + // b.) the nodes that are subject to interrogation (use xpath instead?) + // c.) how expensive event assignment is (less eval(), more connect()) + // var start = new Date(); + var elementNodeType = dojo.dom.ELEMENT_NODE; + + function trim(str){ + return str.replace(/^\s+|\s+$/g, ""); + } + + if(!rootNode){ + rootNode = targetObj.domNode; + } + + if(rootNode.nodeType != elementNodeType){ + return; + } + // alert(events.length); + + var nodes = rootNode.all || rootNode.getElementsByTagName("*"); + var _this = targetObj; + for(var x=-1; x= 0){ + // oh, if only JS had tuple assignment + var funcNameArr = tevt.split(":"); + tevt = trim(funcNameArr[0]); + thisFunc = trim(funcNameArr[1]); + } + if(!thisFunc){ + thisFunc = tevt; + } + + var tf = function(){ + var ntf = new String(thisFunc); + return function(evt){ + if(_this[ntf]){ + _this[ntf](dojo.event.browser.fixEvent(evt, this)); + } + }; + }(); + dojo.event.browser.addListener(baseNode, tevt, tf, false, true); + // dojo.event.browser.addListener(baseNode, tevt, dojo.lang.hitch(_this, thisFunc)); + } + } + + for(var y=0; y=0){ + funcs = dojo.lang.map(thisFunc.split(";"), trim); + } + for(var z=0; z0)&&(typeof arguments[0] == "object")){ + this.create(arguments[0]); + } + }, + { + // templateNode: DomNode + // a node that represents the widget template. Pre-empts both templateString and templatePath. + templateNode: null, + + // templateString String: + // a string that represents the widget template. Pre-empts the + // templatePath. In builds that have their strings "interned", the + // templatePath is converted to an inline templateString, thereby + // preventing a synchronous network call. + templateString: null, + + // templateCssString String: + // a string that represents the CSS for the widgettemplate. + // Pre-empts the templateCssPath. In builds that have their + // strings "interned", the templateCssPath is converted to an + // inline templateCssString, thereby preventing a synchronous + // network call. + templateCssString: null, + + // preventClobber Boolean: + // should the widget not replace the node from which it was + // constructed? Widgets that apply behaviors to pre-existing parts + // of a page can be implemented easily by setting this to "true". + // In these cases, the domNode property will point to the node + // which the widget was created from. + preventClobber: false, + + // domNode DomNode: + // this is our visible representation of the widget! Other DOM + // Nodes may by assigned to other properties, usually through the + // template system's dojoAttachPonit syntax, but the domNode + // property is the canonical "top level" node in widget UI. + domNode: null, + + // containerNode DomNode: + // holds child elements. "containerNode" is generally set via a + // dojoAttachPoint assignment and it designates where widgets that + // are defined as "children" of the parent will be placed + // visually. + containerNode: null, + + // widgetsInTemplate Boolean: + // should we parse the template to find widgets that might be + // declared in markup inside it? false by default. + widgetsInTemplate: false, + + addChild: function(/*Widget*/ widget, overrideContainerNode, pos, ref, insertIndex){ + // summary: + // Process the given child widget, inserting it's dom node as + // a child of our dom node + // overrideContainerNode: DomNode? + // a non-default container node for the widget + // pos: String? + // can be one of "before", "after", "first", or "last". This + // has the same meaning as in dojo.dom.insertAtPosition() + // ref: DomNode? + // a node to place the widget relative to + // insertIndex: int? + // DOM index, same meaning as in dojo.dom.insertAtIndex() + // returns: the widget that was inserted + + // FIXME: should we support addition at an index in the children arr and + // order the display accordingly? Right now we always append. + if(!this.isContainer){ // we aren't allowed to contain other widgets, it seems + dojo.debug("dojo.widget.DomWidget.addChild() attempted on non-container widget"); + return null; + }else{ + if(insertIndex == undefined){ + insertIndex = this.children.length; + } + this.addWidgetAsDirectChild(widget, overrideContainerNode, pos, ref, insertIndex); + this.registerChild(widget, insertIndex); + } + return widget; // Widget + }, + + addWidgetAsDirectChild: function(/*Widget*/ widget, overrideContainerNode, pos, ref, insertIndex){ + // summary: + // Process the given child widget, inserting it's dom node as + // a child of our dom node + // overrideContainerNode: DomNode + // a non-default container node for the widget + // pos: String? + // can be one of "before", "after", "first", or "last". This + // has the same meaning as in dojo.dom.insertAtPosition() + // ref: DomNode? + // a node to place the widget relative to + // insertIndex: int? + // DOM index, same meaning as in dojo.dom.insertAtIndex() + if((!this.containerNode)&&(!overrideContainerNode)){ + this.containerNode = this.domNode; + } + var cn = (overrideContainerNode) ? overrideContainerNode : this.containerNode; + if(!pos){ pos = "after"; } + if(!ref){ + if(!cn){ cn = dojo.body(); } + ref = cn.lastChild; + } + if(!insertIndex) { insertIndex = 0; } + widget.domNode.setAttribute("dojoinsertionindex", insertIndex); + + // insert the child widget domNode directly underneath my domNode, in the + // specified position (by default, append to end) + if(!ref){ + cn.appendChild(widget.domNode); + }else{ + // FIXME: was this meant to be the (ugly hack) way to support insert @ index? + //dojo.dom[pos](widget.domNode, ref, insertIndex); + + // CAL: this appears to be the intended way to insert a node at a given position... + if (pos == 'insertAtIndex'){ + // dojo.debug("idx:", insertIndex, "isLast:", ref === cn.lastChild); + dojo.dom.insertAtIndex(widget.domNode, ref.parentNode, insertIndex); + }else{ + // dojo.debug("pos:", pos, "isLast:", ref === cn.lastChild); + if((pos == "after")&&(ref === cn.lastChild)){ + cn.appendChild(widget.domNode); + }else{ + dojo.dom.insertAtPosition(widget.domNode, cn, pos); + } + } + } + }, + + registerChild: function(widget, insertionIndex){ + // summary: record that given widget descends from me + // widget: Widget + // the widget that is now a child + // insertionIndex: int + // where in the children[] array to place it + + // we need to insert the child at the right point in the parent's + // 'children' array, based on the insertionIndex + + widget.dojoInsertionIndex = insertionIndex; + + var idx = -1; + for(var i=0; i node that can't be inserted back into the original DOM tree + parentComp.addWidgetAsDirectChild(this, "", "insertAtIndex", "", args["dojoinsertionindex"], sourceNodeRef); + } else if (sourceNodeRef){ + // Do in-place replacement of the my source node with my generated dom + if(this.domNode && (this.domNode !== sourceNodeRef)){ + this._sourceNodeRef = dojo.dom.replaceNode(sourceNodeRef, this.domNode); + } + } + + // Register myself with my parent, or with the widget manager if + // I have no parent + // TODO: the code below erroneously adds all programatically generated widgets + // to topWidgets (since we don't know who the parent is until after creation finishes) + if ( parentComp ) { + parentComp.registerChild(this, args.dojoinsertionindex); + } else { + dojo.widget.manager.topWidgets[this.widgetId]=this; + } + + if(this.widgetsInTemplate){ + var parser = new dojo.xml.Parse(); + + var subContainerNode; + //TODO: use xpath here? + var subnodes = this.domNode.getElementsByTagName("*"); + for(var i=0;i= 0){ + // oh, if only JS had tuple assignment + var funcNameArr = tevt.split(":"); + tevt = dojo.string.trim(funcNameArr[0]); + thisFunc = dojo.string.trim(funcNameArr[1]); + } + if(!thisFunc){ + thisFunc = tevt; + } + if(dojo.lang.isFunction(widget[tevt])){ + dojo.event.kwConnect({ + srcObj: widget, + srcFunc: tevt, + targetObj: this, + targetFunc: thisFunc + }); + }else{ + alert(tevt+" is not a function in widget "+widget); + } + } + } + + if(widget.extraArgs['dojoattachpoint']){ + //don't attach widget.domNode here, as we do not know which + //dom node we should connect to (in checkbox widget case, + //it is inputNode). So we make the widget itself available + this[widget.extraArgs['dojoattachpoint']] = widget; + } + } + } + + //dojo.profile.end(this.widgetType + " postInitialize"); + + // Expand my children widgets + /* dojoDontFollow is important for a very special case + * basically if you have a widget that you instantiate from script + * and that widget is a container, and it contains a reference to a parent + * instance, the parser will start recursively parsing until the browser + * complains. So the solution is to set an initialization property of + * dojoDontFollow: true and then it won't recurse where it shouldn't + */ + if(this.isContainer && !frag["dojoDontFollow"]){ + //alert("recurse from " + this.widgetId); + // build any sub-components with us as the parent + dojo.widget.getParser().createSubComponents(frag, this); + } + }, + + // method over-ride + buildRendering: function(/*Object*/ args, /*Object*/ frag){ + // summary: + // Construct the UI for this widget, generally from a + // template. This can be over-ridden for custom UI creation to + // to side-step the template system. This is an + // implementation of the stub function defined in + // dojo.widget.Widget. + + // DOM widgets construct themselves from a template + var ts = dojo.widget._templateCache[this.widgetType]; + + // Handle style for this widget here, as even if templatePath + // is not set, style specified by templateCssString or templateCssPath + // should be applied. templateCssString has higher priority + // than templateCssPath + if(args["templatecsspath"]){ + args["templateCssPath"] = args["templatecsspath"]; + } + var cpath = args["templateCssPath"] || this.templateCssPath; + if(cpath && !dojo.widget._cssFiles[cpath.toString()]){ + if((!this.templateCssString)&&(cpath)){ + this.templateCssString = dojo.hostenv.getText(cpath); + this.templateCssPath = null; + } + dojo.widget._cssFiles[cpath.toString()] = true; + } + + if((this["templateCssString"])&&(!dojo.widget._cssStrings[this.templateCssString])){ + dojo.html.insertCssText(this.templateCssString, null, cpath); + dojo.widget._cssStrings[this.templateCssString] = true; + } + if( + (!this.preventClobber)&&( + (this.templatePath)|| + (this.templateNode)|| + ( + (this["templateString"])&&(this.templateString.length) + )|| + ( + (typeof ts != "undefined")&&( (ts["string"])||(ts["node"]) ) + ) + ) + ){ + // if it looks like we can build the thing from a template, do it! + this.buildFromTemplate(args, frag); + }else{ + // otherwise, assign the DOM node that was the source of the widget + // parsing to be the root node + this.domNode = this.getFragNodeRef(frag); + } + this.fillInTemplate(args, frag); // this is where individual widgets + // will handle population of data + // from properties, remote data + // sets, etc. + }, + + buildFromTemplate: function(/*Object*/ args, /*Object*/ frag){ + // summary: + // Called by buildRendering, creates the actual UI in a DomWidget. + + // var start = new Date(); + // copy template properties if they're already set in the templates object + // dojo.debug("buildFromTemplate:", this); + var avoidCache = false; + if(args["templatepath"]){ +// avoidCache = true; + args["templatePath"] = args["templatepath"]; + } + dojo.widget.fillFromTemplateCache( this, + args["templatePath"], + null, + avoidCache); + var ts = dojo.widget._templateCache[this.templatePath?this.templatePath.toString():this.widgetType]; + if((ts)&&(!avoidCache)){ + if(!this.templateString.length){ + this.templateString = ts["string"]; + } + if(!this.templateNode){ + this.templateNode = ts["node"]; + } + } + var matches = false; + var node = null; + // var tstr = new String(this.templateString); + var tstr = this.templateString; + // attempt to clone a template node, if there is one + if((!this.templateNode)&&(this.templateString)){ + matches = this.templateString.match(/\$\{([^\}]+)\}/g); + if(matches) { + // if we do property replacement, don't create a templateNode + // to clone from. + var hash = this.strings || {}; + // FIXME: should this hash of default replacements be cached in + // templateString? + for(var key in dojo.widget.defaultStrings) { + if(dojo.lang.isUndefined(hash[key])) { + hash[key] = dojo.widget.defaultStrings[key]; + } + } + // FIXME: this is a lot of string munging. Can we make it faster? + for(var i = 0; i < matches.length; i++) { + var key = matches[i]; + key = key.substring(2, key.length-1); + var kval = (key.substring(0, 5) == "this.") ? dojo.lang.getObjPathValue(key.substring(5), this) : hash[key]; + var value; + if((kval)||(dojo.lang.isString(kval))){ + value = new String((dojo.lang.isFunction(kval)) ? kval.call(this, key, this.templateString) : kval); + // Safer substitution, see heading "Attribute values" in + // http://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.3.2 + while (value.indexOf("\"") > -1) { + value=value.replace("\"","""); + } + tstr = tstr.replace(matches[i], value); + } + } + }else{ + // otherwise, we are required to instantiate a copy of the template + // string if one is provided. + + // FIXME: need to be able to distinguish here what should be done + // or provide a generic interface across all DOM implementations + // FIMXE: this breaks if the template has whitespace as its first + // characters + // node = this.createNodesFromText(this.templateString, true); + // this.templateNode = node[0].cloneNode(true); // we're optimistic here + this.templateNode = this.createNodesFromText(this.templateString, true)[0]; + if(!avoidCache){ + ts.node = this.templateNode; + } + } + } + if((!this.templateNode)&&(!matches)){ + dojo.debug("DomWidget.buildFromTemplate: could not create template"); + return false; + }else if(!matches){ + node = this.templateNode.cloneNode(true); + if(!node){ return false; } + }else{ + node = this.createNodesFromText(tstr, true)[0]; + } + + // recurse through the node, looking for, and attaching to, our + // attachment points which should be defined on the template node. + + this.domNode = node; + // dojo.profile.start("attachTemplateNodes"); + this.attachTemplateNodes(); + // dojo.profile.end("attachTemplateNodes"); + + // relocate source contents to templated container node + // this.containerNode must be able to receive children, or exceptions will be thrown + if (this.isContainer && this.containerNode){ + var src = this.getFragNodeRef(frag); + if (src){ + dojo.dom.moveChildren(src, this.containerNode); + } + } + }, + + attachTemplateNodes: function(baseNode, targetObj){ + // summary: + // hooks up event handlers and property/node linkages. Calls + // dojo.widget.attachTemplateNodes to do all the hard work. + // baseNode: DomNode + // defaults to "this.domNode" + // targetObj: Widget + // defaults to "this" + if(!baseNode){ baseNode = this.domNode; } + if(!targetObj){ targetObj = this; } + return dojo.widget.attachTemplateNodes(baseNode, targetObj, + dojo.widget.getDojoEventsFromStr(this.templateString)); + }, + + fillInTemplate: function(){ + // summary: + // stub function! sub-classes may use as a default UI + // initializer function. The UI rendering will be available by + // the time this is called from buildRendering. If + // buildRendering is over-ridden, this function may not be + // fired! + + // dojo.unimplemented("dojo.widget.DomWidget.fillInTemplate"); + }, + + // method over-ride + destroyRendering: function(){ + // summary: UI destructor. Destroy the dom nodes associated w/this widget. + try{ + dojo.dom.destroyNode(this.domNode); + delete this.domNode; + }catch(e){ /* squelch! */ } + if(this._sourceNodeRef){ + try{ + dojo.dom.destroyNode(this._sourceNodeRef); + }catch(e){ /* squelch! */ } + } + }, + + createNodesFromText: function(){ + // summary + // Attempts to create a set of nodes based on the structure of the passed text. + // Implemented in HtmlWidget and SvgWidget. + dojo.unimplemented("dojo.widget.DomWidget.createNodesFromText"); + } + } +); + +dojo.provide("dojo.html.util"); + + +dojo.html.getElementWindow = function(/* HTMLElement */element){ + // summary + // Get the window object where the element is placed in. + return dojo.html.getDocumentWindow( element.ownerDocument ); // Window +} + +dojo.html.getDocumentWindow = function(doc){ + // summary + // Get window object associated with document doc + + // With Safari, there is not wa to retrieve the window from the document, so we must fix it. + if(dojo.render.html.safari && !doc._parentWindow){ + /* + This is a Safari specific function that fix the reference to the parent + window from the document object. + */ + + var fix=function(win){ + win.document._parentWindow=win; + for(var i=0; i + // If you wanted to insert a node into a DOM tree based on the mouse + // position you might use the following code: + //
    +	//	if (gravity(node, e) & gravity.NORTH) { [insert before]; }
    +	//	else { [insert after]; }
    +	//	
    + // + // @param node The node + // @param e The event containing the mouse coordinates + // @return The directions, NORTH or SOUTH and EAST or WEST. These + // are properties of the function. + node = dojo.byId(node); + var mouse = dojo.html.getCursorPosition(e); + + with (dojo.html) { + var absolute = getAbsolutePosition(node, true); + var bb = getBorderBox(node); + var nodecenterx = absolute.x + (bb.width / 2); + var nodecentery = absolute.y + (bb.height / 2); + } + + with (dojo.html.gravity) { + return ((mouse.x < nodecenterx ? WEST : EAST) | (mouse.y < nodecentery ? NORTH : SOUTH)); // integer + } +} + +dojo.html.gravity.NORTH = 1; +dojo.html.gravity.SOUTH = 1 << 1; +dojo.html.gravity.EAST = 1 << 2; +dojo.html.gravity.WEST = 1 << 3; + +dojo.html.overElement = function(/* HTMLElement */element, /* DOMEvent */e){ + // summary + // Returns whether the mouse is over the passed element. + // Element must be display:block (ie, not a ) + element = dojo.byId(element); + var mouse = dojo.html.getCursorPosition(e); + var bb = dojo.html.getBorderBox(element); + var absolute = dojo.html.getAbsolutePosition(element, true, dojo.html.boxSizing.BORDER_BOX); + var top = absolute.y; + var bottom = top + bb.height; + var left = absolute.x; + var right = left + bb.width; + + return (mouse.x >= left + && mouse.x <= right + && mouse.y >= top + && mouse.y <= bottom + ); // boolean +} + +dojo.html.renderedTextContent = function(/* HTMLElement */node){ + // summary + // Attempts to return the text as it would be rendered, with the line breaks + // sorted out nicely. Unfinished. + node = dojo.byId(node); + var result = ""; + if (node == null) { return result; } + for (var i = 0; i < node.childNodes.length; i++) { + switch (node.childNodes[i].nodeType) { + case 1: // ELEMENT_NODE + case 5: // ENTITY_REFERENCE_NODE + var display = "unknown"; + try { + display = dojo.html.getStyle(node.childNodes[i], "display"); + } catch(E) {} + switch (display) { + case "block": case "list-item": case "run-in": + case "table": case "table-row-group": case "table-header-group": + case "table-footer-group": case "table-row": case "table-column-group": + case "table-column": case "table-cell": case "table-caption": + // TODO: this shouldn't insert double spaces on aligning blocks + result += "\n"; + result += dojo.html.renderedTextContent(node.childNodes[i]); + result += "\n"; + break; + + case "none": break; + + default: + if(node.childNodes[i].tagName && node.childNodes[i].tagName.toLowerCase() == "br") { + result += "\n"; + } else { + result += dojo.html.renderedTextContent(node.childNodes[i]); + } + break; + } + break; + case 3: // TEXT_NODE + case 2: // ATTRIBUTE_NODE + case 4: // CDATA_SECTION_NODE + var text = node.childNodes[i].nodeValue; + var textTransform = "unknown"; + try { + textTransform = dojo.html.getStyle(node, "text-transform"); + } catch(E) {} + switch (textTransform){ + case "capitalize": + var words = text.split(' '); + for(var i=0; i]/i).test(txt.replace(/^\s+/))) { + txt = "" + txt + "
    "; + tableType = "cell"; + } else if((/^]/i).test(txt.replace(/^\s+/))) { + txt = "" + txt + "
    "; + tableType = "row"; + } else if((/^<(thead|tbody|tfoot)[\s\r\n>]/i).test(txt.replace(/^\s+/))) { + txt = "" + txt + "
    "; + tableType = "section"; + } + tn.innerHTML = txt; + if(tn["normalize"]){ + tn.normalize(); + } + + var parent = null; + switch(tableType) { + case "cell": + parent = tn.getElementsByTagName("tr")[0]; + break; + case "row": + parent = tn.getElementsByTagName("tbody")[0]; + break; + case "section": + parent = tn.getElementsByTagName("table")[0]; + break; + default: + parent = tn; + break; + } + + /* this doesn't make much sense, I'm assuming it just meant trim() so wrap was replaced with trim + if(wrap){ + var ret = []; + // start hack + var fc = tn.firstChild; + ret[0] = ((fc.nodeValue == " ")||(fc.nodeValue == "\t")) ? fc.nextSibling : fc; + // end hack + // tn.style.display = "none"; + dojo.body().removeChild(tn); + return ret; + } + */ + var nodes = []; + for(var x=0; x view.width) { + x = view.width - w; + match = false; + } else { + x = tryX; + } + x = Math.max(padding[0], x) + scroll.x; + + var y = tryY + h; + if(y > view.height) { + y = view.height - h; + match = false; + } else { + y = tryY; + } + y = Math.max(padding[1], y) + scroll.y; + + if(match){ //perfect match, return now + bestx = x; + besty = y; + bestDistance = 0; + bestCorner = corner; + break; + }else{ + //not perfect, find out whether it is better than the saved one + var dist = Math.pow(x-tryX-scroll.x,2)+Math.pow(y-tryY-scroll.y,2); + if(bestDistance > dist){ + bestDistance = dist; + bestx = x; + besty = y; + bestCorner = corner; + } + } + } + + if(!tryOnly){ + node.style.left = bestx + "px"; + node.style.top = besty + "px"; + } + + return { left: bestx, top: besty, x: bestx, y: besty, dist: bestDistance, corner: bestCorner}; // object +} + +dojo.html.placeOnScreenPoint = function(node, desiredX, desiredY, padding, hasScroll) { + dojo.deprecated("dojo.html.placeOnScreenPoint", "use dojo.html.placeOnScreen() instead", "0.5"); + return dojo.html.placeOnScreen(node, desiredX, desiredY, padding, hasScroll, ['TL', 'TR', 'BL', 'BR']); +} + +dojo.html.placeOnScreenAroundElement = function( + /* HTMLElement */node, + /* HTMLElement */aroundNode, + /* integer */padding, + /* string? */aroundType, + /* string? */aroundCorners, + /* boolean? */tryOnly +){ + // summary + // Like placeOnScreen, except it accepts aroundNode instead of x,y + // and attempts to place node around it. aroundType (see + // dojo.html.boxSizing in html/layout.js) determines which box of the + // aroundNode should be used to calculate the outer box. + // aroundCorners specify Which corner of aroundNode should be + // used to place the node => which corner(s) of node to use (see the + // corners parameter in dojo.html.placeOnScreen) + // aroundCorners: {'TL': 'BL', 'BL': 'TL'} + + var best, bestDistance=Infinity; + aroundNode = dojo.byId(aroundNode); + var oldDisplay = aroundNode.style.display; + aroundNode.style.display=""; + var mb = dojo.html.getElementBox(aroundNode, aroundType); + var aroundNodeW = mb.width; + var aroundNodeH = mb.height; + var aroundNodePos = dojo.html.getAbsolutePosition(aroundNode, true, aroundType); + aroundNode.style.display=oldDisplay; + + for(var nodeCorner in aroundCorners){ + var pos, desiredX, desiredY; + var corners = aroundCorners[nodeCorner]; + + desiredX = aroundNodePos.x + (nodeCorner.charAt(1)=='L' ? 0 : aroundNodeW); + desiredY = aroundNodePos.y + (nodeCorner.charAt(0)=='T' ? 0 : aroundNodeH); + + pos = dojo.html.placeOnScreen(node, desiredX, desiredY, padding, true, corners, true); + if(pos.dist == 0){ + best = pos; + break; + }else{ + //not perfect, find out whether it is better than the saved one + if(bestDistance > pos.dist){ + bestDistance = pos.dist; + best = pos; + } + } + } + + if(!tryOnly){ + node.style.left = best.left + "px"; + node.style.top = best.top + "px"; + } + return best; // object +} + +dojo.html.scrollIntoView = function(/* HTMLElement */node){ + // summary + // Scroll the passed node into view, if it is not. + if(!node){ return; } + + // don't rely on that node.scrollIntoView works just because the function is there + // it doesnt work in Konqueror or Opera even though the function is there and probably + // not safari either + // dont like browser sniffs implementations but sometimes you have to use it + if(dojo.render.html.ie){ + //only call scrollIntoView if there is a scrollbar for this menu, + //otherwise, scrollIntoView will scroll the window scrollbar + if(dojo.html.getBorderBox(node.parentNode).height <= node.parentNode.scrollHeight){ + node.scrollIntoView(false); + } + }else if(dojo.render.html.mozilla){ + // IE, mozilla + node.scrollIntoView(false); + }else{ + var parent = node.parentNode; + var parentBottom = parent.scrollTop + dojo.html.getBorderBox(parent).height; + var nodeBottom = node.offsetTop + dojo.html.getMarginBox(node).height; + if(parentBottom < nodeBottom){ + parent.scrollTop += (nodeBottom - parentBottom); + }else if(parent.scrollTop > node.offsetTop){ + parent.scrollTop -= (parent.scrollTop - node.offsetTop); + } + } +} + +dojo.provide("dojo.lfx.toggle"); + + +dojo.lfx.toggle.plain = { + show: function(node, duration, easing, callback){ + dojo.html.show(node); + if(dojo.lang.isFunction(callback)){ callback(); } + }, + + hide: function(node, duration, easing, callback){ + dojo.html.hide(node); + if(dojo.lang.isFunction(callback)){ callback(); } + } +} + +dojo.lfx.toggle.fade = { + show: function(node, duration, easing, callback){ + dojo.lfx.fadeShow(node, duration, easing, callback).play(); + }, + + hide: function(node, duration, easing, callback){ + dojo.lfx.fadeHide(node, duration, easing, callback).play(); + } +} + +dojo.lfx.toggle.wipe = { + show: function(node, duration, easing, callback){ + dojo.lfx.wipeIn(node, duration, easing, callback).play(); + }, + + hide: function(node, duration, easing, callback){ + dojo.lfx.wipeOut(node, duration, easing, callback).play(); + } +} + +dojo.lfx.toggle.explode = { + show: function(node, duration, easing, callback, explodeSrc){ + dojo.lfx.explode(explodeSrc||{x:0,y:0,width:0,height:0}, node, duration, easing, callback).play(); + }, + + hide: function(node, duration, easing, callback, explodeSrc){ + dojo.lfx.implode(node, explodeSrc||{x:0,y:0,width:0,height:0}, duration, easing, callback).play(); + } +} + +dojo.provide("dojo.widget.HtmlWidget"); + + + + + + + + +dojo.declare("dojo.widget.HtmlWidget", dojo.widget.DomWidget, { + // summary + // Base class for all browser based widgets, or at least "html" widgets. + // The meaning of "html" has become unclear; in practice, all widgets derive from this class. + + // templateCssPath: String + // Path to CSS file for this widget + templateCssPath: null, + + // templatePath: String + // Path to template (HTML file) for this widget + templatePath: null, + + // lang: String + // Language to display this widget in (like en-us). + // Defaults to brower's specified preferred language (typically the language of the OS) + lang: "", + + // toggle: String + // Controls animation effect for when show() and hide() (or toggle()) are called. + // Possible values: "plain", "wipe", "fade", "explode" + toggle: "plain", + + // toggleDuration: Integer + // Number of milliseconds for toggle animation effect to complete + toggleDuration: 150, + + initialize: function(args, frag){ + // summary: called after the widget is rendered; most subclasses won't override or call this function + }, + + postMixInProperties: function(args, frag){ + if(this.lang === ""){this.lang = null;} + // now that we know the setting for toggle, get toggle object + // (default to plain toggler if user specified toggler not present) + this.toggleObj = + dojo.lfx.toggle[this.toggle.toLowerCase()] || dojo.lfx.toggle.plain; + }, + + createNodesFromText: function(txt, wrap){ + return dojo.html.createNodesFromText(txt, wrap); + }, + + destroyRendering: function(finalize){ + try{ + if(this.bgIframe){ + this.bgIframe.remove(); + delete this.bgIframe; + } + if(!finalize && this.domNode){ + dojo.event.browser.clean(this.domNode); + } + dojo.widget.HtmlWidget.superclass.destroyRendering.call(this); + }catch(e){ /* squelch! */ } + }, + + ///////////////////////////////////////////////////////// + // Displaying/hiding the widget + ///////////////////////////////////////////////////////// + isShowing: function(){ + // summary + // Tests whether widget is set to show-mode or hide-mode (see show() and + // hide() methods) + // + // This function is poorly named. Even if widget is in show-mode, + // if it's inside a container that's hidden + // (either a container widget, or just a domnode with display:none), + // then it won't be displayed + return dojo.html.isShowing(this.domNode); // Boolean + }, + + toggleShowing: function(){ + // summary: show or hide the widget, to switch it's state + if(this.isShowing()){ + this.hide(); + }else{ + this.show(); + } + }, + + show: function(){ + // summary: show the widget + if(this.isShowing()){ return; } + this.animationInProgress=true; + this.toggleObj.show(this.domNode, this.toggleDuration, null, + dojo.lang.hitch(this, this.onShow), this.explodeSrc); + }, + + onShow: function(){ + // summary: called after the show() animation has completed + this.animationInProgress=false; + this.checkSize(); + }, + + hide: function(){ + // summary: hide the widget (ending up with display:none) + if(!this.isShowing()){ return; } + this.animationInProgress = true; + this.toggleObj.hide(this.domNode, this.toggleDuration, null, + dojo.lang.hitch(this, this.onHide), this.explodeSrc); + }, + + onHide: function(){ + // summary: called after the hide() animation has completed + this.animationInProgress=false; + }, + + ////////////////////////////////////////////////////////////////////////////// + // Sizing related methods + // If the parent changes size then for each child it should call either + // - resizeTo(): size the child explicitly + // - or checkSize(): notify the child the the parent has changed size + ////////////////////////////////////////////////////////////////////////////// + + _isResized: function(w, h){ + // summary + // Test if my size has changed. + // If width & height are specified then that's my new size; otherwise, + // query outerWidth/outerHeight of my domNode + + // If I'm not being displayed then disregard (show() must + // check if the size has changed) + if(!this.isShowing()){ return false; } + + // If my parent has been resized and I have style="height: 100%" + // or something similar then my size has changed too. + var wh = dojo.html.getMarginBox(this.domNode); + var width=w||wh.width; + var height=h||wh.height; + if(this.width == width && this.height == height){ return false; } + + this.width=width; + this.height=height; + return true; + }, + + checkSize: function(){ + // summary + // Called when my parent has changed size, but my parent won't call resizeTo(). + // This is useful if my size is height:100% or something similar. + // Also called whenever I am shown, because the first time I am shown I may need + // to do size calculations. + if(!this._isResized()){ return; } + this.onResized(); + }, + + resizeTo: function(w, h){ + // summary: explicitly set this widget's size (in pixels). + dojo.html.setMarginBox(this.domNode, { width: w, height: h }); + + // can't do sizing if widget is hidden because referencing node.offsetWidth/node.offsetHeight returns 0. + // do sizing on show() instead. + if(this.isShowing()){ + this.onResized(); + } + }, + + resizeSoon: function(){ + // summary + // schedule onResized() to be called soon, after browser has had + // a little more time to calculate the sizes + if(this.isShowing()){ + dojo.lang.setTimeout(this, this.onResized, 0); + } + }, + + onResized: function(){ + // summary + // Called when my size has changed. + // Must notify children if their size has (possibly) changed. + dojo.lang.forEach(this.children, function(child){ if(child.checkSize){child.checkSize();} }); + } +}); + +dojo.kwCompoundRequire({ + common: ["dojo.xml.Parse", + "dojo.widget.Widget", + "dojo.widget.Parse", + "dojo.widget.Manager"], + browser: ["dojo.widget.DomWidget", + "dojo.widget.HtmlWidget"], + dashboard: ["dojo.widget.DomWidget", + "dojo.widget.HtmlWidget"], + svg: ["dojo.widget.SvgWidget"], + rhino: ["dojo.widget.SwtWidget"] +}); +dojo.provide("dojo.widget.*"); + +dojo.kwCompoundRequire({ + common: [ "dojo.html.common", + "dojo.html.style" ] +}); +dojo.provide("dojo.html.*"); + + +dojo.provide("dojo.html.selection"); + + + + +/** + * type of selection +**/ +dojo.html.selectionType = { + NONE : 0, //selection is empty + TEXT : 1, //selection contains text (may also contains CONTROL objects) + CONTROL : 2 //only one element is selected (such as img, table etc) +}; + +dojo.html.clearSelection = function(){ + // summary: deselect the current selection to make it empty + var _window = dojo.global(); + var _document = dojo.doc(); + try{ + if(_window["getSelection"]){ + if(dojo.render.html.safari){ + // pulled from WebCore/ecma/kjs_window.cpp, line 2536 + _window.getSelection().collapse(); + }else{ + _window.getSelection().removeAllRanges(); + } + }else if(_document.selection){ + if(_document.selection.empty){ + _document.selection.empty(); + }else if(_document.selection.clear){ + _document.selection.clear(); + } + } + return true; + }catch(e){ + dojo.debug(e); + return false; + } +} + +dojo.html.disableSelection = function(/*DomNode*/element){ + // summary: disable selection on a node + element = dojo.byId(element)||dojo.body(); + var h = dojo.render.html; + + if(h.mozilla){ + element.style.MozUserSelect = "none"; + }else if(h.safari){ + element.style.KhtmlUserSelect = "none"; + }else if(h.ie){ + element.unselectable = "on"; + }else{ + return false; + } + return true; +} + +dojo.html.enableSelection = function(/*DomNode*/element){ + // summary: enable selection on a node + element = dojo.byId(element)||dojo.body(); + + var h = dojo.render.html; + if(h.mozilla){ + element.style.MozUserSelect = ""; + }else if(h.safari){ + element.style.KhtmlUserSelect = ""; + }else if(h.ie){ + element.unselectable = "off"; + }else{ + return false; + } + return true; +} + +dojo.html.selectElement = function(/*DomNode*/element){ + dojo.deprecated("dojo.html.selectElement", "replaced by dojo.html.selection.selectElementChildren", 0.5); +} + +dojo.html.selectInputText = function(/*DomNode*/element){ + // summary: select all the text in an input element + var _window = dojo.global(); + var _document = dojo.doc(); + element = dojo.byId(element); + if(_document["selection"] && dojo.body()["createTextRange"]){ // IE + var range = element.createTextRange(); + range.moveStart("character", 0); + range.moveEnd("character", element.value.length); + range.select(); + }else if(_window["getSelection"]){ + var selection = _window.getSelection(); + // FIXME: does this work on Safari? + element.setSelectionRange(0, element.value.length); + } + element.focus(); +} + + +dojo.html.isSelectionCollapsed = function(){ + dojo.deprecated("dojo.html.isSelectionCollapsed", "replaced by dojo.html.selection.isCollapsed", 0.5); + return dojo.html.selection.isCollapsed(); +} + +dojo.lang.mixin(dojo.html.selection, { + getType: function() { + // summary: Get the selection type (like document.select.type in IE). + if(dojo.doc()["selection"]){ //IE + return dojo.html.selectionType[dojo.doc().selection.type.toUpperCase()]; + }else{ + var stype = dojo.html.selectionType.TEXT; + + // Check if the actual selection is a CONTROL (IMG, TABLE, HR, etc...). + var oSel; + try {oSel = dojo.global().getSelection();} + catch (e) {} + + if(oSel && oSel.rangeCount==1){ + var oRange = oSel.getRangeAt(0); + if (oRange.startContainer == oRange.endContainer && (oRange.endOffset - oRange.startOffset) == 1 + && oRange.startContainer.nodeType != dojo.dom.TEXT_NODE) { + stype = dojo.html.selectionType.CONTROL; + } + } + return stype; + } + }, + isCollapsed: function() { + // summary: return whether the current selection is empty + var _window = dojo.global(); + var _document = dojo.doc(); + if(_document["selection"]){ // IE + return _document.selection.createRange().text == ""; + }else if(_window["getSelection"]){ + var selection = _window.getSelection(); + if(dojo.lang.isString(selection)){ // Safari + return selection == ""; + }else{ // Mozilla/W3 + return selection.isCollapsed || selection.toString() == ""; + } + } + }, + getSelectedElement: function() { + // summary: + // Retrieves the selected element (if any), just in the case that a single + // element (object like and image or a table) is selected. + if ( dojo.html.selection.getType() == dojo.html.selectionType.CONTROL ){ + if(dojo.doc()["selection"]){ //IE + var range = dojo.doc().selection.createRange(); + + if ( range && range.item ){ + return dojo.doc().selection.createRange().item(0); + } + }else{ + var selection = dojo.global().getSelection(); + return selection.anchorNode.childNodes[ selection.anchorOffset ]; + } + } + }, + getParentElement: function() { + // summary: + // Get the parent element of the current selection + if(dojo.html.selection.getType() == dojo.html.selectionType.CONTROL){ + var p = dojo.html.selection.getSelectedElement(); + if(p){ return p.parentNode; } + }else{ + if(dojo.doc()["selection"]){ //IE + return dojo.doc().selection.createRange().parentElement(); + }else{ + var selection = dojo.global().getSelection(); + if(selection){ + var node = selection.anchorNode; + + while ( node && node.nodeType != dojo.dom.ELEMENT_NODE ){ + node = node.parentNode; + } + + return node; + } + } + } + }, + getSelectedText: function(){ + // summary: + // Return the text (no html tags) included in the current selection or null if no text is selected + if(dojo.doc()["selection"]){ //IE + if(dojo.html.selection.getType() == dojo.html.selectionType.CONTROL){ + return null; + } + return dojo.doc().selection.createRange().text; + }else{ + var selection = dojo.global().getSelection(); + if(selection){ + return selection.toString(); + } + } + }, + getSelectedHtml: function(){ + // summary: + // Return the html of the current selection or null if unavailable + if(dojo.doc()["selection"]){ //IE + if(dojo.html.selection.getType() == dojo.html.selectionType.CONTROL){ + return null; + } + return dojo.doc().selection.createRange().htmlText; + }else{ + var selection = dojo.global().getSelection(); + if(selection && selection.rangeCount){ + var frag = selection.getRangeAt(0).cloneContents(); + var div = document.createElement("div"); + div.appendChild(frag); + return div.innerHTML; + } + return null; + } + }, + hasAncestorElement: function(/*String*/tagName /* ... */){ + // summary: + // Check whether current selection has a parent element which is of type tagName (or one of the other specified tagName) + return (dojo.html.selection.getAncestorElement.apply(this, arguments) != null); + }, + getAncestorElement: function(/*String*/tagName /* ... */){ + // summary: + // Return the parent element of the current selection which is of type tagName (or one of the other specified tagName) + var node = dojo.html.selection.getSelectedElement() || dojo.html.selection.getParentElement(); + while(node /*&& node.tagName.toLowerCase() != 'body'*/){ + if(dojo.html.selection.isTag(node, arguments).length>0){ + return node; + } + node = node.parentNode; + } + return null; + }, + //modified from dojo.html.isTag to take an array as second parameter + isTag: function(/*DomNode*/node, /*Array*/tags) { + if(node && node.tagName) { + for (var i=0; i. + + Why do we want this? JavaScript has no threads, and even if it did, + threads are hard. Deferreds are a way of abstracting non-blocking + events, such as the final response to an XMLHttpRequest. + + The sequence of callbacks is internally represented as a list + of 2-tuples containing the callback/errback pair. For example, + the following call sequence:: + + var d = new Deferred(); + d.addCallback(myCallback); + d.addErrback(myErrback); + d.addBoth(myBoth); + d.addCallbacks(myCallback, myErrback); + + is translated into a Deferred with the following internal + representation:: + + [ + [myCallback, null], + [null, myErrback], + [myBoth, myBoth], + [myCallback, myErrback] + ] + + The Deferred also keeps track of its current status (fired). + Its status may be one of three things: + + -1: no value yet (initial condition) + 0: success + 1: error + + A Deferred will be in the error state if one of the following + three conditions are met: + + 1. The result given to callback or errback is "instanceof" Error + 2. The previous callback or errback raised an exception while + executing + 3. The previous callback or errback returned a value "instanceof" + Error + + Otherwise, the Deferred will be in the success state. The state of + the Deferred determines the next element in the callback sequence to + run. + + When a callback or errback occurs with the example deferred chain, + something equivalent to the following will happen (imagine that + exceptions are caught and returned):: + + // d.callback(result) or d.errback(result) + if(!(result instanceof Error)){ + result = myCallback(result); + } + if(result instanceof Error){ + result = myErrback(result); + } + result = myBoth(result); + if(result instanceof Error){ + result = myErrback(result); + }else{ + result = myCallback(result); + } + + The result is then stored away in case another step is added to the + callback sequence. Since the Deferred already has a value available, + any new callbacks added will be called immediately. + + There are two other "advanced" details about this implementation that + are useful: + + Callbacks are allowed to return Deferred instances themselves, so you + can build complicated sequences of events with ease. + + The creator of the Deferred may specify a canceller. The canceller + is a function that will be called if Deferred.cancel is called before + the Deferred fires. You can use this to implement clean aborting of + an XMLHttpRequest, etc. Note that cancel will fire the deferred with + a CancelledError (unless your canceller returns another kind of + error), so the errbacks should be prepared to handle that error for + cancellable Deferreds. + + */ + + this.chain = []; + this.id = this._nextId(); + this.fired = -1; + this.paused = 0; + this.results = [null, null]; + this.canceller = canceller; + this.silentlyCancelled = false; +}; + +dojo.lang.extend(dojo.Deferred, { + getFunctionFromArgs: function(){ + var a = arguments; + if((a[0])&&(!a[1])){ + if(dojo.lang.isFunction(a[0])){ + return a[0]; + }else if(dojo.lang.isString(a[0])){ + return dj_global[a[0]]; + } + }else if((a[0])&&(a[1])){ + return dojo.lang.hitch(a[0], a[1]); + } + return null; + }, + + makeCalled: function() { + var deferred = new dojo.Deferred(); + deferred.callback(); + return deferred; + }, + + repr: function(){ + var state; + if(this.fired == -1){ + state = 'unfired'; + }else if(this.fired == 0){ + state = 'success'; + } else { + state = 'error'; + } + return 'Deferred(' + this.id + ', ' + state + ')'; + }, + + toString: dojo.lang.forward("repr"), + + _nextId: (function(){ + var n = 1; + return function(){ return n++; }; + })(), + + cancel: function(){ + // summary: Cancels a Deferred that has not yet received a value, or is + // waiting on another Deferred as its value. + // description: + // If a canceller is defined, the canceller is called. If the + // canceller did not return an error, or there was no canceller, + // then the errback chain is started with CancelledError. + if(this.fired == -1){ + if (this.canceller){ + this.canceller(this); + }else{ + this.silentlyCancelled = true; + } + if(this.fired == -1){ + this.errback(new Error(this.repr())); + } + }else if( (this.fired == 0)&& + (this.results[0] instanceof dojo.Deferred)){ + this.results[0].cancel(); + } + }, + + + _pause: function(){ + // summary: Used internally to signal that it's waiting on another Deferred + this.paused++; + }, + + _unpause: function(){ + // summary: Used internally to signal that it's no longer waiting on + // another Deferred. + this.paused--; + if ((this.paused == 0) && (this.fired >= 0)) { + this._fire(); + } + }, + + _continue: function(res){ + // summary: Used internally when a dependent deferred fires. + this._resback(res); + this._unpause(); + }, + + _resback: function(res){ + // The primitive that means either callback or errback + this.fired = ((res instanceof Error) ? 1 : 0); + this.results[this.fired] = res; + this._fire(); + }, + + _check: function(){ + if(this.fired != -1){ + if(!this.silentlyCancelled){ + dojo.raise("already called!"); + } + this.silentlyCancelled = false; + return; + } + }, + + callback: function(res){ + // summary: Begin the callback sequence with a non-error value. + + /* + callback or errback should only be called once on a given + Deferred. + */ + this._check(); + this._resback(res); + }, + + errback: function(res){ + // summary: Begin the callback sequence with an error result. + this._check(); + if(!(res instanceof Error)){ + res = new Error(res); + } + this._resback(res); + }, + + addBoth: function(cb, cbfn){ + /* summary + Add the same function as both a callback and an errback as the + next element on the callback sequence. This is useful for code + that you want to guarantee to run, e.g. a finalizer. + */ + var enclosed = this.getFunctionFromArgs(cb, cbfn); + if(arguments.length > 2){ + enclosed = dojo.lang.curryArguments(null, enclosed, arguments, 2); + } + return this.addCallbacks(enclosed, enclosed); + }, + + addCallback: function(cb, cbfn){ + // summary: Add a single callback to the end of the callback sequence. + var enclosed = this.getFunctionFromArgs(cb, cbfn); + if(arguments.length > 2){ + enclosed = dojo.lang.curryArguments(null, enclosed, arguments, 2); + } + return this.addCallbacks(enclosed, null); + }, + + addErrback: function(cb, cbfn){ + // summary: Add a single callback to the end of the callback sequence. + var enclosed = this.getFunctionFromArgs(cb, cbfn); + if(arguments.length > 2){ + enclosed = dojo.lang.curryArguments(null, enclosed, arguments, 2); + } + return this.addCallbacks(null, enclosed); + return this.addCallbacks(null, cbfn); + }, + + addCallbacks: function (cb, eb) { + // summary: Add separate callback and errback to the end of the callback + // sequence. + this.chain.push([cb, eb]) + if (this.fired >= 0) { + this._fire(); + } + return this; + }, + + _fire: function(){ + // summary: Used internally to exhaust the callback sequence when a result + // is available. + var chain = this.chain; + var fired = this.fired; + var res = this.results[fired]; + var self = this; + var cb = null; + while (chain.length > 0 && this.paused == 0) { + // Array + var pair = chain.shift(); + var f = pair[fired]; + if (f == null) { + continue; + } + try { + res = f(res); + fired = ((res instanceof Error) ? 1 : 0); + if(res instanceof dojo.Deferred) { + cb = function(res){ + self._continue(res); + } + this._pause(); + } + }catch(err){ + fired = 1; + res = err; + } + } + this.fired = fired; + this.results[fired] = res; + if((cb)&&(this.paused)){ + // this is for "tail recursion" in case the dependent + // deferred is already fired + res.addBoth(cb); + } + } +}); + + /* -*- tab-width: 4 -*- */ +dojo.provide("dojo.widget.RichText"); + + + + + + + + + + +// used to save content +// but do not try doing document.write if we are using xd loading. +// document.write will only work if RichText.js is included in the dojo.js +// file. If it is included in dojo.js and you want to allow rich text saving +// for back/forward actions, then set djConfig.allowXdRichTextSave = true. +if(!djConfig["useXDomain"] || djConfig["allowXdRichTextSave"]){ + if(dojo.hostenv.post_load_){ + (function(){ + var savetextarea = dojo.doc().createElement('textarea'); + savetextarea.id = "dojo.widget.RichText.savedContent"; + savetextarea.style = "display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;"; + dojo.body().appendChild(savetextarea); + })(); + }else{ + //dojo.body() is not available before onLoad is fired + try { + dojo.doc().write(''); + }catch(e){ } + } +} + +dojo.widget.defineWidget( + "dojo.widget.RichText", + dojo.widget.HtmlWidget, + function(){ + // summary: + // dojo.widget.RichText is the core of the WYSIWYG editor in dojo, which + // provides the basic editing features. It also encapsulates the differences + // of different js engines for various browsers + + // contentPreFilters: Array + // pre content filter function register array + this.contentPreFilters = []; + + // contentPostFilters: Array + // post content filter function register array + this.contentPostFilters = []; + + // contentDomPreFilters: Array + // pre content dom filter function register array + this.contentDomPreFilters = []; + + // contentDomPostFilters: Array + // post content dom filter function register array + this.contentDomPostFilters = []; + + // editingAreaStyleSheets: Array + // array to store all the stylesheets applied to the editing area + this.editingAreaStyleSheets=[]; + + if(dojo.render.html.moz){ + this.contentPreFilters.push(this._fixContentForMoz); + } + + this._keyHandlers = {}; + + if(dojo.Deferred){ + this.onLoadDeferred = new dojo.Deferred(); + } + }, + { + // inheritWidth: Boolean + // whether to inherit the parent's width or simply use 100% + inheritWidth: false, + + // focusOnLoad: Boolean + // whether focusing into this instance of richtext when page onload + focusOnLoad: false, + + // saveName: String + // If a save name is specified the content is saved and restored when the user + // leave this page can come back, or if the editor is not properly closed after + // editing has started. + saveName: "", + + // styleSheets: String + // semicolon (";") separated list of css files for the editing area + styleSheets: "", + + // _content: String + // temporary content storage + _content: "", + + // height: String + // set height to fix the editor at a specific height, with scrolling + height: "", + + // minHeight: String + // The minimum height that the editor should have + minHeight: "1em", + + // isClosed: Boolean + isClosed: true, + + // isLoaded: Boolean + isLoaded: false, + + // useActiveX: Boolean + // whether to use the active-x object in IE + useActiveX: false, + + // relativeImageUrls: Boolean + // whether to use relative URLs for images - if this is enabled + // images will be given absolute URLs when inside the editor but + // will be changed to use relative URLs (to the current page) on save + relativeImageUrls: false, + + // _SEPARATOR: String + // used to concat contents from multiple textareas into a single string + _SEPARATOR: "@@**%%__RICHTEXTBOUNDRY__%%**@@", + + // onLoadDeferred: dojo.Deferred + // deferred that can be used to connect to the onLoad function. This + // will only be set if dojo.Deferred is required + onLoadDeferred: null, + + /* Init + *******/ + + fillInTemplate: function(){ + // summary: see dojo.widget.DomWidget + dojo.event.topic.publish("dojo.widget.RichText::init", this); + this.open(); + + + // backwards compatibility, needs to be removed + dojo.event.connect(this, "onKeyPressed", this, "afterKeyPress"); + dojo.event.connect(this, "onKeyPress", this, "keyPress"); + dojo.event.connect(this, "onKeyDown", this, "keyDown"); + dojo.event.connect(this, "onKeyUp", this, "keyUp"); + + this.setupDefaultShortcuts(); + }, + + setupDefaultShortcuts: function(){ + // summary: add some default key handlers + // description: + // Overwrite this to setup your own handlers. The default + // implementation does not use Editor2 commands, but directly + // executes the builtin commands within the underlying browser + // support. + var ctrl = this.KEY_CTRL; + var exec = function (cmd, arg) { + return arguments.length == 1 ? function () { this.execCommand(cmd); } : + function () { this.execCommand(cmd, arg); } + } + this.addKeyHandler("b", ctrl, exec("bold")); + this.addKeyHandler("i", ctrl, exec("italic")); + this.addKeyHandler("u", ctrl, exec("underline")); + this.addKeyHandler("a", ctrl, exec("selectall")); + this.addKeyHandler("s", ctrl, function () { this.save(true); }); + + this.addKeyHandler("1", ctrl, exec("formatblock", "h1")); + this.addKeyHandler("2", ctrl, exec("formatblock", "h2")); + this.addKeyHandler("3", ctrl, exec("formatblock", "h3")); + this.addKeyHandler("4", ctrl, exec("formatblock", "h4")); + + this.addKeyHandler("\\", ctrl, exec("insertunorderedlist")); + if(!dojo.render.html.ie){ + this.addKeyHandler("Z", ctrl, exec("redo")); + } + }, + + // events: Array + // events which should be connected to the underlying editing area + events: ["onBlur", "onFocus", "onKeyPress", "onKeyDown", "onKeyUp", "onClick"], + + /** + * Transforms the node referenced in this.domNode into a rich text editing + * node. This can result in the creation and replacement with an