Example #1
0
        /// <summary>
        /// Registers the needed Java Scripts
        /// </summary>
        /// <param name="e">An <see cref="T:System.EventArgs"/> object that contains the event data.</param>
        protected override void OnPreRender([NotNull] EventArgs e)
        {
            this.PageContext.PageElements.RegisterJsBlockStartup(
                "BlockUIExecuteJs",
                JavaScriptBlocks.BlockUIExecuteJs("DeleteForumMessage", this.Delete.ClientID));

            base.OnPreRender(e);
        }
Example #2
0
        /// <summary>
        /// Registers the needed Java Scripts
        /// </summary>
        /// <param name="e">An <see cref="T:System.EventArgs"/> object that contains the event data.</param>
        protected override void OnPreRender([NotNull] EventArgs e)
        {
            this.PageContext.PageElements.RegisterJsBlockStartup(
                "BlockUIExecuteJs",
                JavaScriptBlocks.BlockUIExecuteJs(
                    "DeleteForumMessage",
                    "#{0},#{1}".FormatWith(this.Reindex.ClientID, this.Shrink.ClientID)));

            base.OnPreRender(e);
        }
Example #3
0
        /// <summary>
        /// The sync users_ click.
        /// </summary>
        /// <param name="sender">
        /// The sender.
        /// </param>
        /// <param name="e">
        /// The e.
        /// </param>
        protected void SyncUsers_Click([NotNull] object sender, [NotNull] EventArgs e)
        {
            // start...
            SyncMembershipUsersTask.Start(this.PageContext.PageBoardID);

            // enable timer...
            this.UpdateStatusTimer.Enabled = true;

            // show blocking ui...
            this.PageContext.PageElements.RegisterJsBlockStartup(
                "BlockUIExecuteJs", JavaScriptBlocks.BlockUIExecuteJs("SyncUsersMessage"));
        }
Example #4
0
        /// <summary>
        /// Delete The Forum
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void Save_Click([NotNull] object sender, [NotNull] EventArgs e)
        {
            string errorMessage;

            if (this.MoveTopics.Checked)
            {
                // Simply Delete the Forum with all of its Content
                var forumId = this.GetQueryStringAsInt("fa");

                // schedule...
                ForumDeleteTask.Start(
                    this.PageContext.PageBoardID, forumId.Value, this.ForumList.SelectedValue.ToType <int>(), out errorMessage);

                // enable timer...
                this.UpdateStatusTimer.Enabled = true;

                this.LocalizedLabel6.LocalizedTag = "DELETE_MOVE_TITLE";

                // show blocking ui...
                this.PageContext.PageElements.RegisterJsBlockStartup(
                    "BlockUIExecuteJs", JavaScriptBlocks.BlockUIExecuteJs("DeleteForumMessage"));
            }
            else
            {
                // Simply Delete the Forum with all of its Content
                var forumId = this.GetQueryStringAsInt("fa");

                // schedule...
                ForumDeleteTask.Start(this.PageContext.PageBoardID, forumId.Value, out errorMessage);

                // enable timer...
                this.UpdateStatusTimer.Enabled = true;

                this.LocalizedLabel6.LocalizedTag = "DELETE_TITLE";

                // show blocking ui...
                this.PageContext.PageElements.RegisterJsBlockStartup(
                    "BlockUIExecuteJs", JavaScriptBlocks.BlockUIExecuteJs("DeleteForumMessage"));
            }

            // show blocking ui...
            this.PageContext.PageElements.RegisterJsBlockStartup(
                "BlockUIExecuteJs", JavaScriptBlocks.BlockUIExecuteJs("DeleteForumMessage"));

            if (errorMessage.IsSet())
            {
                this.PageContext.AddLoadMessage(errorMessage, MessageTypes.Error);
            }
        }
Example #5
0
        /// <summary>
        /// The forum list_ item command.
        /// </summary>
        /// <param name="source">
        /// The source.
        /// </param>
        /// <param name="e">
        /// The e.
        /// </param>
        protected void ForumList_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            switch (e.CommandName)
            {
            case "edit":
                YafBuildLink.Redirect(ForumPages.admin_editforum, "f={0}", e.CommandArgument);
                break;

            case "delete":

                // schedule...
                ForumDeleteTask.Start(PageContext.PageBoardID, Convert.ToInt32(e.CommandArgument));

                // enable timer...
                this.UpdateStatusTimer.Enabled = true;

                // show blocking ui...
                PageContext.PageElements.RegisterJsBlockStartup("BlockUIExecuteJs", JavaScriptBlocks.BlockUIExecuteJs("DeleteForumMessage "));
                break;
            }
        }