/// <summary> /// Handles the loading of the module setting for this control /// </summary> public override void LoadSettings() { try { if (AJAX.IsInstalled()) { AJAX.RegisterScriptManager(); } if (!IsPostBack) { if (!Null.IsNull(Settings.EmployeeID)) { comboEmployees.SelectByValue(Settings.EmployeeID); } else { comboEmployees.SelectedIndex = 0; } checkAutoTitle.Checked = Settings.AutoTitle; checkShowCurrentUser.Checked = Settings.ShowCurrentUser; textPhotoWidth.Text = Settings.PhotoWidth.ToString(); } } catch (Exception ex) { Exceptions.ProcessModuleLoadException(this, ex); } }
protected override void OnInit(EventArgs e) { this.Load += this.Page_Load; // LoadControlType(); base.OnInit(e); // System.InvalidOperationException: The EnableScriptGlobalization property cannot be changed during async postbacks or after the Init event. if (!this.IsPostBack && AJAX.IsInstalled()) { AJAX.RegisterScriptManager(); var scriptManager = AJAX.GetScriptManager(this.Page); scriptManager.EnableScriptGlobalization = true; scriptManager.EnableScriptLocalization = true; } this.teDescription.Width = this.ItemEditDescriptionWidth; this.teDescription.Height = this.ItemEditDescriptionHeight; if (Engage.Utility.HasValue(this.VersionInfoObject.Url)) { this.ctlUrlSelection.Url = this.VersionInfoObject.Url; this.chkNewWindow.Checked = this.VersionInfoObject.NewWindow; this.pnlUrlSelection.Visible = true; this.chkUrlSelection.Checked = true; this.UseUrls = true; } // TODO: should we allow NewWindow to work even if the URL option isn't chosen }
protected new void Page_Init(object sender, EventArgs e) { base.Page_Init(sender, e); if (AJAX.IsInstalled()) { AJAX.RegisterPostBackControl(btnUpload); } }
/// <summary> /// Raises the <see cref="E:System.Web.UI.Control.Init"/> event. /// </summary> /// <param name="e">An <see cref="T:System.EventArgs"/> object that contains the event data.</param> protected override void OnInit(EventArgs e) { base.OnInit(e); this.RegisterScripts(); if (AJAX.IsInstalled()) { AJAX.RegisterScriptManager(); } }
/// <summary> /// Raises the <see cref="E:System.Web.UI.Control.Init"/> event. /// </summary> /// <param name="e">An <see cref="T:System.EventArgs"/> object that contains the event data.</param> protected override void OnInit(EventArgs e) { base.OnInit(e); Load += Page_Load; btnConfigure.Click += BtnConfigureClick; ddlChooseDisplayType.SelectedIndexChanged += DdlChooseDisplayTypeSelectedIndexChanged; if (AJAX.IsInstalled()) { AJAX.RegisterScriptManager(); } }
/// <summary> /// Handles the Page_Load event. /// </summary> /// <param name="e">Event arguments.</param> protected override void OnLoad(EventArgs e) { base.OnLoad(e); if (EnableAjax && AJAX.IsInstalled()) { AJAX.RegisterScriptManager(); } try { if (!IsPostBack) { // load the data into the control the first time we hit this page // check we have an item to lookup if (ItemId != null) { // load the item var item = GetItemWithDependencies(ItemId.Value); if (item != null && CanEditItem(item)) { ButtonDelete.Visible = CanDeleteItem(item); LoadItem(item); } else { Response.Redirect(Globals.NavigateURL(), true); } } else { ButtonDelete.Visible = false; if (ModuleAuditControl != null) { ModuleAuditControl.Visible = false; } LoadNewItem(); } } else { PostBack(); } } catch (Exception ex) { Exceptions.ProcessModuleLoadException(this, ex); } }
protected override void OnInit(EventArgs e) { base.OnInit(e); this.Load += this.ItemDisplayOptionsLoad; var moduleCssUrl = this.ResolveUrl("Module.css"); PageBase.RegisterStyleSheet(this.Page, moduleCssUrl, true); if (AJAX.IsInstalled()) { AJAX.RegisterScriptManager(); } }
/// <summary> /// Raises the <see cref="E:System.Web.UI.Control.Init"/> event. /// </summary> /// <param name="e">An <see cref="T:System.EventArgs"/> object that contains the event data.</param> protected override void OnInit(EventArgs e) { base.OnInit(e); this.Load += this.Page_Load; this.btnConfigure.Click += this.BtnConfigureClick; this.ddlChooseDisplayType.SelectedIndexChanged += this.DdlChooseDisplayTypeSelectedIndexChanged; var moduleCssUrl = this.ResolveUrl("Module.css"); PageBase.RegisterStyleSheet(this.Page, moduleCssUrl, true); if (AJAX.IsInstalled()) { AJAX.RegisterScriptManager(); } }
/// <summary> /// Load current settings into the controls from the modulesettings /// </summary> /// <remarks></remarks> public override void LoadSettings() { // Force full PostBack since these pass off to aspx page if (AJAX.IsInstalled()) { AJAX.RegisterPostBackControl(this.cmdUpgrade); } var emSettings = EventModuleSettings.GetEventModuleSettings(this.ModuleId, this.LocalResourceFile); var dummyRmid = emSettings.RecurDummy; this.divUpgrade.Visible = false; this.divRetry.Visible = false; if (!string.IsNullOrEmpty(dummyRmid) && dummyRmid != "99999") { this.divUpgrade.Visible = true; } }
/// <summary> /// Raises the <see cref="Control.Init"/> event. /// </summary> /// <param name="e">An <see cref="EventArgs"/> object that contains the event data.</param> protected override void OnInit(EventArgs e) { try { if (AJAX.IsInstalled()) { // AJAX.RegisterScriptManager(); AJAX.WrapUpdatePanelControl(this.SavedSearchesRepeater, true); } this.Load += this.Page_Load; this.SavedSearchesRepeater.ItemDataBound += this.SavedSearchesRepeater_ItemDataBound; this.AppliedJobsRepeater.ItemDataBound += this.AppliedJobsRepeater_ItemDataBound; this.AppliedJobsRepeater.ItemCommand += this.AppliedJobsRepeater_ItemCommand; } catch (Exception exc) { Exceptions.ProcessModuleLoadException(this, exc); } base.OnInit(e); }
protected override void OnInit(EventArgs e) { if (!PermissionController.CanManageJobListingOptions(this)) { this.DenyAccess(); return; } if (AJAX.IsInstalled()) { // AJAX.AddScriptManager(Page); AJAX.WrapUpdatePanelControl(this.LimitOptionPlaceholder, false); this.LimitCheckBox.CheckedChanged += this.LimitCheckBox_CheckedChanged; this.LimitCheckBox.AutoPostBack = true; } this.LimitRangeValidator.MaximumValue = int.MaxValue.ToString(CultureInfo.InvariantCulture); this.Load += this.Page_Load; this.UpdateButton.Click += this.UpdateButton_Click; this.CancelButton.Click += this.CancelButton_Click; base.OnInit(e); }
/// ----------------------------------------------------------------------------- /// <summary> /// CreateChildControls builds the control tree /// </summary> protected override void CreateChildControls() { Controls.Clear(); //Load Module Control (or cached control) LoadModuleControl(); //Optionally Inject AJAX Update Panel if (ModuleControl != null) { //if module is dynamically loaded and AJAX is installed and the control supports partial rendering (defined in ModuleControls table ) if (!_isCached && _moduleConfiguration.ModuleControl.SupportsPartialRendering && AJAX.IsInstalled()) { LoadUpdatePanel(); } else { //inject a message placeholder for common module messaging - UI.Skins.Skin.AddModuleMessage InjectMessageControl(this); InjectVersionToTheModuleIfSupported(); //inject the module into the panel InjectModuleContent(_control); } } }
protected override void CreateChildControls() { Controls.Clear(); LoadModuleControl(); if (ModuleControl != null) { if (!_IsCached && _ModuleConfiguration.ModuleControl.SupportsPartialRendering && AJAX.IsInstalled()) { LoadUpdatePanel(); } else { InjectMessageControl(this); InjectModuleContent(_Control); } } }
/// <summary> /// The initialize component. /// </summary> private void InitializeComponent() { if (AJAX.IsInstalled()) { AJAX.RegisterScriptManager(); } this.forum1 = new Forum(); this.pnlModuleContent.Controls.Add(this.forum1); this.Load += this.DotNetNukeModule_Load; this.forum1.PageTitleSet += this.Forum1_PageTitleSet; // This will create an error if there is no setting for forumboardid if (this.Settings["forumboardid"] != null) { this.forum1.BoardID = this.Settings["forumboardid"].ToType <int>(); var boardSettingsTabId = YafContext.Current.BoardSettings != null && YafContext.Current.BoardSettings.BoardID.Equals(this.forum1.BoardID) ? YafContext.Current.BoardSettings.DNNPageTab : new YafLoadBoardSettings(this.forum1.BoardID).DNNPageTab; if (boardSettingsTabId.Equals(-1) || !boardSettingsTabId.Equals(this.TabId) && !this.CurrentPortalSettings.ContentLocalizationEnabled) { if (HttpContext.Current.User.Identity.IsAuthenticated && UserController.GetCurrentUserInfo().IsSuperUser) { this.Response.Redirect( this.ResolveUrl( "~/tabid/{0}/ctl/Edit/mid/{1}/Default.aspx".FormatWith( this.PortalSettings.ActiveTab.TabID, this.ModuleId))); } /*else * { * boardSettings.DNNPageTab = this.TabId; * * // save the settings to the database * boardSettings.SaveRegistry(); * * // Reload forum settings * YafContext.Current.BoardSettings = null; * }*/ } if (YafContext.Current.BoardSettings.DNNPortalId.Equals(-1)) { var boardSettings = new YafLoadBoardSettings(this.forum1.BoardID) { DNNPageTab = this.TabId, DNNPortalId = this.PortalId }; // save the settings to the database boardSettings.SaveRegistry(); } // Inherit Language from Dnn? var ineritDnnLanguage = true; if (this.Settings["InheritDnnLanguage"] != null) { ineritDnnLanguage = this.Settings["InheritDnnLanguage"].ToType <bool>(); } if (ineritDnnLanguage) { SetDnnLangToYaf(); } } else { if (HttpContext.Current.User.Identity.IsAuthenticated && UserController.GetCurrentUserInfo().IsSuperUser) { this.Response.Redirect( this.ResolveUrl( "~/tabid/{0}/ctl/Edit/mid/{1}/Default.aspx".FormatWith( this.PortalSettings.ActiveTab.TabID, this.ModuleId))); } else { this.pnlModuleContent.Controls.Clear(); this.pnlModuleContent.Controls.Add( new Literal { Text = "<div class=\"dnnFormMessage dnnFormInfo\">Please login as Superuser (host) and Setup the forum first.</div>" }); } } }
/// <summary> /// The initialize component. /// </summary> private void InitializeComponent() { if (AJAX.IsInstalled()) { AJAX.RegisterScriptManager(); } this.InitializeForumIfNotExist(); this.forum1 = new Forum(); this.pnlModuleContent.Controls.Add(this.forum1); this.Load += this.DotNetNukeModuleLoad; this.forum1.PageTitleSet += this.Forum1_PageTitleSet; // This will create an error if there is no setting for forumboardid if (this.Settings["forumboardid"] != null) { this.forum1.BoardID = this.Settings["forumboardid"].ToType <int>(); var boardSettingsTabId = BoardContext.Current.BoardSettings != null && this.PageContext().BoardSettings.BoardID.Equals(this.forum1.BoardID) ? this.PageContext().BoardSettings.DNNPageTab : new LoadBoardSettings(this.forum1.BoardID).DNNPageTab; if (!boardSettingsTabId.Equals(this.TabId) && boardSettingsTabId > -1) { if (HttpContext.Current.User.Identity.IsAuthenticated && UserController.Instance.GetCurrentUserInfo().IsSuperUser) { this.Response.Redirect( this.ResolveUrl( $"~/tabid/{this.PortalSettings.ActiveTab.TabID}/ctl/Edit/mid/{this.ModuleId}/Default.aspx")); } } if (this.PageContext().BoardSettings.DNNPortalId.Equals(-1)) { var boardSettings = new LoadBoardSettings(this.forum1.BoardID) { DNNPageTab = this.TabId, DNNPortalId = this.PortalId }; // save the settings to the database boardSettings.SaveRegistry(); } // Inherit Language from Dnn? var inheritDnnLanguage = true; if (this.Settings["InheritDnnLanguage"] != null) { inheritDnnLanguage = this.Settings["InheritDnnLanguage"].ToType <bool>(); } if (inheritDnnLanguage) { this.OverrideLanguage(); } } else { if (HttpContext.Current.User.Identity.IsAuthenticated && UserController.Instance.GetCurrentUserInfo().IsSuperUser) { this.Response.Redirect( this.ResolveUrl( $"~/tabid/{this.PortalSettings.ActiveTab.TabID}/ctl/Edit/mid/{this.ModuleId}/Default.aspx")); } else { this.pnlModuleContent.Controls.Clear(); this.pnlModuleContent.Controls.Add( new Literal { Text = "<div class=\"dnnFormMessage dnnFormInfo\">Please login as Superuser (host) and Setup the forum first.</div>" }); } } }