You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rave.apache.org by mf...@apache.org on 2011/04/01 18:42:42 UTC

svn commit: r1087796 [29/37] - in /incubator/rave/donations/mitre-osec: ./ conf/ db/ db/data/ db/sequences/ db/tables/ lib/ lib/apache-commons/ lib/apache-taglibs/ lib/build/ lib/build/cobertura/ lib/eclipselink/ lib/freemarker/ lib/google-collections/...

Added: incubator/rave/donations/mitre-osec/web/WEB-INF/tiles-defs.xml
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/web/WEB-INF/tiles-defs.xml?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/web/WEB-INF/tiles-defs.xml (added)
+++ incubator/rave/donations/mitre-osec/web/WEB-INF/tiles-defs.xml Fri Apr  1 16:42:22 2011
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN"
+        "http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
+
+<!-- TODO: Get EL expressions working in this definition file so we can use them for things like pageTitleSuffix -->
+<tiles-definitions>
+
+    <!-- BASE DEFINITIONS FOR THE ENTIRE APPLICATION -->
+    <definition name="templates.base" template="/WEB-INF/freemarker/templates/base_layout.ftl">
+        <put-attribute name="pageTitlePrefix" value=""/>
+        <put-attribute name="pageTitleSuffix" value="Home"/>
+        <put-attribute name="header" value="/WEB-INF/freemarker/common/header.ftl"/>
+        <put-attribute name="footer" value="/WEB-INF/freemarker/common/footer.ftl"/>
+    </definition>
+
+    <!-- PAGE VIEWS -->
+    <definition name="templates.page.view.*" extends="templates.base">
+        <put-attribute name="layout" value="/WEB-INF/freemarker/layouts/{1}.ftl" cascade="true"/>
+        <put-attribute name="body">
+            <definition template="/WEB-INF/freemarker/templates/base_page.ftl"/>
+        </put-attribute>
+    </definition>
+
+    <definition name="templates.page.page_add" extends="templates.base">
+        <put-attribute name="pageTitleSuffix" value="Add Page"/>
+        <put-attribute name="body" value="/WEB-INF/freemarker/page/page_add.ftl"/>
+    </definition>
+
+    <!-- REPOSITORY VIEWS -->
+    <definition name="templates.repository.repository_list" extends="templates.base">
+        <put-attribute name="pageTitleSuffix" value="App Store"/>
+        <put-attribute name="body" value="/WEB-INF/freemarker/repository/repository_list.ftl"/>
+    </definition>
+
+    <definition name="templates.repository.repository_add" extends="templates.base">
+        <put-attribute name="pageTitleSuffix" value="App Store"/>
+        <put-attribute name="body" value="/WEB-INF/freemarker/repository/repository_add.ftl"/>
+    </definition>
+
+    <definition name="templates.repository.repository_edit" extends="templates.base">
+        <put-attribute name="pageTitleSuffix" value="App Store"/>
+        <put-attribute name="body" value="/WEB-INF/freemarker/repository/repository_edit.ftl"/>
+    </definition>
+
+    <definition name="templates.repository.list_template" template="/WEB-INF/freemarker/repository/list_template.ftl"/>
+
+    <definition name="templates.repository.gadget_details_view" extends="templates.base">
+        <put-attribute name="pageTitleSuffix" value="Gadget Details"/>
+        <put-attribute name="body" value="/WEB-INF/freemarker/repository/gadget_details_view.ftl"/>
+    </definition>
+
+    <!-- REGION GADGET VIEWS -->
+    <definition name="templates.regiongadget.edit_prefs" extends="templates.base">
+        <put-attribute name="pageTitleSuffix" value="Edit Preferences"/>
+        <put-attribute name="body" value="/WEB-INF/freemarker/regiongadget/edit_prefs.ftl"/>
+    </definition>
+
+    <definition name="templates.regiongadget.view_canvas" extends="templates.base">
+        <put-attribute name="pageTitleSuffix" value="Canvas View"/>
+        <put-attribute name="body" value="/WEB-INF/freemarker/regiongadget/view_canvas.ftl"/>
+    </definition>
+
+    <definition name="templates.regiongadget.view_edit_custom_prefs" extends="templates.base">
+        <put-attribute name="pageTitleSuffix" value="Edit Preferences"/>
+        <put-attribute name="body" value="/WEB-INF/freemarker/regiongadget/view_edit_custom_prefs.ftl"/>
+    </definition>
+
+    <!-- ADMIN VIEWS -->
+    <definition name="templates.admin.home" extends="templates.base">
+        <put-attribute name="pageTitleSuffix" value="Admin - Home"/>
+        <put-attribute name="body" value="/WEB-INF/freemarker/admin/home.ftl"/>
+    </definition>
+
+    <definition name="templates.admin.gadget_audience" extends="templates.base">
+        <put-attribute name="pageTitleSuffix" value="Admin - Gadget Audiences"/>
+        <put-attribute name="body" value="/WEB-INF/freemarker/admin/gadget_audience.ftl"/>
+    </definition>
+
+    <definition name="templates.admin.security_user_role" extends="templates.base">
+        <put-attribute name="pageTitleSuffix" value="Admin - Security User Role"/>
+        <put-attribute name="body" value="/WEB-INF/freemarker/admin/security_user_role.ftl"/>
+    </definition>
+
+    <definition name="templates.admin.gadget_pref_refresh" extends="templates.base">
+        <put-attribute name="pageTitleSuffix" value="Admin - Gadget User Preferences Refresh"/>
+        <put-attribute name="body" value="/WEB-INF/freemarker/admin/gadget_pref_refresh.ftl"/>
+    </definition>
+
+    <!-- ERROR VIEWS -->
+    <definition name="templates.error.access_denied_error" extends="templates.base">
+        <put-attribute name="pageTitleSuffix" value="Access Denied"/>
+        <put-attribute name="body" value="/WEB-INF/freemarker/error/access_denied_error.ftl"/>
+    </definition>
+
+    <definition name="templates.error.default_error" extends="templates.base">
+        <put-attribute name="pageTitleSuffix" value="Error Page"/>
+        <put-attribute name="body" value="/WEB-INF/freemarker/error/default_error.ftl"/>
+    </definition>
+
+</tiles-definitions>
\ No newline at end of file

