コード例 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        // Setup the filesystem browser
        int webPartId = QueryHelper.GetInteger("webpartid", 0);

        if (webPartId > 0)
        {
            WebPartInfo wpi = WebPartInfoProvider.GetWebPartInfo(webPartId);
            EditedObject = wpi;

            if (wpi != null)
            {
                // Ensure the theme folder
                themeElem.Path = wpi.GetThemePath();
            }
        }
        else
        {
            EditedObject = null;
        }
    }
コード例 #2
0
    /// <summary>
    /// Initializes edit menu.
    /// </summary>
    protected void InitalizeMenu()
    {
        string[,] tabs = new string[8, 4];
        int i = 0;

        tabs[i, 0] = GetString("General.General");
        tabs[i, 1] = "SetHelpTopic('helpTopic', 'webpart_general');";
        tabs[i, 2] = URLHelper.ResolveUrl("~/CMSModules/PortalEngine/UI/WebParts/Development/WebPart_Edit_General.aspx?webpartid=" + webpartid);
        if (isInherited)
        {
            tabs[i, 1] = "SetHelpTopic('helpTopic', 'webpart_general_inherited');";
        }
        i++;

        tabs[i, 0] = GetString("WebParts.Properties");
        tabs[i, 1] = "SetHelpTopic('helpTopic', 'webpart_properties');";
        tabs[i, 2] = URLHelper.ResolveUrl("~/CMSModules/PortalEngine/UI/WebParts/Development/WebPart_Edit_Properties.aspx?webpartid=" + webpartid);
        if (isInherited)
        {
            tabs[i, 1] = "SetHelpTopic('helpTopic', 'webpart_properties_inherited');";
        }
        i++;

        tabs[i, 0] = GetString("WebParts.SystemProperties");
        tabs[i, 1] = "SetHelpTopic('helpTopic', 'webpart_systemproperties');";
        tabs[i, 2] = URLHelper.ResolveUrl("~/CMSModules/PortalEngine/UI/WebParts/Development/WebPart_Edit_SystemProperties.aspx?webpartid=" + webpartid);
        i++;

        // Layout tab
        tabs[i, 0] = GetString("WebParts.Layout");
        tabs[i, 1] = "SetHelpTopic('helpTopic', 'webpart_layout');";
        tabs[i, 2] = URLHelper.ResolveUrl("~/CMSModules/PortalEngine/UI/WebParts/Development/WebPart_Edit_Layout.aspx?webpartid=" + webpartid);
        i++;

        // CSS tab
        tabs[i, 0] = GetString("WebParts.CSS");
        tabs[i, 1] = "SetHelpTopic('helpTopic', 'webpart_css');";
        tabs[i, 2] = URLHelper.ResolveUrl("~/CMSModules/PortalEngine/UI/WebParts/Development/WebPart_Edit_CSS.aspx?webpartid=" + webpartid);
        i++;

        if (!StorageHelper.IsExternalStorage(wpi.GetThemePath()))
        {
            // Theme tab
            tabs[i, 0] = GetString("Stylesheet.Theme");
            tabs[i, 1] = "SetHelpTopic('helpTopic', 'webpart_theme');";
            tabs[i, 2] = URLHelper.ResolveUrl("~/CMSModules/PortalEngine/UI/WebParts/Development/WebPart_Edit_Theme.aspx?webpartid=" + webpartid);
            i++;
        }

        // Documentation tab
        tabs[i, 0] = GetString("WebParts.Documentation");
        tabs[i, 1] = "SetHelpTopic('helpTopic', 'webpart_documentation');";
        tabs[i, 2] = URLHelper.ResolveUrl("~/CMSModules/PortalEngine/UI/WebParts/Development/WebPart_Edit_Documentation.aspx?webpartid=" + webpartid);
        i++;

        if (ValidationHelper.GetBoolean(SettingsHelper.AppSettings["CMSDevelopmentMode"], false))
        {
            // Code tab
            tabs[i, 0] = GetString("WebParts.Code");
            tabs[i, 1] = "SetHelpTopic('helpTopic', 'webpart_code');";
            tabs[i, 2] = URLHelper.ResolveUrl("~/CMSModules/PortalEngine/UI/WebParts/Development/WebPart_Edit_Code.aspx?webpartid=" + webpartid);
            i++;
        }

        CurrentMaster.Tabs.UrlTarget = "webparteditcontent";
        CurrentMaster.Tabs.Tabs      = tabs;
    }