protected override void OnInit(EventArgs e) { base.OnInit(e); jQuery.RequestDnnPluginsRegistration(); cboCacheProvider.SelectedIndexChanged += cboCacheProvider_Change; cboCopyPage.SelectedIndexChanged += cboCopyPage_SelectedIndexChanged; cboFolders.SelectedIndexChanged += cboFolders_SelectedIndexChanged; cboParentTab.SelectedIndexChanged += cboParentTab_SelectedIndexChanged; cmdClearAllPageCache.Click += cmdClearAllPageCache_Click; cmdClearPageCache.Click += cmdClearPageCache_Click; cmdCopyPerm.Click += cmdCopyPerm_Click; cmdCopySkin.Click += cmdCopySkin_Click; cmdDelete.Click += cmdDelete_Click; cmdUpdate.Click += cmdUpdate_Click; editDefaultCultureButton.Command += editDefaultCultureButton_Command; localizePagesButton.Click += localizePagesButton_Click; moduleLocalization.ModuleLocalizationChanged += moduleLocalization_ModuleLocalizationChanged; tabLocalization.TabLocalizationChanged += tabLocalization_ModuleLocalizationChanged; publishPageButton.Click += publishPageButton_Click; rbInsertPosition.SelectedIndexChanged += rbInsertPosition_SelectedIndexChanged; rblCacheIncludeExclude.SelectedIndexChanged += rblCacheIncludeExclude_Change; readyForTranslationButton.Click += readyForTranslationButton_Click; cmdSubmitTranslation.Click += submitTranslation_Click; cmdCancelTranslation.Click += cancelTranslation_Click; translatedCheckbox.CheckedChanged += translatedCheckbox_CheckedChanged; viewDefaultCultureButton.Command += viewDefaultCultureButton_Command; // Verify that the current user has access to edit this module if (!TabPermissionController.HasTabPermission("ADD,EDIT,COPY,DELETE,MANAGE")) { Response.Redirect(Globals.AccessDeniedURL(), true); } if ((Request.QueryString["action"] != null)) { _strAction = Request.QueryString["action"].ToLower(); } if (Tab.ContentItemId == Null.NullInteger && Tab.TabID != Null.NullInteger) { var tabCtl = new TabController(); //This tab does not have a valid ContentItem tabCtl.CreateContentItem(Tab); tabCtl.UpdateTab(Tab); } moduleLocalization.TabId = TabId; moduleLocalization.ShowEditColumn = false; DisableHostAdminFunctions(); }
protected override void OnInit(EventArgs e) { base.OnInit(e); jQuery.RequestDnnPluginsRegistration(); ClientResourceManager.RegisterScript(Page, "~/Resources/Shared/Scripts/dnn.extensions.js", FileOrder.Js.DefaultPriority); ClientResourceManager.RegisterScript(Page, "~/Resources/Shared/scripts/dnn.jquery.extensions.js", FileOrder.Js.DefaultPriority + 1); ClientResourceManager.RegisterScript(Page, "~/DesktopModules/Admin/Tabs/ClientScripts/dnn.PageUrl.js", FileOrder.Js.DefaultPriority + 2); ServicesFramework.Instance.RequestAjaxAntiForgerySupport(); cboCacheProvider.SelectedIndexChanged += cboCacheProvider_Change; cboCopyPage.SelectionChanged += cboCopyPage_SelectedIndexChanged; cboFolders.SelectionChanged += cboFolders_SelectedIndexChanged; cboParentTab.SelectionChanged += cboParentTab_SelectedIndexChanged; cmdClearAllPageCache.Click += cmdClearAllPageCache_Click; cmdClearPageCache.Click += cmdClearPageCache_Click; cmdCopyPerm.Click += cmdCopyPerm_Click; cmdCopySkin.Click += cmdCopySkin_Click; cmdDelete.Click += cmdDelete_Click; cmdUpdate.Click += cmdUpdate_Click; rblCacheIncludeExclude.SelectedIndexChanged += rblCacheIncludeExclude_Change; readyForTranslationButton.Click += readyForTranslationButton_Click; cmdSubmitTranslation.Click += submitTranslation_Click; cmdCancelTranslation.Click += cancelTranslation_Click; // Verify that the current user has access to edit this module if (!TabPermissionController.HasTabPermission("ADD,EDIT,COPY,DELETE,MANAGE")) { Response.Redirect(Globals.AccessDeniedURL(), true); } if ((Request.QueryString["action"] != null)) { _strAction = Request.QueryString["action"].ToLower(); } if (Tab.ContentItemId == Null.NullInteger && Tab.TabID != Null.NullInteger) { var tabCtl = new TabController(); //This tab does not have a valid ContentItem tabCtl.CreateContentItem(Tab); tabCtl.UpdateTab(Tab); } DisableHostAdminFunctions(); if (PortalSettings.ActiveTab.IsSuperTab || PortalSecurity.IsInRole("Administrators") || PortalSettings.ActiveTab.ParentId == Null.NullInteger) { // Add Non Specified if user is Admin or if current tab is already on the top level cboParentTab.UndefinedItem = new ListItem(SharedConstants.Unspecified, string.Empty); } cboCopyPage.UndefinedItem = new ListItem(SharedConstants.Unspecified, string.Empty); PortalAliasCaption.Text = PortalAlias.HTTPAlias; PortalAliasCaption.ToolTip = PortalAlias.HTTPAlias; UrlContainer.Attributes.Add(HtmlTextWriterAttribute.Class.ToString(), "um-page-url-container"); }
/// <summary> /// Copies the design to children. /// </summary> /// <param name="parentTab">The parent tab.</param> /// <param name="skinSrc">The skin SRC.</param> /// <param name="containerSrc">The container SRC.</param> /// <param name="cultureCode">The culture code.</param> public static void CopyDesignToChildren(TabInfo parentTab, string skinSrc, string containerSrc, string cultureCode) { bool clearCache = Null.NullBoolean; var tabController = new TabController(); List<TabInfo> childTabs = tabController.GetTabsByPortal(parentTab.PortalID).DescendentsOf(parentTab.TabID); foreach (TabInfo tab in childTabs) { if (TabPermissionController.CanAdminPage(tab)) { //Update ContentItem If neccessary if (tab.ContentItemId == Null.NullInteger && tab.TabID != Null.NullInteger) { tabController.CreateContentItem(tab); } Provider.UpdateTab(tab.TabID, tab.ContentItemId, tab.PortalID, tab.VersionGuid, tab.DefaultLanguageGuid, tab.LocalizedVersionGuid, tab.TabName, tab.IsVisible, tab.DisableLink, tab.ParentId, tab.IconFileRaw, tab.IconFileLargeRaw, tab.Title, tab.Description, tab.KeyWords, tab.IsDeleted, tab.Url, skinSrc, containerSrc, tab.StartDate, tab.EndDate, tab.RefreshInterval, tab.PageHeadText, tab.IsSecure, tab.PermanentRedirect, tab.SiteMapPriority, UserController.GetCurrentUserInfo().UserID, tab.CultureCode); UpdateTabVersion(tab.TabID); var eventLogController = new EventLogController(); eventLogController.AddLog(tab, PortalController.GetCurrentPortalSettings(), UserController.GetCurrentUserInfo().UserID, "", EventLogController.EventLogType.TAB_UPDATED); clearCache = true; } } if (clearCache) { DataCache.ClearTabsCache(childTabs[0].PortalID); } }