Propchange: incubator/rave/donations/mitre-osec/web/WEB-INF/tiles-defs.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/web/WEB-INF/views.xml
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/web/WEB-INF/views.xml?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/web/WEB-INF/views.xml (added)
+++ incubator/rave/donations/mitre-osec/web/WEB-INF/views.xml Fri Apr  1 16:42:22 2011
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:util="http://www.springframework.org/schema/util"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans
+                         http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                         http://www.springframework.org/schema/util
+                         http://www.springframework.org/schema/util/spring-util-3.0.xsd">
+	
+    <bean name="jsonView"
+          class="org.mitre.portal.web.util.PortalMappingJacksonJsonView" />
+</beans>
\ No newline at end of file

Propchange: incubator/rave/donations/mitre-osec/web/WEB-INF/views.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/web/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/web/WEB-INF/web.xml?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/web/WEB-INF/web.xml (added)
+++ incubator/rave/donations/mitre-osec/web/WEB-INF/web.xml Fri Apr  1 16:42:22 2011
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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 version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+    <context-param>
+        <param-name>contextConfigLocation</param-name>
+        <!-- the order of these is important since the security file relies on beans created in applicationContext -->
+        <param-value>
+            /WEB-INF/applicationContext.xml
+            /WEB-INF/applicationContext-security.xml
+        </param-value>
+    </context-param>
+
+    <listener>
+        <listener-class>org.mitre.portal.web.util.DefaultContextLoaderListener</listener-class>
+    </listener>
+
+    <filter>
+        <filter-name>springSecurityFilterChain</filter-name>
+        <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
+    </filter>
+    <filter-mapping>
+        <filter-name>springSecurityFilterChain</filter-name>
+        <url-pattern>/app/*</url-pattern>
+    </filter-mapping>
+    <filter-mapping>
+        <filter-name>springSecurityFilterChain</filter-name>
+        <url-pattern>/defaultpage</url-pattern>
+    </filter-mapping>
+    <filter-mapping>
+        <filter-name>springSecurityFilterChain</filter-name>
+        <url-pattern>/spring_security_login</url-pattern>
+    </filter-mapping>
+    <filter-mapping>
+        <filter-name>springSecurityFilterChain</filter-name>
+        <url-pattern>/j_spring_security_check</url-pattern>
+    </filter-mapping>
+
+    <servlet>
+        <servlet-name>dispatcher</servlet-name>
+        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
+    <servlet>
+        <servlet-name>freemarker</servlet-name>
+        <servlet-class>org.apache.tiles.freemarker.servlet.TilesFreemarkerServlet</servlet-class>
+
+        <!-- FreemarkerServlet settings: -->
+        <init-param>
+            <param-name>TemplatePath</param-name>
+            <param-value>/WEB-INF/freemarker/</param-value>
+        </init-param>
+        <init-param>
+            <param-name>NoCache</param-name>
+            <param-value>true</param-value>
+        </init-param>
+        <init-param>
+            <param-name>ContentType</param-name>
+            <param-value>text/html</param-value>
+        </init-param>
+
+        <!-- FreeMarker settings: -->
+        <init-param>
+            <param-name>template_update_delay</param-name>
+            <!-- 0 is for development only! Use higher value otherwise. -->
+            <param-value>0</param-value>
+        </init-param>
+        <init-param>
+            <param-name>default_encoding</param-name>
+            <param-value>ISO-8859-1</param-value>
+        </init-param>
+        <init-param>
+            <param-name>url_escaping_charset</param-name>
+            <param-value>UTF-8</param-value>
+        </init-param>
+        <init-param>
+            <param-name>number_format</param-name>
+            <param-value>0.#######</param-value>
+        </init-param>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>dispatcher</servlet-name>
+        <url-pattern>/app/*</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>dispatcher</servlet-name>
+        <url-pattern>/defaultpage</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>dispatcher</servlet-name>
+        <url-pattern>/spring_security_login</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>dispatcher</servlet-name>
+        <url-pattern>/j_spring_security_check</url-pattern>
+    </servlet-mapping>
+
+    <servlet-mapping>
+        <servlet-name>freemarker</servlet-name>
+        <url-pattern>*.ftl</url-pattern>
+    </servlet-mapping>
+
+    <welcome-file-list>
+        <welcome-file>defaultpage</welcome-file>
+    </welcome-file-list>
+</web-app>

Propchange: incubator/rave/donations/mitre-osec/web/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/web/html/dojoxd_blank.html
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/web/html/dojoxd_blank.html?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/web/html/dojoxd_blank.html (added)
+++ incubator/rave/donations/mitre-osec/web/html/dojoxd_blank.html Fri Apr  1 16:42:22 2011
@@ -0,0 +1,25 @@
+<!--
+  ~ 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.
+  -->
+
+<html>
+<head>
+<script type="text/javascript">isLoaded = true;</script>
+</head>
+<body></body>
+</html>
\ No newline at end of file

Propchange: incubator/rave/donations/mitre-osec/web/html/dojoxd_blank.html
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/web/script/__init.js
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/web/script/__init.js?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/web/script/__init.js (added)
+++ incubator/rave/donations/mitre-osec/web/script/__init.js Fri Apr  1 16:42:22 2011
@@ -0,0 +1,25 @@
+/*
+ * 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.
+ */
+
+// this code will render at the top of the combined javascript file
+var portal = portal || {};
+
+<!-- TODO: Merge in the Dojo changes that were made to trunk so we dont have to do the dojo.require below -->
+
+dojo.require("portal.all");
\ No newline at end of file

