svn commit: r831503 [9/17] - in /ofbiz/branches/addbirt: framework/ framework/base/config/ framework/birt/ framework/birt/build/ framework/birt/build/classes/ framework/birt/build/classes/org/ framework/birt/build/classes/org/ofbiz/ framework/birt/buil...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r831503 [9/17] - in /ofbiz/branches/addbirt: framework/ framework/base/config/ framework/birt/ framework/birt/build/ framework/birt/build/classes/ framework/birt/build/classes/org/ framework/birt/build/classes/org/ofbiz/ framework/birt/buil...

hansbak-2
Added: ofbiz/branches/addbirt/framework/birt/webapp/birt/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/birt/webapp/birt/WEB-INF/web.xml?rev=831503&view=auto
==============================================================================
--- ofbiz/branches/addbirt/framework/birt/webapp/birt/WEB-INF/web.xml (added)
+++ ofbiz/branches/addbirt/framework/birt/webapp/birt/WEB-INF/web.xml Sat Oct 31 01:22:47 2009
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+<!--
+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.
+-->
+
+<web-app>
+    <display-name>Open For Business - BIRT Component</display-name>
+    <description>BIRT Component of the Open For Business Project</description>
+    
+    <context-param>
+        <param-name>webSiteId</param-name>
+        <param-value>BIRT</param-value>
+        <description>A unique ID used to look up the WebSite entity</description>
+    </context-param>
+    <context-param>
+        <param-name>localDispatcherName</param-name><param-value>birt</param-value>
+        <description>A unique name used to identify/recognize the local dispatcher for the Service Engine</description>
+    </context-param>    
+    <context-param>
+        <param-name>entityDelegatorName</param-name><param-value>default</param-value>
+        <description>The Name of the Entity Delegator to use, defined in entityengine.xml</description>
+    </context-param>
+    <context-param>
+        <param-name>mainDecoratorLocation</param-name>
+        <param-value>component://birt/widget/CommonScreens.xml</param-value>
+        <description>The location of the main-decorator screen to use for this webapp; referred to as a context variable in screen def XML files.</description>
+    </context-param>
+    <context-param>
+        <param-name>widgetVerbose</param-name>
+        <param-value>false</param-value>
+        <description>Enable widget boundary comments. See org.ofbiz.widget.ModelWidget.widgetBoundaryCommentsEnabled().</description>
+    </context-param>
+    <context-param>
+        <param-name>compressHTML</param-name>
+        <param-value>false</param-value>
+        <description>Remove unnecessary whitespace from HTML output.</description>
+    </context-param>
+    
+    <!-- Default locale setting.-->
+    <context-param>
+        <param-name>BIRT_VIEWER_LOCALE</param-name>
+        <param-value>en-US</param-value>
+    </context-param>
+    
+    <!--
+        Default timezone setting.
+        Examples: "Europe/Paris", "GMT+1".
+        Defaults to the container's timezone.      
+     -->
+    <context-param>
+        <param-name>BIRT_VIEWER_TIMEZONE</param-name>
+        <param-value></param-value>
+    </context-param>
+    
+    <!--
+        Report resources directory for preview. Defaults to ${birt home}
+    -->
+    <context-param>
+        <param-name>BIRT_VIEWER_WORKING_FOLDER</param-name>
+        <param-value>${ofbiz.home}/runtime/tempfiles</param-value>
+    </context-param>
+    
+    <!--
+        Temporary document files directory. Defaults to ${birt home}/documents
+    -->
+    <context-param>
+        <param-name>BIRT_VIEWER_DOCUMENT_FOLDER</param-name>
+        <param-value>${ofbiz.home}/runtime/tempfiles/documents</param-value>
+    </context-param>
+    
+    <!--
+        Flag whether the report resources can only be accessed under the
+        working folder. Defaults to true
+    -->
+    <context-param>
+        <param-name>WORKING_FOLDER_ACCESS_ONLY</param-name>
+        <param-value>true</param-value>
+    </context-param>
+    
+    <!--
+        Temporary image/chart directory. Defaults to ${birt home}/report/images
+    -->
+    <context-param>
+        <param-name>BIRT_VIEWER_IMAGE_DIR</param-name>
+        <param-value>${ofbiz.home}/runtime/tempfiles/images</param-value>
+    </context-param>
+    
+    <!-- Engine log directory. Defaults to ${birt home}/logs -->
+    <context-param>
+        <param-name>BIRT_VIEWER_LOG_DIR</param-name>
+        <param-value>${ofbiz.home}/runtime/logs</param-value>
+    </context-param>
+    
+    <!-- Report engine log level -->
+    <context-param>
+        <param-name>BIRT_VIEWER_LOG_LEVEL</param-name>
+        <param-value>WARNING</param-value>
+    </context-param>
+    
+    <!--
+        Directory where to store all the birt report script libraries (JARs).
+        Defaults to ${birt home}/scriptlib
+    -->
+    <context-param>
+        <param-name>BIRT_VIEWER_SCRIPTLIB_DIR</param-name>
+        <param-value></param-value>
+    </context-param>
+    
+    <!-- Resource location directory. Defaults to ${birt home} -->
+    <context-param>
+        <param-name>BIRT_RESOURCE_PATH</param-name>
+        <param-value>${ofbiz.home}/runtime/tempfiles</param-value>
+    </context-param>
+    
+    <!-- Preview report rows limit. An empty value means no limit. -->
+    <context-param>
+        <param-name>BIRT_VIEWER_MAX_ROWS</param-name>
+        <param-value></param-value>
+    </context-param>
+    
+    <!--
+        Max cube fetch levels limit for report preview (Only used when
+        previewing a report design file using the preview pattern)
+    -->
+    <context-param>
+        <param-name>BIRT_VIEWER_MAX_CUBE_ROWLEVELS</param-name>
+        <param-value></param-value>
+    </context-param>
+    <context-param>
+        <param-name>BIRT_VIEWER_MAX_CUBE_COLUMNLEVELS</param-name>
+        <param-value></param-value>
+    </context-param>
+
+    <!-- Memory size in MB for creating a cube. -->
+    <context-param>
+        <param-name>BIRT_VIEWER_CUBE_MEMORY_SIZE</param-name>
+        <param-value></param-value>
+    </context-param>
+
+    <!-- Defines the BIRT viewer configuration file -->
+    <context-param>
+        <param-name>BIRT_VIEWER_CONFIG_FILE</param-name>
+        <param-value>WEB-INF/viewer.properties</param-value>
+    </context-param>
+
+    <!--
+        Flag whether to allow server-side printing. Possible values are "ON"
+        and "OFF". Defaults to "ON".
+    -->
+    <context-param>
+        <param-name>BIRT_VIEWER_PRINT_SERVERSIDE</param-name>
+        <param-value>ON</param-value>
+    </context-param>
+
+    <!--
+        Flag whether to force browser-optimized HTML output. Defaults to true
+    -->
+    <context-param>
+        <param-name>HTML_ENABLE_AGENTSTYLE_ENGINE</param-name>
+        <param-value>true</param-value>
+    </context-param>
+
+    <!--
+        Filename generator class/factory to use for the exported reports.
+    -->
+    <context-param>
+        <param-name>BIRT_FILENAME_GENERATOR_CLASS</param-name>
+        <param-value>org.eclipse.birt.report.utility.filename.DefaultFilenameGenerator</param-value>
+    </context-param>
+    
+    <filter>
+        <filter-name>ContextFilter</filter-name>
+        <display-name>ContextFilter</display-name>
+        <filter-class>org.ofbiz.webapp.control.ContextFilter</filter-class>
+        <init-param><param-name>disableContextSecurity</param-name><param-value>N</param-value></init-param>
+        <init-param>
+            <param-name>allowedPaths</param-name>
+            <param-value>/control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images:/includes/maincss.css:/frameset:/preview:/webcontent:/CancelTask.jsp</param-value>
+        </init-param>
+        <init-param><param-name>errorCode</param-name><param-value>403</param-value></init-param>
+        <init-param><param-name>redirectPath</param-name><param-value>/control/main</param-value></init-param>        
+    </filter>
+    <!--
+        Viewer Filter used to set the request character encoding to UTF-8.
+    -->
+    <filter>
+        <filter-name>ViewerFilter</filter-name>
+        <filter-class>org.eclipse.birt.report.filter.ViewerFilter</filter-class>
+    </filter>
+    
+    <filter-mapping><filter-name>ContextFilter</filter-name><url-pattern>/*</url-pattern></filter-mapping>
+    <filter-mapping>
+        <filter-name>ViewerFilter</filter-name>
+        <servlet-name>ViewerServlet</servlet-name>
+    </filter-mapping>
+    <filter-mapping>
+        <filter-name>ViewerFilter</filter-name>
+        <servlet-name>EngineServlet</servlet-name>
+    </filter-mapping>
+
+    <listener><listener-class>org.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
+    <listener><listener-class>org.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
+    <!-- NOTE: not all app servers support mounting implementations of the HttpSessionActivationListener interface -->
+    <!-- <listener><listener-class>org.ofbiz.webapp.control.ControlActivationEventListener</listener-class></listener> -->
+
+    <!-- Viewer HttpSession Listener -->
+    <listener>
+        <listener-class>org.eclipse.birt.report.listener.ViewerHttpSessionListener</listener-class>
+    </listener>
+  
+    <servlet>
+        <servlet-name>ControlServlet</servlet-name>
+        <display-name>ControlServlet</display-name>
+        <description>Main Control Servlet</description>
+        <servlet-class>org.ofbiz.webapp.control.ControlServlet</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+    <!-- Viewer Servlet, Supports SOAP -->
+    <servlet>
+        <servlet-name>ViewerServlet</servlet-name>
+        <servlet-class>org.ofbiz.birt.report.servlet.BirtViewerServlet</servlet-class>
+    </servlet>
+    <!-- Engine Servlet -->
+    <servlet>
+        <servlet-name>EngineServlet</servlet-name>
+        <servlet-class>org.ofbiz.birt.report.servlet.BirtEngineServlet</servlet-class>
+    </servlet>
+    <servlet-mapping><servlet-name>ControlServlet</servlet-name><url-pattern>/control/*</url-pattern></servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>ViewerServlet</servlet-name>
+        <url-pattern>/frameset</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>EngineServlet</servlet-name>
+        <url-pattern>/preview</url-pattern>
+    </servlet-mapping>
+
+    <session-config><session-timeout>60</session-timeout><!-- in minutes --></session-config>
+
+    <welcome-file-list>
+        <welcome-file>index.jsp</welcome-file>
+        <welcome-file>index.html</welcome-file>
+        <welcome-file>index.htm</welcome-file>
+    </welcome-file-list>
+</web-app>

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: ofbiz/branches/addbirt/framework/birt/webapp/birt/birt/report.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/birt/webapp/birt/birt/report.ftl?rev=831503&view=auto
==============================================================================
--- ofbiz/branches/addbirt/framework/birt/webapp/birt/birt/report.ftl (added)
+++ ofbiz/branches/addbirt/framework/birt/webapp/birt/birt/report.ftl Sat Oct 31 01:22:47 2009
@@ -0,0 +1,30 @@
+<#--
+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.
+-->
+
+<#assign birt = JspTaglibs["/WEB-INF/birt.tld"]/>
+
+<@birt.report id="birtReport"
+    reportDesign="component://birt/webapp/birt/report/product.rptdesign"
+    baseURL="/birt"
+    height="700"
+    width="900"
+    format="html"
+    isHostPage="false"
+    pageNum="2">
+</@birt.report>
\ No newline at end of file

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/birt/report.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/birt/report.ftl
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/birt/report.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/branches/addbirt/framework/birt/webapp/birt/birt/viewer.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/birt/webapp/birt/birt/viewer.ftl?rev=831503&view=auto
==============================================================================
--- ofbiz/branches/addbirt/framework/birt/webapp/birt/birt/viewer.ftl (added)
+++ ofbiz/branches/addbirt/framework/birt/webapp/birt/birt/viewer.ftl Sat Oct 31 01:22:47 2009
@@ -0,0 +1,28 @@
+<#--
+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.
+-->
+
+<#assign birt = JspTaglibs["/WEB-INF/birt.tld"]/>
+
+<@birt.viewer id="birtViewer"
+    reportDesign="component://birt/webapp/birt/report/product.rptdesign"
+    baseURL="/birt"
+    height="700"
+    width="900"
+    format="html">
+</@birt.viewer>

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/birt/viewer.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/birt/viewer.ftl
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/birt/viewer.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/branches/addbirt/framework/birt/webapp/birt/error/error.jsp
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/birt/webapp/birt/error/error.jsp?rev=831503&view=auto
==============================================================================
--- ofbiz/branches/addbirt/framework/birt/webapp/birt/error/error.jsp (added)
+++ ofbiz/branches/addbirt/framework/birt/webapp/birt/error/error.jsp Sat Oct 31 01:22:47 2009
@@ -0,0 +1,52 @@
+<%--
+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.
+--%>
+<%@ page import="org.ofbiz.base.util.*" %>
+<html>
+<head>
+<title>Open For Business Message</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<% String errorMsg = (String) request.getAttribute("_ERROR_MESSAGE_"); %>
+
+<body bgcolor="#FFFFFF">
+<div align="center">
+  <br/>
+  <table width="100%" border="1" height="200">
+    <tr>
+      <td>
+        <table width="100%" border="0" height="200">
+          <tr bgcolor="#CC6666">
+            <td height="45">
+              <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="4" color="#FFFFFF"><b>:ERROR MESSAGE:</b></font></div>
+            </td>
+          </tr>
+          <tr>
+            <td>
+              <div align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><%=UtilFormatOut.replaceString(errorMsg, "\n", "<br/>")%></font></div>
+            </td>
+          </tr>
+        </table>
+      </td>
+    </tr>
+  </table>
+</div>
+<div align="center"></div>
+</body>
+</html>

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/error/error.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/error/error.jsp
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/error/error.jsp
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/branches/addbirt/framework/birt/webapp/birt/index.jsp
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/birt/webapp/birt/index.jsp?rev=831503&view=auto
==============================================================================
--- ofbiz/branches/addbirt/framework/birt/webapp/birt/index.jsp (added)
+++ ofbiz/branches/addbirt/framework/birt/webapp/birt/index.jsp Sat Oct 31 01:22:47 2009
@@ -0,0 +1,19 @@
+<%--
+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.
+--%>
+<%response.sendRedirect("control/main");%>

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/index.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/index.jsp
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/index.jsp
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/branches/addbirt/framework/birt/webapp/birt/report/product.rptdesign
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/birt/webapp/birt/report/product.rptdesign?rev=831503&view=auto
==============================================================================
--- ofbiz/branches/addbirt/framework/birt/webapp/birt/report/product.rptdesign (added)
+++ ofbiz/branches/addbirt/framework/birt/webapp/birt/report/product.rptdesign Sat Oct 31 01:22:47 2009
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.20" id="1">
+    <property name="createdBy">Eclipse BIRT Designer Version 2.5.1.v20090903 Build &lt;2.5.1.v20090917-1447></property>
+    <property name="units">in</property>
+    <method name="initialize"><![CDATA[importPackage(Packages.org.ofbiz.base.util)
+
+module = "product.rptdesign";]]></method>
+    <property name="iconFile">/templates/blank_report.gif</property>
+    <property name="bidiLayoutOrientation">ltr</property>
+    <data-sources>
+        <script-data-source name="OFBiz" id="8"/>
+    </data-sources>
+    <data-sets>
+        <script-data-set name="Product" id="9">
+            <list-property name="resultSetHints">
+                <structure>
+                    <property name="position">0</property>
+                    <property name="name">productId</property>
+                    <property name="dataType">string</property>
+                </structure>
+                <structure>
+                    <property name="position">1</property>
+                    <property name="name">productTypeId</property>
+                    <property name="dataType">string</property>
+                </structure>
+                <structure>
+                    <property name="position">2</property>
+                    <property name="name">internalName</property>
+                    <property name="dataType">string</property>
+                </structure>
+            </list-property>
+            <list-property name="columnHints">
+                <structure>
+                    <property name="columnName">productId</property>
+                    <text-property name="displayName">productId</text-property>
+                </structure>
+                <structure>
+                    <property name="columnName">productTypeId</property>
+                    <text-property name="displayName">productTypeId</text-property>
+                </structure>
+                <structure>
+                    <property name="columnName">internalName</property>
+                    <text-property name="displayName">internalName</text-property>
+                </structure>
+            </list-property>
+            <structure name="cachedMetaData">
+                <list-property name="resultSet">
+                    <structure>
+                        <property name="position">1</property>
+                        <property name="name">productId</property>
+                        <property name="dataType">string</property>
+                    </structure>
+                    <structure>
+                        <property name="position">2</property>
+                        <property name="name">productTypeId</property>
+                        <property name="dataType">string</property>
+                    </structure>
+                    <structure>
+                        <property name="position">3</property>
+                        <property name="name">internalName</property>
+                        <property name="dataType">string</property>
+                    </structure>
+                </list-property>
+            </structure>
+            <property name="dataSource">OFBiz</property>
+            <method name="open"><![CDATA[products = null;
+try {
+    products = delegator.findAll("Product");
+} catch (e) {
+    Debug.logError(e, module);
+}
+totalRow = 0;
+countOfRow = 0;
+if (products) {
+    totalRow = products.size();
+}]]></method>
+            <method name="fetch"><![CDATA[if (countOfRow == totalRow - 1) return false;
+
+product = products.get(countOfRow);
+productId = product.getString("productId");
+productTypeId = product.getString("productTypeId");
+internalName = product.getString("internalName");
+
+row["productId"] = productId;
+row["productTypeId"] = productTypeId;
+row["internalName"] = internalName;
+
+countOfRow ++;
+return true;]]></method>
+        </script-data-set>
+    </data-sets>
+    <styles>
+        <style name="report" id="4">
+            <property name="fontFamily">sans-serif</property>
+            <property name="fontSize">10pt</property>
+        </style>
+        <style name="crosstab-cell" id="5">
+            <property name="borderBottomColor">#CCCCCC</property>
+            <property name="borderBottomStyle">solid</property>
+            <property name="borderBottomWidth">1pt</property>
+            <property name="borderLeftColor">#CCCCCC</property>
+            <property name="borderLeftStyle">solid</property>
+            <property name="borderLeftWidth">1pt</property>
+            <property name="borderRightColor">#CCCCCC</property>
+            <property name="borderRightStyle">solid</property>
+            <property name="borderRightWidth">1pt</property>
+            <property name="borderTopColor">#CCCCCC</property>
+            <property name="borderTopStyle">solid</property>
+            <property name="borderTopWidth">1pt</property>
+        </style>
+        <style name="crosstab" id="6">
+            <property name="borderBottomColor">#CCCCCC</property>
+            <property name="borderBottomStyle">solid</property>
+            <property name="borderBottomWidth">1pt</property>
+            <property name="borderLeftColor">#CCCCCC</property>
+            <property name="borderLeftStyle">solid</property>
+            <property name="borderLeftWidth">1pt</property>
+            <property name="borderRightColor">#CCCCCC</property>
+            <property name="borderRightStyle">solid</property>
+            <property name="borderRightWidth">1pt</property>
+            <property name="borderTopColor">#CCCCCC</property>
+            <property name="borderTopStyle">solid</property>
+            <property name="borderTopWidth">1pt</property>
+        </style>
+    </styles>
+    <page-setup>
+        <simple-master-page name="Simple MasterPage" id="2">
+            <page-footer>
+                <text id="3">
+                    <property name="contentType">html</property>
+                    <text-property name="content"><![CDATA[<value-of>new Date()</value-of>]]></text-property>
+                </text>
+            </page-footer>
+        </simple-master-page>
+    </page-setup>
+    <body>
+        <table id="10">
+            <property name="dataSet">Product</property>
+            <list-property name="boundDataColumns">
+                <structure>
+                    <property name="name">productId</property>
+                    <text-property name="displayName">productId</text-property>
+                    <expression name="expression">dataSetRow["productId"]</expression>
+                    <property name="dataType">string</property>
+                </structure>
+                <structure>
+                    <property name="name">productTypeId</property>
+                    <text-property name="displayName">productTypeId</text-property>
+                    <expression name="expression">dataSetRow["productTypeId"]</expression>
+                    <property name="dataType">string</property>
+                </structure>
+                <structure>
+                    <property name="name">internalName</property>
+                    <text-property name="displayName">internalName</text-property>
+                    <expression name="expression">dataSetRow["internalName"]</expression>
+                    <property name="dataType">string</property>
+                </structure>
+            </list-property>
+            <column id="29"/>
+            <column id="30"/>
+            <column id="31"/>
+            <header>
+                <row id="11">
+                    <property name="backgroundColor">#BFBFBF</property>
+                    <property name="fontWeight">bold</property>
+                    <property name="textAlign">center</property>
+                    <cell id="12">
+                        <label id="13">
+                            <text-property name="text">productId</text-property>
+                        </label>
+                    </cell>
+                    <cell id="14">
+                        <label id="15">
+                            <text-property name="text">productTypeId</text-property>
+                        </label>
+                    </cell>
+                    <cell id="16">
+                        <label id="17">
+                            <text-property name="text">internalName</text-property>
+                        </label>
+                    </cell>
+                </row>
+            </header>
+            <detail>
+                <row id="18">
+                    <cell id="19">
+                        <data id="20">
+                            <property name="resultSetColumn">productId</property>
+                        </data>
+                    </cell>
+                    <cell id="21">
+                        <data id="22">
+                            <property name="resultSetColumn">productTypeId</property>
+                        </data>
+                    </cell>
+                    <cell id="23">
+                        <data id="24">
+                            <property name="resultSetColumn">internalName</property>
+                        </data>
+                    </cell>
+                </row>
+            </detail>
+            <footer>
+                <row id="25">
+                    <cell id="26"/>
+                    <cell id="27"/>
+                    <cell id="28"/>
+                </row>
+            </footer>
+        </table>
+    </body>
+</report>

Added: ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtCommunicationManager.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtCommunicationManager.js?rev=831503&view=auto
==============================================================================
--- ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtCommunicationManager.js (added)
+++ ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtCommunicationManager.js Sat Oct 31 01:22:47 2009
@@ -0,0 +1,121 @@
+/******************************************************************************
+ * Copyright (c) 2004 Actuate Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Actuate Corporation - Initial implementation.
+ *****************************************************************************/
+
+/**
+ * BirtCommunicationManager
+ * ...
+ */
+BirtCommunicationManager = Class.create( );
+
+BirtCommunicationManager.prototype =
+{
+ __active : false,
+
+ /**
+ * Initialization routine required by "ProtoType" lib.
+ *
+ * @return, void
+ */
+ initialize: function( )
+ {
+ },
+
+ /**
+ * Make xml http request.
+ *
+ * return, void
+ */
+ connect: function( )
+ {
+ var xmlDoc = birtSoapRequest.__xml_document;
+
+ if( xmlDoc )
+ {
+ debug( birtSoapRequest.prettyPrintXML(xmlDoc), true);
+ if ( BrowserUtility.isSafari || BrowserUtility.isFirefox3 )
+ {
+ // WORKAROUND: sending the XML DOM doesn't replace the
+ // ampersands properly but the XMLSerializer does.
+ xmlDoc = (new XMLSerializer()).serializeToString(xmlDoc);
+ }
+ }
+
+ if ( !birtSoapRequest.getURL( ) ) return;
+
+ //activate delay message manager;
+ this.__active = true;
+ birtProgressBar.__start( );
+
+ //workaround for Bugzilla Bug 144598. Add request header "Connection" as "keep-alive"
+ var myAjax = new Ajax.Request( birtSoapRequest.getURL( ), { method: 'post', postBody: xmlDoc,
+ onSuccess: this.responseHandler, onFailure: this.invalidResponseHandler,
+ requestHeaders: ['Content-Type', 'text/xml; charset=UTF-8', 'SOAPAction', '""', 'request-type', 'SOAP', 'Connection', 'keep-alive' ] } );
+
+ birtSoapRequest.reset( );
+ },
+
+ /**
+ * Callback function triggered when reponse is ready, status is 200.
+ *
+ * @request, httpXmlRequest instance
+ * @return, void
+ */
+ responseHandler: function( request )
+ {
+ if ( isDebugging( ) )
+ {
+ debug(request.responseText, true);
+ debug(birtSoapRequest.prettyPrintXML(request.responseXML.documentElement), true);
+ }
+
+ if ( request.responseXML && request.responseXML.documentElement )
+ {
+ birtSoapResponse.process( request.responseXML.documentElement );
+ }
+
+ birtCommunicationManager.postProcess( );
+ //todo handle responseText
+ },
+
+ /**
+ * Callback function triggered when reponse is ready status is not 200.
+ * Process any http (non-200) errors. Note this is not exception from
+ * server side.
+ *
+ * @request, httpXmlRequest instance
+ * @return, void
+ */
+ invalidResponseHandler: function( request )
+ {
+ debug("invalid response");
+
+ if ( request.responseXML && request.responseXML.documentElement )
+ {
+ birtSoapResponse.process( request.responseXML.documentElement );
+ }
+
+ birtCommunicationManager.postProcess( );
+ },
+
+ /**
+ * Post process after finish processing the response.
+ *
+ * @return, void
+ */
+ postProcess: function( )
+ {
+    //deactivate delay message manager
+ birtProgressBar.__stop( );
+    this.__active = false;
+ }
+}
+
+var birtCommunicationManager = new BirtCommunicationManager( );
\ No newline at end of file

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtCommunicationManager.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtCommunicationManager.js
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtCommunicationManager.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtDndManager.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtDndManager.js?rev=831503&view=auto
==============================================================================
--- ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtDndManager.js (added)
+++ ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtDndManager.js Sat Oct 31 01:22:47 2009
@@ -0,0 +1,331 @@
+/******************************************************************************
+ * Copyright (c) 2004 Actuate Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Actuate Corporation - Initial implementation.
+ *****************************************************************************/
+
+BirtDndManager = function( ) {
+
+ //An item is dragging
+this.isDragging = false;
+
+};
+
+BirtDndManager.prototype = {
+
+ __dropTargetManager: null, //PRIVATE - extending classes must use accessor method
+
+ __mousemoveHandlerFunction: null,
+
+ __dropHandlerFunction: null,
+
+ currentDropTarget: null, //Element that is the current valid drop target
+
+ currentDragElement: null, //Element that is currently being dragged
+
+
+ /**
+ Extending classes should use this method to set the drop target manager if
+ custom drop behavior is desired
+ @param {DropTargetManager}
+ */
+ setDropTargetManager: function( dTargetManager)
+ {
+ this.__dropTargetManager = dTargetManager;
+ },
+
+ /**
+ Drop targets call this method to register as accepting "dragType" items
+ */
+ addAssociation: function(dragType, targetHtmlId, target)
+ {
+ if(this.__dropTargetManager == null)
+ {
+ throw new WRError("BirtDndManager", "DropTargetManager not set");
+ }
+ this.__dropTargetManager.addAssociation(dragType, targetHtmlId, target);
+ },
+
+ /**
+ Delete an association when the corresponding html element is removed
+ @param dragType
+ @param dropTargetId id attribute of html element to remove
+ */
+ deleteAssociation: function(dragType, htmlId)
+ {
+ if(this.__dropTargetManager == null)
+ {
+ throw new WRError("BirtDndManager", "DropTargetManager not set");
+ }
+ this.__dropTargetManager.deleteAssociation(dragType, htmlId);
+ },
+
+ /**
+ startDrag redefines itself the first time it is called based on the desired type of drag drop behavior.<b>
+ */
+ startDrag: function(element, event, dragType)
+ {
+ //If there is no drop target manager, define startDrag as default
+ if(this.__dropTargetManager == null)
+ {
+ this.startDrag = this.__getDefaultStartDrag();
+ }
+ else
+ {
+ this.startDrag = this.__getCustomStartDrag();
+ }
+ this.startDrag(element, event, dragType);
+ },
+
+ /**
+ Default start drag function handles elements that drag but do not have drop targets
+ @returns {function} default start drag function
+ */
+ __getDefaultStartDrag: function()
+ {
+ return function(element, event, dragType)
+ {
+ debug("default startDrag");
+ if(!this.isDragging)
+ {
+ this.eventMouseout = this.elementMouseout.bindAsEventListener(this);
+
+ this.__mousemoveHandlerFunction = this.__moveElement.bindAsEventListener(this);
+ this.__dropElementFunction = this.__dropElement.bindAsEventListener(this);
+
+ var zIndex = this.__activateDragMask();
+ this.__elementSetUp(element, event, zIndex);
+ this.__startDragObservers(this.__mousemoveHandlerFunction, this.__dropElementFunction);
+ }
+ this.isDragging = true;
+ }
+ },
+
+ /**
+ Custom start drag function handles elements that have drop targets
+ @returns {function} custome start drag function
+ */
+ __getCustomStartDrag: function()
+ {
+ return function(element, event, dragType)
+ {
+ debug("custom startDrag");
+ if(!this.isDragging)
+ {
+
+ if(dragType == null) //There are no drop targets
+ {
+ this.__mousemoveHandlerFunction = this.__moveElement.bindAsEventListener(this);
+ this.__dropElementFunction = this.__dropElement.bindAsEventListener(this);
+ }
+ else
+ {
+ this.__dropTargetManager.setUpForDrag(dragType);
+ this.__mousemoveHandlerFunction = this.__moveElementWithTarget.bindAsEventListener(this);
+ this.__dropElementFunction = this.__dropElementWithTarget.bindAsEventListener(this);
+ }
+ this.eventMouseout = this.elementMouseout.bindAsEventListener(this);
+
+ var zIndex = this.__activateDragMask();
+ this.__elementSetUp(element, event, zIndex);
+ this.__startDragObservers(this.__mousemoveHandlerFunction, this.__dropElementFunction);
+ }
+ this.isDragging = true;
+ }
+ },
+
+ __activateDragMask: function()
+ {
+ return Mask.show();
+ },
+
+ __deactivateDragMask: function()
+ {
+ Mask.hide();
+ },
+
+ /**
+ Set up an element to be dragged
+ */
+ __elementSetUp: function(elem, event, zIndex)
+ {
+ //TODO if removing selections is kept, move to utility funciton
+ //remove any existing selections
+ if(document.selection)
+ {
+ document.selection.empty();
+ }
+ else if(window.getSelection)
+ {
+ var selection = window.getSelection();
+ if(selection)
+ {
+ selection.removeAllRanges();
+ }
+ }
+
+ this.currentDragElement = elem;
+ this.currentDragElement.oldZIndex = this.currentDragElement.style.zIndex;
+ this.currentDragElement.style.zIndex = zIndex;
+ this.currentDropTarget = null;
+ //Location of mouse
+ var mouseX = Event.pointerX(event);
+ var mouseY = Event.pointerY(event);
+ //Distance from the edge of the element to edge of browser
+ var offsets = Position.cumulativeOffset(elem);
+ //Distance from the edge of the element of mouse
+ elem.offsetX =  (mouseX - offsets[0]);
+ elem.offsetY =  (mouseY - offsets[1]);
+
+ //Used for revert effect
+ elem.originalTop = parseInt(elem.style.top || '0');
+ elem.originalLeft = parseInt(elem.style.left || '0');
+ },
+
+ /**
+ Start drag event observing
+ */
+ __startDragObservers: function(mousemoveHandlerFunction, dropHandlerFunction)
+ {
+ Event.observe(document, "mousemove", mousemoveHandlerFunction, false);
+ Event.observe(document, "mouseup", dropHandlerFunction, false);
+ },
+
+ /**
+ Move element
+ */
+ __moveElement: function(event)
+ {
+ var xPos = Event.pointerX(event);
+ var yPos = Event.pointerY(event);
+
+ this.__moveCurrentDragElement(xPos, yPos);
+ },
+
+ /**
+ Move element and use DropTargetManager to check if it can be dropped
+ */
+ __moveElementWithTarget: function(event)
+ {
+ var xPos = Event.pointerX(event);
+ var yPos = Event.pointerY(event);
+
+ this.__moveCurrentDragElement(xPos, yPos);
+
+ var oldDropTarget = this.currentDropTarget; //is the state changing?
+ var dropTarget = this.__dropTargetManager.getDropTarget(xPos, yPos);
+
+ //Change indicator to drop allowed
+ if(dropTarget)
+ {
+ this.currentDropTarget = dropTarget;
+ if(!oldDropTarget)
+ {
+ var nodes = this.currentDragElement.childNodes;
+ this.toggleDropIndicator(true, nodes);
+ }
+ }
+ else //Change indicator to drop forbidden
+ {
+ this.currentDropTarget = null;
+ if(oldDropTarget)
+ {
+ var nodes = this.currentDragElement.childNodes;
+ this.toggleDropIndicator(false, nodes);
+ }
+ }
+ },
+
+ __moveCurrentDragElement: function(x, y)
+ {
+ var offsets = Position.cumulativeOffset(this.currentDragElement);
+     //subtract the element's current left, top coordinates from the offsets
+    offsets[0] -= parseInt(this.currentDragElement.style.left || '0');
+    offsets[1] -= parseInt(this.currentDragElement.style.top || '0');
+        
+    var style = this.currentDragElement.style;
+    
+     //take current mouse position, subtract difference in drag object position, s
+    style.left = (x - offsets[0] - this.currentDragElement.offsetX) + "px";
+    style.top  = (y - offsets[1] - this.currentDragElement.offsetY) + "px";  
+ },
+
+ /**
+ Check if the mouse button is no longer pressed, if not, call
+ eventDropped. (IE specific)<b>
+ */
+ __mouseStillDown: function(event)
+ {
+ /**
+ Check that the mouse button is still down
+ (used to detect roll off the screen in IE)
+ */
+ //debug("check mouse down");
+ //TODO refine this Check that element is really moving
+ if(!event.which && event.button == "0")
+ {
+ this.eventDropped(event);
+ return true;
+ }
+ return false;
+ },
+
+
+ /**
+ Handle mouseout of drag element
+ */
+ elementMouseout: function(event)
+ {
+ //debug("mouseout");
+ var target = Event.element( event );
+ if(target.tagName.toLowerCase() == "iframe")
+ {
+ Event.stop(event);
+ this.eventDropped(event);
+ }
+
+ },
+
+ __dropElement: function(event)
+ {
+ this.isDragging = false;
+
+    Event.stopObserving(document, "mousemove", this.__mousemoveHandlerFunction);
+    Event.stopObserving(document, "mouseup", this.__dropElementFunction);
+    Event.stopObserving(document, "mouseout", this.eventMouseout);
+    this.__deactivateDragMask();
+ this.currentDragElement.style.zIndex = this.currentDragElement.oldZIndex;
+ },
+
+ __dropElementWithTarget: function(event)
+ {
+ this.__dropElement(event);
+    
+    this.__dropTargetManager.dropElementWithTarget(event, this.currentDragElement, this.currentDropTarget);
+ },
+
+    
+     /**
+     Toggle drop indicator to show if item can be dropped
+     @param accept {boolean} Indicates if item is accepted
+     @param nodes {Array} Potential imageHolder nodes //TODO once indicator is decided on can be made more efficient
+     */
+     toggleDropIndicator: function(accept, nodes)
+     {    
+ for(var j = 0 ; j < nodes.length ; j++)
+ {
+ if(nodes[j].imageHolder)
+ {
+ accept ? nodes[j].childNodes[0].style.display = "none" : nodes[j].childNodes[0].style.display = "block";
+ accept ? nodes[j].childNodes[1].style.display = "block" : nodes[j].childNodes[1].style.display = "none";
+ break;
+ }
+ }
+     }
+      
+}
\ No newline at end of file

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtDndManager.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtDndManager.js
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtDndManager.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtEvent.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtEvent.js?rev=831503&view=auto
==============================================================================
--- ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtEvent.js (added)
+++ ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtEvent.js Sat Oct 31 01:22:47 2009
@@ -0,0 +1,48 @@
+/******************************************************************************
+ * Copyright (c) 2004 Actuate Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Actuate Corporation - Initial implementation.
+ *****************************************************************************/
+
+/**
+ * BirtEvent
+ */
+BirtEvent = Class.create( );
+
+BirtEvent.prototype =
+{
+ __E_WARN : '__E_WARN',
+ __E_BLUR : '__E_BLUR', // Blur current selection.
+ __E_GETPAGE : '__E_GETPAGE', // Getting pagination page.
+ __E_GETPAGE_INIT : '__E_GETPAGE_INIT', // Getting pagination page with parameters.
+ __E_PRINT : '__E_PRINT', // Print event.
+ __E_PRINT_SERVER : '__E_PRINT_SERVER', // Print event.
+ __E_QUERY_EXPORT : '__E_QUERY_EXPORT',
+ __E_TOC : '__E_TOC',
+ __E_TOC_IMAGE_CLICK : '__E_TOC_IMAGE_CLICK',
+ __E_PARAMETER : '__E_PARAMETER',
+ __E_CHANGE_PARAMETER : '__E_CHANGE_PARAMETER',  //Change parameter event.
+ __E_CACHE_PARAMETER : '__E_CACHE_PARAMETER',  //Cache parameter event.
+ __E_CASCADING_PARAMETER : '__E_CASCADING_PARAMETER',  //Cascading parameter event.
+ __E_PDF : '__E_PDF', // Create pdf event.
+ __E_CANCEL_TASK : '__E_CANCEL_TASK', // Cancel current task event.
+ __E_GETPAGE_ALL : '__E_GETPAGE_ALL', // Get all pages.
+ __E_EXPORT_REPORT : '__E_EXPORT_REPORT', // Export report
+
+ /**
+ * Initialization routine required by "ProtoType" lib.
+ * Define available birt events.
+ *
+ * @return, void
+ */
+ initialize: function( )
+ {
+ }
+}
+
+var birtEvent = new BirtEvent( );
\ No newline at end of file

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtEvent.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtEvent.js
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtEvent.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtEventDispatcher.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtEventDispatcher.js?rev=831503&view=auto
==============================================================================
--- ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtEventDispatcher.js (added)
+++ ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtEventDispatcher.js Sat Oct 31 01:22:47 2009
@@ -0,0 +1,244 @@
+/******************************************************************************
+ * Copyright (c) 2004 Actuate Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Actuate Corporation - Initial implementation.
+ *****************************************************************************/
+
+/**
+ * BirtEventDispatcher
+ * ...
+ */
+BirtEventDispatcher = Class.create( );
+
+BirtEventDispatcher.prototype =
+{
+ __focusId : null,
+
+ __event_map : { },
+
+ /**
+ * Initialization routine required by "ProtoType" lib.
+ *
+ * @return, void
+ */
+ initialize : function( )
+ {
+ },
+
+ /**
+ * Register birt event handler with global birt event dispatcher to
+ * handle birt events (Not native events).
+ *
+ * @eventType, pre-defined birt event type
+ * @id, ui object id
+ * @handler, birt event handler
+ * @return, void
+ */
+ registerEventHandler : function( eventType, id, handler )
+ {
+    if ( !this.__event_map[eventType] )
+    {
+ this.__event_map[eventType] = { };
+    }
+    
+ this.__event_map[eventType][id] = handler;
+ },
+
+ /**
+ * Register birt event handler with global birt event dispatcher to
+ * handle birt events (Not native events).
+ *
+ * @eventType, pre-defined birt event type
+ * @id, ui object id
+ * @handler, birt event handler
+ * @return, void
+ */
+ unregisterEventHandler : function( eventType, id )
+ {
+ if( this.__event_map[eventType] && this.__event_map[eventType][id] )
+ {  
+ delete this.__event_map[eventType][id]; //deletes 'id' property
+ }
+ },
+
+ /**
+ Unregisters all handlers associated with a particular id
+ @param id ui object id
+ */
+ unregisterEventHandlerById : function( id )
+ {
+ debug(birtEventDispatcher.toString());
+ for( var eventType in this.__event_map)
+ {
+ if( this.__event_map[eventType][id])
+ {
+ delete this.__event_map[eventType][id]; //deletes 'id' property
+ }
+ }
+ debug(birtEventDispatcher.toString());
+ },
+
+ /**
+ * Register birt event handler with global birt event dispatcher to
+ * handle birt events (Not native events).
+ * If the event has already been registered under another handler,
+ *  replace that handler with new handler.
+ *
+ * @eventType, pre-defined birt event type
+ * @id, ui object id
+ * @handler, birt event handler
+ * @return, void
+ */
+ replaceEventHandler : function( eventType, id, handler )
+ {
+    if ( !this.__event_map[eventType] )
+    {
+ this.__event_map[eventType] = { };
+    }
+    else
+    {
+ for( var eventId in this.__event_map[eventType] )
+ {
+ delete this.__event_map[eventType][eventId]; //unregister previous event handler
+ }
+    }
+    
+ this.__event_map[eventType][id] = handler;
+ },
+
+ /**
+ * Fire birt event. Objects that is or is the child of current focused object are waken.
+ * Their registered event handlers are triggered.
+ *
+ * @eventType, pr-defined birt events.
+ * @object, event parameters.
+ * @return, void
+ */
+ fireEvent : function( eventType, object )
+ {
+ var handled = this.sendEvent( eventType, object, false );
+ if ( !handled )
+ {
+ this.broadcastEvent( birtEvent.__E_WARN );
+ }
+ },
+
+ /**
+ * Fire birt event. Objects that is or is the child of current focused object are waken.
+ * Their registered event handlers are triggered.
+ *
+ * @eventType, pr-defined birt events.
+ * @object, event parameters.
+ * @return, void
+ */
+ broadcastEvent : function( eventType, object )
+ {
+ this.sendEvent( eventType, object, true );
+ },
+
+ /**
+ * Fire birt event. Objects that is or is the child of current focused object are waken.
+ * Their registered event handlers are triggered.
+ *
+ * @eventType, pr-defined birt events.
+ * @object, event parameters.
+ * @return, void
+ */
+ sendEvent : function( eventType, object, isBroadcast )
+ {
+ var processed = false;
+ var serverCall = false;
+ var focus = this.__focusId ? this.__focusId : birtReportDocument.__instance.id;
+
+ for ( var id in this.__event_map[ eventType ] )
+ {
+ if ( !isBroadcast && focus && focus != id )
+ {
+ // TODO: need more complex scheme.
+ continue;
+ }
+
+ var handler = this.__event_map[ eventType ][ id ];
+ if ( handler )
+ {
+ processed = true;
+ }
+ if ( handler( id, object ) )
+ {
+ serverCall = true;
+ }
+ }
+
+ if( serverCall )
+ {
+ birtCommunicationManager.connect( );
+ }
+
+ return processed;
+ },
+
+ /**
+ * @param id id of current DOM element in focus.
+ */
+ setFocusId : function( id )
+ {
+ this.__focusId = id;
+ },
+
+ /**
+ * @return id id of current DOM element in focus.
+ */
+ getFocusId : function( )
+ {
+ return this.__focusId;
+ },
+
+ /**
+ * Convenience method.
+ *
+ * @param element current DOM element in focus, must have id
+ */
+ setFocusElement : function( element )
+ {
+ this.__focusId = element.id || null;
+ },
+
+ /**
+ * Convenience method.
+ *
+ * @return element current DOM element in focus
+ */
+ getFocusElement : function( )
+ {
+ return $( this.__focusId );
+ },
+
+
+ toString: function( )
+ {
+ var str = "";
+ str += "----start-------BirtEventDispatcher.toString------------";
+ str += "\n";
+ str += ("    focusId = " + this.__focusId);
+ for(var i in this.__event_map)
+ {
+ str += "\n";
+ str += ("    eventType = " + i);
+ for(var k in this.__event_map[i])
+ {
+ str += "\n";
+ str += ("        id = " + k);
+ }
+ }
+ str += "\n";
+ str += "------end-------BirtEventDispatcher.toString------------";
+ return str;
+ }
+}
+
+var birtEventDispatcher = new BirtEventDispatcher( );
\ No newline at end of file

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtEventDispatcher.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtEventDispatcher.js
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtEventDispatcher.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtSoapRequest.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtSoapRequest.js?rev=831503&view=auto
==============================================================================
--- ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtSoapRequest.js (added)
+++ ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtSoapRequest.js Sat Oct 31 01:22:47 2009
@@ -0,0 +1,356 @@
+/******************************************************************************
+ * Copyright (c) 2004 Actuate Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Actuate Corporation - Initial implementation.
+ *****************************************************************************/
+
+/**
+ * BirtSoapRequest
+ * ...
+ */
+BirtSoapRequest = Class.create( );
+
+BirtSoapRequest.prototype =
+{
+ SOAP_NAMESPACE_URI : "http://schemas.xmlsoap.org/soap/envelope/",
+ BIRT_NAMESPACE_URI : "http://schemas.eclipse.org/birt",
+
+ __url : null,
+ __message : null,
+ __xml_document : null,
+ __operation_content : null,
+
+ /**
+ * Initialization routine required by "ProtoType" lib.
+ *
+ * @return, void
+ */
+ initialize : function( )
+ {
+ /*
+   XML namespaces are supported by the following browsers :
+   - Firefox 2 and 3
+   - Safari 3
+   - Mozilla 1.7.13
+   Unsupported by:
+   - IE6 nor IE7
+ */
+ this.hasXmlNamespaceSupport = ( typeof( document.createElementNS ) != "undefined" );
+
+ this.reset();
+ },
+
+ /**
+ * Init the request message. There's only one request message DOM instance at any time,
+ * when client running.
+ *
+ * @message, request message DOM
+ * @return, void
+ */
+ setMessage : function( message )
+ {
+ // TODO: need to use dom contrcture the request.
+ this.__xml_document = message;
+ },
+
+ /**
+ * Retrieve the request message.
+ *
+ * @return, request message in DOM
+ */
+ getMessage : function( message )
+ {
+ return this.__message;
+ },
+
+ /**
+ * Retrieve the request message.
+ *
+ * @return, request message in DOM
+ */
+ setURL : function( url )
+ {
+ this.__url = url;
+ },
+
+ /**
+ * Retrieve the request message.
+ *
+ * @return, request message in DOM
+ */
+ getURL : function( )
+ {
+ return this.__url;
+ },
+
+ /**
+ * Clears the message body
+ */
+ reset : function( )
+ {
+ // Soap envelope
+ this.__xml_document = this.createXMLDom( this.SOAP_NAMESPACE_URI, "soap:Envelope" );
+
+ var soapEnv = this.__xml_document.documentElement;
+
+ // Soap body
+ var soapBody;
+
+ if ( this.hasXmlNamespaceSupport )
+ {
+ soapBody = this.__xml_document.createElementNS( this.SOAP_NAMESPACE_URI, "Body" );
+ }
+ else
+ {
+ soapBody = this.__xml_document.createElement( "soap:Body" );
+ }
+
+   soapEnv.appendChild( soapBody );
+  
+ // Get updated objects method
+ var getUpdatedObjects = this.createBirtElement( "GetUpdatedObjects" );
+ if ( !this.hasXmlNamespaceSupport )
+ {
+ // only the first element needs the xmlns attribute
+ getUpdatedObjects.setAttribute( "xmlns", this.BIRT_NAMESPACE_URI );
+ }
+
+   soapBody.appendChild( getUpdatedObjects );
+
+ this.__operation_content = getUpdatedObjects;
+
+ var str = this.prettyPrintXML( this.__xml_document.documentElement, false );
+ debug( "RESET XML : new message body is\n" + str );
+ },
+
+ /**
+ * Utility method to create an XML element in the birt namespace.
+ *
+ * @param qualifiedName qualified name
+ */
+ createBirtElement : function( qualifiedName )
+ {
+ if ( this.hasXmlNamespaceSupport )
+ {
+ return this.__xml_document.createElementNS( this.BIRT_NAMESPACE_URI, qualifiedName );
+ }
+ else
+ {
+ return this.__xml_document.createElement( qualifiedName );
+ }
+ },
+
+ /**
+ * Utility method creates an XML document.
+ *
+ * @param rootName the name of documentElement
+ * @return xmlDocument a new XML document
+ */
+ createXMLDom : function( namespaceUri, qualifiedName )
+ {
+ if ( document.implementation && document.implementation.createDocument )
+ {
+ // DOM Level 2 Browsers
+ var dom = document.implementation.createDocument( namespaceUri, qualifiedName, null );
+ if ( !dom.documentElement )
+ {
+ dom.appendChild( dom.createElement( qualifiedName ) );
+ }
+
+ return dom;
+ }
+ else if ( window.ActiveXObject )
+ {
+ // Internet Explorer
+ var createdDocument = new ActiveXObject( "Microsoft.XMLDOM" );
+ var documentElement = createdDocument.createElement( qualifiedName );
+ createdDocument.appendChild( documentElement );
+
+ // check for a namespace prefix
+ var namespacePrefix = null;
+ var nameParts = qualifiedName.split(":");
+ if ( nameParts.length > 0 )
+ {
+ namespacePrefix = nameParts[0];
+ qualifiedName = nameParts[1];
+ }
+
+ var nsAttribute = "xmlns";
+ if ( namespacePrefix )
+ {
+ nsAttribute += ":" + namespacePrefix;
+ }
+
+ documentElement.setAttribute( nsAttribute, namespaceUri );
+ return createdDocument;
+ }
+ else
+ {
+ throw "Unable to create new Document.";
+ }
+ },
+
+ /**
+ * Adds Operation type to message.
+ *
+ * @param id id of UIComponent
+ * @param operator name of desired operation (from Constants.js)
+ * @param data xmlElement type 'Data' or null if not applicable
+ * @param (optional) argument[1] - argument[n] object  {name: "paramName1", value: "paramValue1"}
+ */
+ addOperation : function( id, type, operator, data )
+ {
+ var optionalArgs = 4; //number of params
+ var operation = this.createBirtElement( "Operation" );
+
+   // Target
+   var target = this.createBirtElement( "Target" );
+   operation.appendChild( target );
+  
+   // Target id
+   var reportId = this.createBirtElement( "Id" );
+ target.appendChild( reportId );
+   var reportIdText = this.__xml_document.createTextNode( id || "Error-id" );
+ reportId.appendChild( reportIdText );
+
+   // Target type
+   var reportType = this.createBirtElement( "Type" );
+ target.appendChild( reportType );
+   var reportTypeText = this.__xml_document.createTextNode( type || "Error-id" );
+ reportType.appendChild( reportTypeText );
+
+ // Operator
+ var operatorEl = this.createBirtElement( "Operator" );
+ var targetText = this.__xml_document.createTextNode( operator || "Error-operator" );
+ operatorEl.appendChild( targetText );
+ operation.appendChild( operatorEl );
+
+ // Oprands
+ if( arguments.length > optionalArgs ) //there are optional parameters
+ {
+   var operand, name, value;
+   for( var i = optionalArgs; i < arguments.length; i++ )
+   {
+ if( arguments[i].length && arguments[i].length > 0 )
+ {
+ for( var j = 0; j < arguments[i].length; j++ )
+ {
+ if ( !arguments[i][j].name )
+ {
+ continue;
+ }
+
+ operand = this.createBirtElement( "Oprand" );
+ name = this.createBirtElement( "Name" );
+ nameText = this.__xml_document.createTextNode( arguments[i][j].name );
+ name.appendChild( nameText );
+ operand.appendChild( name );
+ value = this.createBirtElement( "Value" );
+ valueText = this.__xml_document.createTextNode( arguments[i][j].value );
+ value.appendChild( valueText );
+ operand.appendChild( value );
+ operation.appendChild( operand );
+ }
+ }
+ else
+ {
+ if ( arguments[i].name )
+ {
+ operand = this.createBirtElement( "Oprand" );
+ name = this.createBirtElement( "Name" );
+ nameText = this.__xml_document.createTextNode( arguments[i].name );
+ name.appendChild( nameText );
+ operand.appendChild( name );
+ value = this.createBirtElement( "Value" );
+ valueText = this.__xml_document.createTextNode( arguments[i].value );
+ value.appendChild( valueText );
+ operand.appendChild( value );
+ operation.appendChild( operand );
+ }
+ }
+ }
+   }
+  
+   // Data
+   if( data )
+   {
+   operation.appendChild( data.documentElement );
+   }
+  
+   this.__operation_content.appendChild( operation );
+  
+ var str = this.prettyPrintXML( this.__xml_document.documentElement, false );
+ debug( "ADDED OPERATION : new message body is\n" + str );
+ },
+
+ /**
+ * Creates string of xml, optionally prints to debug window.
+ *
+ * @param xmlRoot documentElement of xml Element
+ * @param str leave empty -- used in recursive call
+ * @param offset leave empty -- used in recursive call
+ * @return String with indented tree of elements and text contents
+ */
+ prettyPrintXML : function( xmlRoot, isDebug, str, offset )
+ {
+ if( !str )
+ {
+ str = "";
+ }
+
+ var myIndent = 6;
+ if( offset == null )
+ {
+ myIndent = 2;
+ }
+ else
+ {
+ myIndent += offset;
+ }
+ var spacer = "";
+ for( var i = 0; i < myIndent;i++ )
+ {
+ spacer += " ";
+ }
+ var topLevel = xmlRoot.childNodes;
+ var size = topLevel.length;
+ var temp;
+ for( var i = 0; i < size; i++ )
+ {
+ var curNode = topLevel[i];
+
+ //either node or a leaf
+ if( curNode.nodeType == "1" )
+ {
+ str += spacer + "&lt" + curNode.nodeName + "&gt\n";
+ if( isDebug )
+ {
+ debug( spacer + "&lt" + curNode.nodeName + "&gt" );
+ }
+ str = this.prettyPrintXML( curNode, isDebug, str, myIndent );
+ str += spacer + "&lt/" + curNode.nodeName + "&gt\n";
+ if( isDebug )
+ {
+ debug( spacer + "&lt/" + curNode.nodeName + "&gt" );
+ }
+ }
+ else
+ {
+ str += spacer + curNode.data + "\n";
+ if( isDebug )
+ {
+ debug( spacer + curNode.data );
+ }
+ }
+ }
+
+ return str;
+ }
+}
+
+var birtSoapRequest = new BirtSoapRequest( );
\ No newline at end of file

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtSoapRequest.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtSoapRequest.js
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtSoapRequest.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtSoapResponse.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtSoapResponse.js?rev=831503&view=auto
==============================================================================
--- ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtSoapResponse.js (added)
+++ ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtSoapResponse.js Sat Oct 31 01:22:47 2009
@@ -0,0 +1,82 @@
+/******************************************************************************
+ * Copyright (c) 2004 Actuate Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Actuate Corporation - Initial implementation.
+ *****************************************************************************/
+
+/**
+ * BirtSoapResponse
+ * ...
+ */
+BirtSoapResponse = Class.create( );
+
+BirtSoapResponse.prototype =
+{
+ /**
+ * Initialization routine required by "ProtoType" lib.
+ *
+ * @return, void
+ */
+ initialize: function( )
+ {
+ },
+
+ /**
+ * Process the soap response, dispatcher message content to designated
+ * message handlers.
+ *
+ * @message, incoming soap message DOM
+ * @return, void
+ */
+ process: function( message )
+ {
+ // TODO: will gradually remove it since not all response are in soap now.
+ var soapBody = message.getElementsByTagName( 'soapenv:Body' )[ 0 ];
+ if ( !soapBody )
+ {
+ soapBody = message.getElementsByTagName( 'Body' )[ 0 ];
+ }
+
+ if ( soapBody )
+ {
+ for ( var i = 0; i < soapBody.childNodes.length; i++ )
+ {
+ if ( soapBody.childNodes[i].nodeType == 1 ) // Need to use NodeType definition.
+ {
+ if ( soapBody.childNodes[i].tagName == 'soapenv:Fault' )
+ {
+ birtExceptionDialog.__cb_bind( soapBody.childNodes[i] );
+ }
+ else
+ {
+ var handler = eval( 'birt' + soapBody.childNodes[i].tagName + 'Handler' );
+ if ( handler )
+ {
+ handler.__process( soapBody.childNodes[i] );
+ }
+ }
+
+ break;
+ }
+ }
+
+ return;
+ }
+
+ if ( message )
+ {
+ var handler = eval( 'birt' + message.tagName + 'ResponseHandler' );
+ if ( handler )
+ {
+ handler.__process( message );
+ }
+ }
+ }
+}
+
+var birtSoapResponse = new BirtSoapResponse( );
\ No newline at end of file

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtSoapResponse.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtSoapResponse.js
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/BirtSoapResponse.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/Mask.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/Mask.js?rev=831503&view=auto
==============================================================================
--- ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/Mask.js (added)
+++ ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/Mask.js Sat Oct 31 01:22:47 2009
@@ -0,0 +1,195 @@
+// Copyright 1994-2006, Actuate Software Corp., All rights reserved.
+
+Mask = Class.create();
+
+Mask.prototype = {
+
+ zIndexStack: [],
+ zIndexBase: 200, //Lowest zIndex for mask
+ zIndexCurrent: null,
+ opacity: 0, //Default opacity is zero
+ _baseElements : null,
+
+ initialize: function(useIframe, opacity)
+ {
+ this.zIndexCurrent = this.zIndexBase;
+
+ if(useIframe)
+ {
+ this.__useIFrame = true;
+ this.__mask = document.createElement( 'iframe' );
+ // Workaround for IE https secure warning
+ this.__mask.src = "birt/pages/common/blank.html";
+ }
+ else
+ {
+ this.__useIFrame = false;
+ this.__mask = document.createElement( 'div' );
+ }
+
+ this.__mask.id = "Mask";
+ //default opacity to zero
+ if(opacity)
+ {
+ debug("setting opacity to : " + opacity);
+ this.opacity = opacity;
+ }
+ document.body.appendChild( this.__mask );
+ this.__mask.style.position = 'absolute';
+ this.__mask.style.top = '0px';
+ this.__mask.style.left = '0px';
+ var width = BirtPosition.viewportWidth();
+ this.__mask.style.width = width + 'px';
+ var height = BirtPosition.viewportHeight();
+ this.__mask.style.height = height + 'px';
+ this.__mask.style.zIndex = '200';
+ this.__mask.style.backgroundColor = '#0044ff';
+ this.__mask.style.filter = 'alpha( opacity=' + ( this.opacity * 100 ) + ')';
+ this.__mask.style.opacity = this.opacity;
+ this.__mask.scrolling = 'no';
+ this.__mask.marginHeight = '0px';
+ this.__mask.marginWidth = '0px';
+ this.__mask.style.display = 'none';
+ // Support low version Mozilla/NS
+ this.__mask.style.MozOpacity = 0;
+
+ if(useIframe)
+ {
+ this.__useIFrame = true;
+ this.__progressBarMask = document.createElement( 'iframe' );
+ // Workaround for IE https secure warning
+ this.__progressBarMask.src = "birt/pages/common/blank.html";
+ }
+ else
+ {
+ this.__useIFrame = false;
+ this.__progressBarMask = document.createElement( 'div' );
+ }
+
+ document.body.appendChild( this.__progressBarMask );
+ this.__progressBarMask.style.position = 'absolute';
+ this.__progressBarMask.style.top = '0px';
+ this.__progressBarMask.style.left = '0px';
+ var width = BirtPosition.viewportWidth();
+ this.__progressBarMask.style.width = width + 'px';
+ var height = BirtPosition.viewportHeight();
+ this.__progressBarMask.style.height = height + 'px';
+ this.__progressBarMask.style.zIndex = '200';
+ this.__progressBarMask.style.backgroundColor = '#ff0000';
+ this.__progressBarMask.style.filter = 'alpha( opacity=' + ( this.opacity * 100 ) + ')';
+ this.__progressBarMask.style.opacity = this.opacity;
+ this.__progressBarMask.scrolling = 'no';
+ this.__progressBarMask.marginHeight = '0px';
+ this.__progressBarMask.marginWidth = '0px';
+ this.__progressBarMask.style.display = 'none';
+ this.__progressBarMask.style.cursor = "move"; //cursor is set to a different value than desired so that change is trigged in IE
+
+ this.__eh_resize_closure = this.__eh_resize.bindAsEventListener( this );
+ Event.observe( window, 'resize', this.__eh_resize_closure, false );
+ },
+
+ /**
+ * Sets the element DOM objects present on the main window.
+ * They will be disabled when the mask is floating on the top
+ * of them.
+ * @param baseElements array of base elements
+ */
+ setBaseElements : function( baseElements )
+ {
+ this._baseElements = baseElements;
+ },
+
+ /*
+ If mask is not shown, shows mask, otherwise, moves mask zIndex above last returned zIndex.
+ @returns zIndex for element to place directly above mask
+ */
+ show: function()
+ {
+ if(this.zIndexStack.length == 0)
+ {
+ this._updateElements(this._baseElements, false);
+
+ Element.show( this.__mask );
+ }
+ this.__mask.style.zIndex = this.zIndexCurrent;
+ this.zIndexStack.push(this.zIndexCurrent);
+ this.zIndexCurrent++;
+ var dialogZIndex = this.zIndexCurrent;
+ this.zIndexCurrent++;
+
+ return dialogZIndex;
+ },
+
+ /*
+ Resizes masks to current screen width (not including scrollbars)
+ */
+ __eh_resize: function()
+ {
+ var width = BirtPosition.viewportWidth();
+ var height = BirtPosition.viewportHeight();
+
+ this.__mask.style.width = width + 'px';
+ this.__mask.style.height = height + 'px';
+ this.__progressBarMask.style.width = width + 'px';
+ this.__progressBarMask.style.height = height + 'px';
+ },
+
+ /*
+ Shows progress bar mask above the highest regular item zIndex.
+ */
+ showProgressBarMask: function()
+ {
+ this.__progressBarMask.style.cursor = "wait";
+
+ Element.show( this.__progressBarMask );
+
+ this.__progressBarMask.style.zIndex = this.zIndexCurrent;
+
+ return (this.zIndexCurrent + 1);
+
+ },
+
+ hide: function()
+ {
+ if(this.zIndexStack.length == 1)
+ {
+ this._updateElements(this._baseElements, true);
+
+ Element.hide( this.__mask );
+ this.zIndexStack.pop();
+ this.zIndexCurrent = this.zIndexBase;
+ }
+ else
+ {
+ this.zIndexCurrent = this.zIndexStack.pop();
+ this.__mask.style.zIndex = this.zIndexStack[this.zIndexStack.length -1];
+ }
+ },
+
+ hideProgressBarMask: function()
+ {
+ this.__progressBarMask.style.cursor = "move";
+
+ Element.hide( this.__progressBarMask );
+ },
+
+ isIFrame: function()
+ {
+ return this.__useIFrame;
+ },
+
+ _updateElements : function(elements, enable)
+ {
+ if ( !elements )
+ {
+ return;
+ }
+
+ var func = enable?birtUtility.restoreTabIndexes:birtUtility.disableTabIndexes;
+ for ( var i = 0; i < elements.length; i++ )
+ {
+ func.call(birtUtility, $(elements[i]));
+ }
+ }
+
+}

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/Mask.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/Mask.js
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/branches/addbirt/framework/birt/webapp/birt/webcontent/birt/ajax/core/Mask.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain