0

我们创建了一个 Gatein 门户网站,当我们使用以下 url 访问它时。

localhost:8080/portal/myportal,从gatein门户容器加载到head标签的资源很少。

请参考 Gatein Portal 容器中包含的门户网站脚本的以下源代码。请让我知道如何从 head 标签中删除这些门户容器资源。

提前致谢

<script type="text/javascript">
    var require = {
    "shim" : {
        "PORTLET/web/SiteMapPortlet" : {
            "deps" : [ "SHARED/bootstrap" ]
        },
        "PORTLET/dashboard/TabbedDashboardPortlet" : {
            "deps" : [ "SHARED/bootstrap" ]
        },
        "PORTLET/web/IFramePortlet" : {
            "deps" : [ "SHARED/bootstrap" ]
        }
    },
    "paths" : {
        "SHARED/uiMaskLayer" : "/portal/scripts/3.6.3.Final-redhat-4/GROUP/baseGRP-en-min",
        "SHARED/uiCalendar" : "/portal/scripts/3.6.3.Final-redhat-4/GROUP/webuiExtGRP-min",
        "SHARED/navigation" : "/portal/scripts/3.6.3.Final-redhat-4/SHARED/navigation-min",
        "SHARED/org_gatein_responsive_menu" : "/portal/scripts/3.6.3.Final-redhat-4/SHARED/org_gatein_responsive_menu-min",
        "SHARED/dropdownmenu_jquery" : "/portal/scripts/3.6.3.Final-redhat-4/SHARED/dropdownmenu_jquery-min",
        "PORTLET/dashboard/TabbedDashboardPortlet" : "/portal/scripts/3.6.3.Final-redhat-4/PORTLET/dashboard:TabbedDashboardPortlet-min",
        "SHARED/org_gatein_jppinformation" : "/portal/scripts/3.6.3.Final-redhat-4/SHARED/org_gatein_jppinformation-min",
        "SHARED/gadget" : "/portal/scripts/3.6.3.Final-redhat-4/SHARED/gadget-en-min",
        "SHARED/org_gatein_features" : "/portal/scripts/3.6.3.Final-redhat-4/SHARED/org_gatein_features-min",
        "SHARED/common" : "/portal/scripts/3.6.3.Final-redhat-4/SHARED/common-min",
        "SHARED/portalDragDrop" : "/portal/scripts/3.6.3.Final-redhat-4/GROUP/portalGRP-min",
        "SHARED/webui-ext" : "/portal/scripts/3.6.3.Final-redhat-4/GROUP/webuiExtGRP-min",
        "PORTLET/web/SiteMapPortlet" : "/portal/scripts/3.6.3.Final-redhat-4/PORTLET/web:SiteMapPortlet-min",
        "SHARED/org_gatein_navigation" : "/portal/scripts/3.6.3.Final-redhat-4/SHARED/org_gatein_navigation-min",
        "SHARED/base" : "/portal/scripts/3.6.3.Final-redhat-4/GROUP/baseGRP-en-min",
        "SHARED/bootstrap" : "/portal/scripts/3.6.3.Final-redhat-4/SHARED/bootstrap-min",
        "SHARED/portal" : "/portal/scripts/3.6.3.Final-redhat-4/GROUP/portalGRP-min",
        "SHARED/I18NMessage" : "/portal/scripts/3.6.3.Final-redhat-4/GROUP/baseGRP-en-min",
        "SHARED/org_gatein_responsive_collapsiblecontainer" : "/portal/scripts/3.6.3.Final-redhat-4/SHARED/org_gatein_responsive_collapsiblecontainer-min",
        "SHARED/toggleContainer" : "/portal/scripts/3.6.3.Final-redhat-4/SHARED/toggleContainer-min",
        "SHARED/jpp_info_modernizr" : "/portal/scripts/3.6.3.Final-redhat-4/SHARED/jpp_info_modernizr-min",
        "SHARED/portalRequest" : "/portal/scripts/3.6.3.Final-redhat-4/GROUP/baseGRP-en-min",
        "SHARED/upload" : "/portal/scripts/3.6.3.Final-redhat-4/GROUP/webuiExtGRP-min",
        "SHARED/portalControl" : "/portal/scripts/3.6.3.Final-redhat-4/GROUP/webuiGRP-min",
        "SHARED/dashboard" : "/portal/scripts/3.6.3.Final-redhat-4/SHARED/dashboard-min",
        "SHARED/modernizr" : "/portal/scripts/3.6.3.Final-redhat-4/SHARED/modernizr-min",
        "SHARED/uiVirtualList" : "/portal/scripts/3.6.3.Final-redhat-4/GROUP/webuiExtGRP-min",
        "PORTLET/web/IFramePortlet" : "/portal/scripts/3.6.3.Final-redhat-4/PORTLET/web:IFramePortlet-min",
        "SHARED/portalComposer" : "/portal/scripts/3.6.3.Final-redhat-4/GROUP/portalGRP-min",
        "SHARED/popupCategory" : "/portal/scripts/3.6.3.Final-redhat-4/GROUP/baseGRP-en-min",
        "SHARED/org_gatein_responsive_dropdownmenu_jquery" : "/portal/scripts/3.6.3.Final-redhat-4/SHARED/org_gatein_responsive_dropdownmenu_jquery-min",
        "SHARED/uiMaskWorkspace" : "/portal/scripts/3.6.3.Final-redhat-4/GROUP/baseGRP-en-min",
        "SHARED/uiPopup" : "/portal/scripts/3.6.3.Final-redhat-4/GROUP/baseGRP-en-min",
        "SHARED/uiForm" : "/portal/scripts/3.6.3.Final-redhat-4/GROUP/webuiGRP-min",
        "SHARED/skin" : "/portal/scripts/3.6.3.Final-redhat-4/GROUP/baseGRP-en-min",
        "SHARED/uiPopupWindow" : "/portal/scripts/3.6.3.Final-redhat-4/GROUP/webuiGRP-min",
        "SHARED/jquery" : "/portal/scripts/3.6.3.Final-redhat-4/SHARED/jquery-min",
        "SHARED/selectors" : "/portal/scripts/3.6.3.Final-redhat-4/GROUP/webuiGRP-min",
        "SHARED/uiRightClickPopupMenu" : "/portal/scripts/3.6.3.Final-redhat-4/GROUP/webuiExtGRP-min"
    }
};

4

1 回答 1

0

这个 javascript 片段定义了平台中所有声明的 js 模块(AMD 模块)。这并不意味着资源已加载。它们只是被声明的。当脚本需要这些资源之一时,它会被动态加载。例如,在此配置中定义,如果页面上显示 portlet SiteMapPortlet,则脚本 PORTLET/web/SiteMapPortlet (/portal/scripts/3.6.3.Final-redhat-4/PORTLET/web:SiteMapPortlet-min. js) 以及依赖项 SHARED/bootstrap (/portal/scripts/3.6.3.Final-redhat-4/SHARED/bootstrap-min.js)。如果未显示 portlet,则不必加载这些脚本。

因此,您不得删除此 javascript 片段。GateIn 的所有 javascript 功能都依赖于它。

您将在https://docs.jboss.org/author/display/GTNPORTAL36/JavaScript+in+GateIn中找到有关 GateIn 的 Javascript 功能的详细说明

于 2014-01-18T14:07:34.203 回答