Propchange: incubator/rave/donations/mitre-osec/web/script/__init.js
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/web/script/admin.js
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/web/script/admin.js?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/web/script/admin.js (added)
+++ incubator/rave/donations/mitre-osec/web/script/admin.js Fri Apr  1 16:42:22 2011
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ */
+
+portal.admin = (function() {
+    var displayUserPrefRefreshResults = function(response) {
+
+        var list = dojo.byId('resultList');
+        dojo.addClass('refresh', 'portalHidden');
+        dojo.removeClass('results', 'portalHidden');
+
+        var result = response.result;
+        if (!result) {
+            throw "Invalid Response";
+        }
+        for (var i = 0; i < result.length; i++) {
+            dojo.create("li", {innerHTML : result[i]}, list);
+        }
+    };
+
+    var displayError = function(eTitle, error) {
+        // if the xhrPost fails completely, most likely there is a network or server issue
+        var dialog = new dijit.Dialog({title: eTitle, content: error});
+        dialog.show();
+
+    };
+
+    // public data and functions
+    return {
+        editGadgetAudience: function(index) {
+            var gadgetAudienceId = dojo.byId("gadgetAudienceId_" + index).value;
+            var code = dojo.byId("gadgetAudienceCode_" + index).innerHTML;
+            var desc = dojo.byId("gadgetAudienceDescription_" + index).innerHTML;
+            dojo.byId("editGadgetAudienceId").value = gadgetAudienceId;
+            dijit.byId("editCode").attr("value", code);
+            dijit.byId("editDescription").attr("value", desc);
+            dijit.byId("editGadgetAudienceDialog").show();
+        },
+
+        deleteGadgetAudience: function(index) {
+            var desc = dojo.byId("gadgetAudienceDescription_" + index).innerHTML;
+            if (confirm("Are you sure you want to delete gadget audience " + desc + "?")) {
+                var gadgetAudienceId = dojo.byId("gadgetAudienceId_" + index).value;
+                dojo.byId("deleteGadgetAudienceId").value = gadgetAudienceId;
+                dijit.byId("deleteGadgetAudienceForm").submit();
+            }
+        },
+
+        refreshUserPrefs : function() {
+            dijit.byId("refreshButton").disabled = true;
+            dojo.xhrPost({
+                url: portal.common.controller.admin + "/refreshUserPrefsFromSpec",
+                content: null,
+                handleAs: 'json',
+                load: displayUserPrefRefreshResults,
+                error: function(error, ioargs) {
+                    displayError('Refresh Error', "An error was encountered while refreshing gadget user preferences.");
+                }
+            });
+        }
+
+    }; // end return public
+})();
\ No newline at end of file

