如何从头标记中删除Gatein门户容器资源

时间:2014-01-18 03:43:37

标签: javascript resources portal gatein

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

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"
    }
};

1 个答案:

答案 0 :(得分: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功能的详细说明