Propchange: incubator/rave/donations/mitre-osec/web/script/admin.js
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/web/script/common.js
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/web/script/common.js?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/web/script/common.js (added)
+++ incubator/rave/donations/mitre-osec/web/script/common.js Fri Apr  1 16:42:22 2011
@@ -0,0 +1,158 @@
+
+/*
+ * 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.
+ */
+
+// This function will get executed on all pages whenever the screen resolution is changed (eg: 1024)
+dojo.addOnLoad(function() {
+    // Change font size based on the screen width
+    if (screen.width) {
+        if (screen.width <= 1024) { document.body.style.fontSize = '70%'; }
+    }
+    }
+);
+
+
+portal.common = {
+    handleJsonResultError: function(result) {
+        console.log("json response error:" + result.result.consoleMessage);
+        portal.common.handleErrorText(result.result.displayMessage);
+    },
+
+    handleErrorText: function(errorText) {
+        console.log(errorText);
+        var content = "<div class='popupErrorText'>Error: " + errorText + "</div>";
+        var dialog = new dijit.Dialog({title: "Error", content: content});
+        dialog.show();
+    },
+
+    displayXhrErrorDialog: function(error, ioargs, title) {
+        var errorHtml = "";
+        var ioargsHtml = "";
+
+        if (error) {
+            errorHtml += "<table class='errorDialogTable'><tr><th colspan='2'>Error Values</th></tr>";
+
+            if (error.name) errorHtml += "<tr><td>name:</td><td>" + error.name + "</td></tr>";
+            if (error.message) errorHtml += "<tr><td>message:</td><td>" + error.message + "</td></tr>";
+            if (error.status) errorHtml += "<tr><td>status:</td><td>" + error.status + "</td></tr>";
+            if (error.fileName) errorHtml += "<tr><td>fileName:</td><td>" + error.fileName + "</td></tr>";
+            if (error.lineNumber) errorHtml += "<tr><td>lineNumber:</td><td>" + error.lineNumber + "</td></tr>";
+            if (error.responseText) errorHtml += "<tr><td>responseText:</td><td><pre>" + error.responseText + "</pre></td></tr>";
+
+            errorHtml += "</table>";
+        }
+
+        if (ioargs) {
+            ioargsHtml += "<table class='errorDialogTable'><tr><th colspan='2'>ioargs</th></tr>";
+            if (ioargs.url) ioargsHtml += "<tr><td>url:</td><td>" + ioargs.url + "</td></tr>";
+            if (ioargs.query) ioargsHtml += "<tr><td>query:</td><td>" + ioargs.query + "</td></tr>";
+            if (ioargs.xhr.responseText) ioargsHtml += "<tr><td>responseText:</td><td><pre>" + ioargs.xhr.responseText + "</pre></td></tr>";
+            ioargsHtml += "</table>";
+        }
+        var content = errorHtml + "<br/>" + ioargsHtml;
+        var dialog = new dijit.Dialog({title: title, content: content});
+        dialog.show();
+    },
+
+    // display/hide the stack trace popup dialog on the common error page
+    displayStackTraceDialog: function(display) {
+        var dialog = dijit.byId('errorStackDialog');       
+        if (display) {
+            dialog.show();
+        } else {
+            dialog.hide();
+        }
+    },
+
+    registerDelayedLoadGadgetMenu : function(menuIndex) {
+        //Get the element for the gadget menu caret and add an onclick handler to it so we can build the menu on demand.
+        var gadgetMenuClickCaret = dojo.byId("gadgets-gadget-menu-" + menuIndex);
+        var connectionId = dojo.connect(gadgetMenuClickCaret, "onclick", null, function(event) {
+            //User clicked on the caret -- stop the event and disconnect this handler so it doesnt run if they click again.
+            dojo.stopEvent(event);
+            dojo.disconnect(connectionId);
+
+            //Grab the menu container element and copy all the delayedParseDojoType attrs into new dojoType attrs.
+            var gadgetMenuContainer = dojo.byId("gadgetMenu-" + menuIndex + "-container");
+            dojo.query("[delayedParseDojoType]", gadgetMenuContainer).forEach(function(node, index, arr) {
+                dojo.attr(node, "dojoType", dojo.attr(node, "delayedParseDojoType"));
+            });
+
+            //Now that we have all the dojoType attrs set, fire the parser on the menu container element.
+            dojo.parser.parse(gadgetMenuContainer);
+
+            //Grab the menu widget object and pop it open.  Note that we are using an internal function, but this is the
+            //only cross browser way I could find to reliably pop the menu.  The other approach I took was to fire a click
+            //programmatically on the menu caret element but the menu popped in the wrong place when doing that in Safari.
+            //The method below works in IE, FF, Chrome and Safari.
+            var gadgetMenuWidgit = dijit.byId("gadgetMenu-" + menuIndex);
+            portal.common.disableAutoSelectFirstItemOfDojoMenu(gadgetMenuWidgit, "gadgets-gadget-menu-" + menuIndex);
+            gadgetMenuWidgit._openMyself(event, gadgetMenuClickCaret);
+        });
+    },
+
+    // hack to disable the auto-selecting of the first menu item
+    // when the menu first opens
+    disableAutoSelectFirstItemOfDojoMenu: function(menuDijit, menuButtonId) {
+        // override the focus function to simply focus on the main menu widget when it opens rather than on the first child menu
+        // this code was taken from the MenuItem.focus function
+        menuDijit.focus = function() {
+            try {
+                if (dojo.isIE == 8) {
+                     // needed for IE8 which won't scroll TR tags into view on focus yet calling scrollIntoView creates flicker (#10275)
+                     this.containerNode.focus();
+                }
+                dijit.focus(this.domNode);
+            } catch(e) {
+                 // this throws on IE (at least) in some scenarios
+            }
+        };
+
+        // override the focusFirstChild function so it does nothing
+        menuDijit.focusFirstChild = function() {
+            return false;
+        };
+
+        // this extra code is needed for IE because it fires events in a different order than FF
+        if (dojo.isIE) {
+            menuDijit.attr("isFirstItemHover",true);
+            var firstItem = menuDijit.getChildren()[0];
+
+            firstItem._onHover = function() {
+                console.log("_onHover");
+                if (this.getParent().attr("isFirstItemHover")) {
+                    this.getParent().attr("isFirstItemHover",false);
+                } else {
+                    dojo.addClass(this.domNode, 'dijitMenuItemHover');
+                    this.getParent().onItemHover(this);
+                }
+            };
+
+            dojo.connect(menuDijit, "onClose", function() {
+                this.attr("isFirstItemHover", true);
+            });
+
+            dojo.connect(firstItem, "onMouseOver", function(e) {
+               if (e.fromElement.id != menuButtonId) {
+                   this._onHover();
+               }
+            });
+        }
+    }
+};
\ No newline at end of file

Propchange: incubator/rave/donations/mitre-osec/web/script/common.js
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/web/script/dojo/portal.profile.js
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/web/script/dojo/portal.profile.js?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/web/script/dojo/portal.profile.js (added)
+++ incubator/rave/donations/mitre-osec/web/script/dojo/portal.profile.js Fri Apr  1 16:42:22 2011
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+
+// This is the dojo build profile to be used with the portal
+// The dojo build process will only include the defined dependencies below when
+// creating the build file
+dependencies = {
+    layers: [
+        {
+            name: "../portal/all.js",
+            resourceName: "portal.all",
+            dependencies: [
+                "dojo.regexp",
+                "dojo.parser",
+                "dojox.validate.regexp",
+                "dijit.Menu",
+                "dijit.Dialog",
+                "dijit.form.Button",
+                "dijit.form.CheckBox",
+                "dijit.form.Form",
+                "dijit.form.SimpleTextarea",
+                "dijit.form.Select",
+                "dijit.form.ValidationTextBox",
+                "dijit.form.RadioButton",
+                "dijit.form.MultiSelect",
+                "dijit.form.TextBox",
+                "dijit.layout.TabContainer"
+            ]
+        }
+    ],
+    prefixes: [
+        [ "portal", "../portal" ]
+    ]
+}
\ No newline at end of file

Propchange: incubator/rave/donations/mitre-osec/web/script/dojo/portal.profile.js
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rave/donations/mitre-osec/web/script/dojo/release/portal/all.js
URL: http://svn.apache.org/viewvc/incubator/rave/donations/mitre-osec/web/script/dojo/release/portal/all.js?rev=1087796&view=auto
==============================================================================
--- incubator/rave/donations/mitre-osec/web/script/dojo/release/portal/all.js (added)
+++ incubator/rave/donations/mitre-osec/web/script/dojo/release/portal/all.js Fri Apr  1 16:42:22 2011
@@ -0,0 +1,10 @@
+/*
+	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.
+*/
+

[... 2 lines stripped ...]
Propchange: incubator/rave/donations/mitre-osec/web/script/dojo/release/portal/all.js
------------------------------------------------------------------------------
    svn:executable = *