public void Page_Load(object sender, EventArgs e)
        {
            if (IsForbidden)
            {
                return;
            }

            PageUtils.CheckRequestParameter("PublishmentSystemID", "NodeID");
            _nodeId = Body.GetQueryInt("NodeID");

            if (!IsPostBack)
            {
                var nodeInfo = NodeManager.GetNodeInfo(PublishmentSystemId, _nodeId);

                if (nodeInfo.NodeType == ENodeType.BackgroundPublishNode || nodeInfo.LinkType == ELinkType.LinkToFirstChannel || nodeInfo.LinkType == ELinkType.LinkToFirstContent || nodeInfo.LinkType == ELinkType.LinkToLastAddChannel || nodeInfo.LinkType == ELinkType.NoLink)
                {
                    phFilePath.Visible = false;
                }

                var showPopWinString = ModalFilePathRule.GetOpenWindowString(PublishmentSystemId, _nodeId, true, tbChannelFilePathRule.ClientID);
                btnCreateChannelRule.Attributes.Add("onclick", showPopWinString);

                showPopWinString = ModalFilePathRule.GetOpenWindowString(PublishmentSystemId, _nodeId, false, tbContentFilePathRule.ClientID);
                btnCreateContentRule.Attributes.Add("onclick", showPopWinString);

                if (string.IsNullOrEmpty(nodeInfo.FilePath))
                {
                    tbFilePath.Text = PageUtility.GetInputChannelUrl(PublishmentSystemInfo, nodeInfo);
                }
                else
                {
                    tbFilePath.Text = nodeInfo.FilePath;
                }

                if (string.IsNullOrEmpty(nodeInfo.ChannelFilePathRule))
                {
                    tbChannelFilePathRule.Text = PathUtility.GetChannelFilePathRule(PublishmentSystemInfo, _nodeId);
                }
                else
                {
                    tbChannelFilePathRule.Text = nodeInfo.ChannelFilePathRule;
                }

                if (string.IsNullOrEmpty(nodeInfo.ContentFilePathRule))
                {
                    tbContentFilePathRule.Text = PathUtility.GetContentFilePathRule(PublishmentSystemInfo, _nodeId);
                }
                else
                {
                    tbContentFilePathRule.Text = nodeInfo.ContentFilePathRule;
                }
            }
        }
        public void Page_Load(object sender, EventArgs e)
        {
            if (IsForbidden)
            {
                return;
            }

            PageUtils.CheckRequestParameter("siteId", "channelId");
            _channelId = AuthRequest.GetQueryInt("channelId");

            if (IsPostBack)
            {
                return;
            }

            var channelInfo = ChannelManager.GetChannelInfo(SiteId, _channelId);

            if (SiteId == _channelId)
            {
                PhChannel.Visible = false;
            }
            else
            {
                TbLinkUrl.Text = channelInfo.LinkUrl;

                ELinkTypeUtils.AddListItems(DdlLinkType);
                ControlUtils.SelectSingleItem(DdlLinkType, channelInfo.LinkType);

                TbFilePath.Text = string.IsNullOrEmpty(channelInfo.FilePath) ? PageUtility.GetInputChannelUrl(SiteInfo, channelInfo, false) : channelInfo.FilePath;
            }

            TbChannelFilePathRule.Text = string.IsNullOrEmpty(channelInfo.ChannelFilePathRule) ? PathUtility.GetChannelFilePathRule(SiteInfo, _channelId) : channelInfo.ChannelFilePathRule;
            BtnCreateChannelRule.Attributes.Add("onclick", ModalFilePathRule.GetOpenWindowString(SiteId, _channelId, true, TbChannelFilePathRule.ClientID));

            TbContentFilePathRule.Text = string.IsNullOrEmpty(channelInfo.ContentFilePathRule) ? PathUtility.GetContentFilePathRule(SiteInfo, _channelId) : channelInfo.ContentFilePathRule;
            BtnCreateContentRule.Attributes.Add("onclick", ModalFilePathRule.GetOpenWindowString(SiteId, _channelId, false, TbContentFilePathRule.ClientID));

            ControlUtils.SelectSingleItem(RblIsChannelCreatable, channelInfo.Additional.IsChannelCreatable.ToString());
            ControlUtils.SelectSingleItem(RblIsContentCreatable, channelInfo.Additional.IsContentCreatable.ToString());
        }
        public void Page_Load(object sender, EventArgs e)
        {
            if (IsForbidden)
            {
                return;
            }

            PageUtils.CheckRequestParameter("siteId", "channelId");
            _channelId = AuthRequest.GetQueryInt("channelId");

            if (IsPostBack)
            {
                return;
            }

            var channelInfo = ChannelManager.GetChannelInfo(SiteId, _channelId);
            var linkType    = ELinkTypeUtils.GetEnumType(channelInfo.LinkType);

            if (channelInfo.ParentId == 0 || linkType == ELinkType.LinkToFirstChannel || linkType == ELinkType.LinkToFirstContent || linkType == ELinkType.LinkToLastAddChannel || linkType == ELinkType.NoLink)
            {
                PhFilePath.Visible = false;
            }

            var showPopWinString = ModalFilePathRule.GetOpenWindowString(SiteId, _channelId, true, TbChannelFilePathRule.ClientID);

            BtnCreateChannelRule.Attributes.Add("onclick", showPopWinString);

            showPopWinString = ModalFilePathRule.GetOpenWindowString(SiteId, _channelId, false, TbContentFilePathRule.ClientID);
            BtnCreateContentRule.Attributes.Add("onclick", showPopWinString);

            TbFilePath.Text = string.IsNullOrEmpty(channelInfo.FilePath) ? PageUtility.GetInputChannelUrl(SiteInfo, channelInfo, false) : channelInfo.FilePath;

            TbChannelFilePathRule.Text = string.IsNullOrEmpty(channelInfo.ChannelFilePathRule) ? PathUtility.GetChannelFilePathRule(SiteInfo, _channelId) : channelInfo.ChannelFilePathRule;

            TbContentFilePathRule.Text = string.IsNullOrEmpty(channelInfo.ContentFilePathRule) ? PathUtility.GetContentFilePathRule(SiteInfo, _channelId) : channelInfo.ContentFilePathRule;
        }
Example #4
0
        public void Page_Load(object sender, EventArgs e)
        {
            if (IsForbidden)
            {
                return;
            }

            PageUtils.CheckRequestParameter("PublishmentSystemID", "NodeID", "ReturnUrl");
            _nodeId    = Body.GetQueryInt("NodeID");
            _returnUrl = StringUtils.ValueFromUrl(PageUtils.FilterSqlAndXss(Body.GetQueryString("ReturnUrl")));
            //if (!base.HasChannelPermissions(this.nodeID, AppManager.CMS.Permission.Channel.ChannelAdd))
            //{
            //    PageUtils.RedirectToErrorPage("您没有添加栏目的权限!");
            //    return;
            //}

            var parentNodeInfo = NodeManager.GetNodeInfo(PublishmentSystemId, _nodeId);

            if (parentNodeInfo.Additional.IsChannelAddable == false)
            {
                PageUtils.RedirectToErrorPage("此栏目不能添加子栏目!");
                return;
            }

            channelControl = (ChannelAuxiliaryControl)FindControl("ControlForAuxiliary");

            if (!IsPostBack)
            {
                BreadCrumb(AppManager.Cms.LeftMenu.IdContent, "添加栏目", string.Empty);

                NodeManager.AddListItems(ParentNodeID.Items, PublishmentSystemInfo, true, true, true, Body.AdministratorName);
                ControlUtils.SelectListItems(ParentNodeID, _nodeId.ToString());

                var contentModelInfoList = ContentModelManager.GetContentModelInfoList(PublishmentSystemInfo);
                foreach (var modelInfo in contentModelInfoList)
                {
                    ContentModelID.Items.Add(new ListItem(modelInfo.ModelName, modelInfo.ModelId));
                }
                ControlUtils.SelectListItems(ContentModelID, parentNodeInfo.ContentModelId);

                channelControl.SetParameters(null, false, IsPostBack);

                NavigationPicPath.Attributes.Add("onchange", GetShowImageScript("preview_NavigationPicPath", PublishmentSystemInfo.PublishmentSystemUrl));

                var showPopWinString = ModalFilePathRule.GetOpenWindowString(PublishmentSystemId, _nodeId, true, ChannelFilePathRule.ClientID);
                CreateChannelRule.Attributes.Add("onclick", showPopWinString);

                showPopWinString = ModalFilePathRule.GetOpenWindowString(PublishmentSystemId, _nodeId, false, ContentFilePathRule.ClientID);
                CreateContentRule.Attributes.Add("onclick", showPopWinString);

                showPopWinString = ModalSelectImage.GetOpenWindowString(PublishmentSystemInfo, NavigationPicPath.ClientID);
                SelectImage.Attributes.Add("onclick", showPopWinString);

                showPopWinString = ModalUploadImage.GetOpenWindowString(PublishmentSystemId, NavigationPicPath.ClientID);
                UploadImage.Attributes.Add("onclick", showPopWinString);

                IsChannelAddable.Items[0].Value = true.ToString();
                IsChannelAddable.Items[1].Value = false.ToString();
                IsContentAddable.Items[0].Value = true.ToString();
                IsContentAddable.Items[1].Value = false.ToString();

                ELinkTypeUtils.AddListItems(LinkType);

                NodeGroupNameCollection.DataSource = DataProvider.NodeGroupDao.GetDataSource(PublishmentSystemId);
                ChannelTemplateID.DataSource       = DataProvider.TemplateDao.GetDataSourceByType(PublishmentSystemId, ETemplateType.ChannelTemplate);
                ContentTemplateID.DataSource       = DataProvider.TemplateDao.GetDataSourceByType(PublishmentSystemId, ETemplateType.ContentTemplate);

                DataBind();

                ChannelTemplateID.Items.Insert(0, new ListItem("<未设置>", "0"));
                ChannelTemplateID.Items[0].Selected = true;

                ContentTemplateID.Items.Insert(0, new ListItem("<未设置>", "0"));
                ContentTemplateID.Items[0].Selected = true;
                Content.SetParameters(PublishmentSystemInfo, NodeAttribute.Content, null, false, IsPostBack);
            }
            else
            {
                channelControl.SetParameters(Request.Form, false, IsPostBack);
            }
        }
Example #5
0
        public void Page_Load(object sender, EventArgs e)
        {
            if (IsForbidden)
            {
                return;
            }

            PageUtils.CheckRequestParameter("PublishmentSystemID", "NodeID", "ReturnUrl");

            _nodeId    = Body.GetQueryInt("NodeID");
            _returnUrl = StringUtils.ValueFromUrl(Body.GetQueryString("ReturnUrl"));

            if (Body.GetQueryString("CanNotEdit") == null && Body.GetQueryString("UncheckedChannel") == null)
            {
                if (!HasChannelPermissions(_nodeId, AppManager.Cms.Permission.Channel.ChannelEdit))
                {
                    PageUtils.RedirectToErrorPage("您没有修改栏目的权限!");
                    return;
                }
            }
            if (Body.IsQueryExists("CanNotEdit"))
            {
                Submit.Visible = false;
            }

            var nodeInfo = NodeManager.GetNodeInfo(PublishmentSystemId, _nodeId);

            if (nodeInfo != null)
            {
                channelControl = (ChannelAuxiliaryControl)FindControl("ControlForAuxiliary");
                if (!IsPostBack)
                {
                    BreadCrumb(AppManager.Cms.LeftMenu.IdContent, "编辑栏目", string.Empty);

                    var contentModelInfoList = ContentModelManager.GetContentModelInfoList(PublishmentSystemInfo);
                    foreach (var modelInfo in contentModelInfoList)
                    {
                        ContentModelID.Items.Add(new ListItem(modelInfo.ModelName, modelInfo.ModelId));
                    }
                    ControlUtils.SelectListItems(ContentModelID, nodeInfo.ContentModelId);

                    channelControl.SetParameters(nodeInfo.Additional.Attributes, true, IsPostBack);

                    NavigationPicPath.Attributes.Add("onchange", GetShowImageScript("preview_NavigationPicPath", PublishmentSystemInfo.PublishmentSystemUrl));

                    var showPopWinString = ModalFilePathRule.GetOpenWindowString(PublishmentSystemId, _nodeId, true, ChannelFilePathRule.ClientID);
                    CreateChannelRule.Attributes.Add("onclick", showPopWinString);

                    showPopWinString = ModalFilePathRule.GetOpenWindowString(PublishmentSystemId, _nodeId, false, ContentFilePathRule.ClientID);
                    CreateContentRule.Attributes.Add("onclick", showPopWinString);

                    showPopWinString = ModalSelectImage.GetOpenWindowString(PublishmentSystemInfo, NavigationPicPath.ClientID);
                    SelectImage.Attributes.Add("onclick", showPopWinString);

                    showPopWinString = ModalUploadImage.GetOpenWindowString(PublishmentSystemId, NavigationPicPath.ClientID);
                    UploadImage.Attributes.Add("onclick", showPopWinString);
                    IsChannelAddable.Items[0].Value = true.ToString();
                    IsChannelAddable.Items[1].Value = false.ToString();
                    IsContentAddable.Items[0].Value = true.ToString();
                    IsContentAddable.Items[1].Value = false.ToString();

                    ELinkTypeUtils.AddListItems(LinkType);

                    NodeGroupNameCollection.DataSource = DataProvider.NodeGroupDao.GetDataSource(PublishmentSystemId);

                    ChannelTemplateID.DataSource = DataProvider.TemplateDao.GetDataSourceByType(PublishmentSystemId, ETemplateType.ChannelTemplate);

                    ContentTemplateID.DataSource = DataProvider.TemplateDao.GetDataSourceByType(PublishmentSystemId, ETemplateType.ContentTemplate);

                    DataBind();

                    ChannelTemplateID.Items.Insert(0, new ListItem("<未设置>", "0"));
                    ControlUtils.SelectListItems(ChannelTemplateID, nodeInfo.ChannelTemplateId.ToString());

                    ContentTemplateID.Items.Insert(0, new ListItem("<未设置>", "0"));
                    ControlUtils.SelectListItems(ContentTemplateID, nodeInfo.ContentTemplateId.ToString());

                    NodeName.Text      = nodeInfo.NodeName;
                    NodeIndexName.Text = nodeInfo.NodeIndexName;
                    LinkUrl.Text       = nodeInfo.LinkUrl;

                    foreach (ListItem item in NodeGroupNameCollection.Items)
                    {
                        if (CompareUtils.Contains(nodeInfo.NodeGroupNameCollection, item.Value))
                        {
                            item.Selected = true;
                        }
                        else
                        {
                            item.Selected = false;
                        }
                    }
                    FilePath.Text            = nodeInfo.FilePath;
                    ChannelFilePathRule.Text = nodeInfo.ChannelFilePathRule;
                    ContentFilePathRule.Text = nodeInfo.ContentFilePathRule;

                    //NodeProperty
                    ControlUtils.SelectListItems(LinkType, ELinkTypeUtils.GetValue(nodeInfo.LinkType));
                    ControlUtils.SelectListItems(IsChannelAddable, nodeInfo.Additional.IsChannelAddable.ToString());
                    ControlUtils.SelectListItems(IsContentAddable, nodeInfo.Additional.IsContentAddable.ToString());

                    NavigationPicPath.Text = nodeInfo.ImageUrl;

                    var formCollection = new NameValueCollection();
                    formCollection[NodeAttribute.Content] = nodeInfo.Content;
                    Content.SetParameters(PublishmentSystemInfo, NodeAttribute.Content, formCollection, true, IsPostBack);

                    Keywords.Text    = nodeInfo.Keywords;
                    Description.Text = nodeInfo.Description;

                    //this.Content.PublishmentSystemID = base.PublishmentSystemID;
                    //this.Content.Text = StringUtility.TextEditorContentDecode(nodeInfo.Content, ConfigUtils.Instance.ApplicationPath, base.PublishmentSystemInfo.PublishmentSystemUrl);

                    if (nodeInfo.NodeType == ENodeType.BackgroundPublishNode)
                    {
                        LinkURLRow.Visible           = false;
                        LinkTypeRow.Visible          = false;
                        ChannelTemplateIDRow.Visible = false;
                        FilePathRow.Visible          = false;
                    }
                }
                else
                {
                    channelControl.SetParameters(Request.Form, true, IsPostBack);
                }
            }
        }
Example #6
0
        public void Page_Load(object sender, EventArgs e)
        {
            if (IsForbidden)
            {
                return;
            }

            PageUtils.CheckRequestParameter("siteId", "channelId", "ReturnUrl");

            _channelId = Body.GetQueryInt("channelId");
            ReturnUrl  = StringUtils.ValueFromUrl(Body.GetQueryString("ReturnUrl"));

            if (Body.GetQueryString("CanNotEdit") == null && Body.GetQueryString("UncheckedChannel") == null)
            {
                if (!HasChannelPermissions(_channelId, ConfigManager.Permissions.Channel.ChannelEdit))
                {
                    PageUtils.RedirectToErrorPage("您没有修改栏目的权限!");
                    return;
                }
            }
            if (Body.IsQueryExists("CanNotEdit"))
            {
                BtnSubmit.Visible = false;
            }

            var nodeInfo = ChannelManager.GetChannelInfo(SiteId, _channelId);

            if (nodeInfo == null)
            {
                return;
            }

            CacAttributes.SiteInfo  = SiteInfo;
            CacAttributes.ChannelId = _channelId;

            if (!IsPostBack)
            {
                DdlContentModelPluginId.Items.Add(new ListItem("<默认>", string.Empty));
                var contentTables = PluginContentManager.GetContentModelPlugins();
                foreach (var contentTable in contentTables)
                {
                    DdlContentModelPluginId.Items.Add(new ListItem(contentTable.Title, contentTable.Id));
                }
                ControlUtils.SelectSingleItem(DdlContentModelPluginId, nodeInfo.ContentModelPluginId);

                var plugins = PluginContentManager.GetAllContentRelatedPlugins(false);
                if (plugins.Count > 0)
                {
                    var relatedPluginIds =
                        TranslateUtils.StringCollectionToStringList(nodeInfo.ContentRelatedPluginIds);
                    foreach (var pluginMetadata in plugins)
                    {
                        CblContentRelatedPluginIds.Items.Add(new ListItem(pluginMetadata.Title, pluginMetadata.Id)
                        {
                            Selected = relatedPluginIds.Contains(pluginMetadata.Id)
                        });
                    }
                }
                else
                {
                    PhContentRelatedPluginIds.Visible = false;
                }

                CacAttributes.Attributes = nodeInfo.Additional;

                TbImageUrl.Attributes.Add("onchange", GetShowImageScript("preview_NavigationPicPath", SiteInfo.Additional.WebUrl));

                var showPopWinString = ModalFilePathRule.GetOpenWindowString(SiteId, _channelId, true, TbChannelFilePathRule.ClientID);
                BtnCreateChannelRule.Attributes.Add("onclick", showPopWinString);

                showPopWinString = ModalFilePathRule.GetOpenWindowString(SiteId, _channelId, false, TbContentFilePathRule.ClientID);
                BtnCreateContentRule.Attributes.Add("onclick", showPopWinString);

                showPopWinString = ModalSelectImage.GetOpenWindowString(SiteInfo, TbImageUrl.ClientID);
                BtnSelectImage.Attributes.Add("onclick", showPopWinString);

                showPopWinString = ModalUploadImage.GetOpenWindowString(SiteId, TbImageUrl.ClientID);
                BtnUploadImage.Attributes.Add("onclick", showPopWinString);

                ELinkTypeUtils.AddListItems(DdlLinkType);
                ETaxisTypeUtils.AddListItemsForChannelEdit(DdlTaxisType);

                CblNodeGroupNameCollection.DataSource = DataProvider.ChannelGroupDao.GetDataSource(SiteId);

                DdlChannelTemplateId.DataSource = DataProvider.TemplateDao.GetDataSourceByType(SiteId, TemplateType.ChannelTemplate);

                DdlContentTemplateId.DataSource = DataProvider.TemplateDao.GetDataSourceByType(SiteId, TemplateType.ContentTemplate);

                DataBind();

                DdlChannelTemplateId.Items.Insert(0, new ListItem("<未设置>", "0"));
                ControlUtils.SelectSingleItem(DdlChannelTemplateId, nodeInfo.ChannelTemplateId.ToString());

                DdlContentTemplateId.Items.Insert(0, new ListItem("<未设置>", "0"));
                ControlUtils.SelectSingleItem(DdlContentTemplateId, nodeInfo.ContentTemplateId.ToString());

                TbNodeName.Text      = nodeInfo.ChannelName;
                TbNodeIndexName.Text = nodeInfo.IndexName;
                TbLinkUrl.Text       = nodeInfo.LinkUrl;

                foreach (ListItem item in CblNodeGroupNameCollection.Items)
                {
                    item.Selected = CompareUtils.Contains(nodeInfo.GroupNameCollection, item.Value);
                }
                TbFilePath.Text            = nodeInfo.FilePath;
                TbChannelFilePathRule.Text = nodeInfo.ChannelFilePathRule;
                TbContentFilePathRule.Text = nodeInfo.ContentFilePathRule;

                ControlUtils.SelectSingleItem(DdlLinkType, nodeInfo.LinkType);
                ControlUtils.SelectSingleItem(DdlTaxisType, nodeInfo.Additional.DefaultTaxisType);
                ControlUtils.SelectSingleItem(RblIsChannelAddable, nodeInfo.Additional.IsChannelAddable.ToString());
                ControlUtils.SelectSingleItem(RblIsContentAddable, nodeInfo.Additional.IsContentAddable.ToString());

                TbImageUrl.Text = nodeInfo.ImageUrl;

                TbContent.SetParameters(SiteInfo, ChannelAttribute.Content, nodeInfo.Content);

                TbKeywords.Text    = nodeInfo.Keywords;
                TbDescription.Text = nodeInfo.Description;

                //this.Content.SiteId = base.SiteId;
                //this.Content.Text = StringUtility.TextEditorContentDecode(nodeInfo.Content, ConfigUtils.Instance.ApplicationPath, base.SiteInfo.SiteUrl);
            }
            else
            {
                CacAttributes.Attributes = new ExtendedAttributes(Request.Form);
            }
        }
Example #7
0
        public void Page_Load(object sender, EventArgs e)
        {
            if (IsForbidden)
            {
                return;
            }

            PageUtils.CheckRequestParameter("siteId", "channelId", "ReturnUrl");
            _channelId = AuthRequest.GetQueryInt("channelId");
            ReturnUrl  = StringUtils.ValueFromUrl(PageUtils.FilterSqlAndXss(AuthRequest.GetQueryString("ReturnUrl")));
            //if (!base.HasChannelPermissions(this.channelId, AppManager.CMS.Permission.Channel.ChannelAdd))
            //{
            //    PageUtils.RedirectToErrorPage("您没有添加栏目的权限!");
            //    return;
            //}

            var parentNodeInfo = ChannelManager.GetChannelInfo(SiteId, _channelId);

            if (parentNodeInfo.Additional.IsChannelAddable == false)
            {
                PageUtils.RedirectToErrorPage("此栏目不能添加子栏目!");
                return;
            }

            CacAttributes.SiteInfo  = SiteInfo;
            CacAttributes.ChannelId = _channelId;

            if (!IsPostBack)
            {
                ChannelManager.AddListItems(DdlParentChannelId.Items, SiteInfo, true, true, AuthRequest.AdminPermissions);
                ControlUtils.SelectSingleItem(DdlParentChannelId, _channelId.ToString());

                DdlContentModelPluginId.Items.Add(new ListItem("<默认>", string.Empty));
                var contentTables = PluginContentManager.GetContentModelPlugins();
                foreach (var contentTable in contentTables)
                {
                    DdlContentModelPluginId.Items.Add(new ListItem(contentTable.Title, contentTable.Id));
                }
                ControlUtils.SelectSingleItem(DdlContentModelPluginId, parentNodeInfo.ContentModelPluginId);

                var plugins = PluginContentManager.GetAllContentRelatedPlugins(false);
                if (plugins.Count > 0)
                {
                    foreach (var pluginMetadata in plugins)
                    {
                        CblContentRelatedPluginIds.Items.Add(new ListItem(pluginMetadata.Title, pluginMetadata.Id));
                    }
                }
                else
                {
                    PhContentRelatedPluginIds.Visible = false;
                }

                CacAttributes.Attributes = new ExtendedAttributes();

                TbImageUrl.Attributes.Add("onchange", GetShowImageScript("preview_NavigationPicPath", SiteInfo.Additional.WebUrl));

                var showPopWinString = ModalFilePathRule.GetOpenWindowString(SiteId, _channelId, true, TbChannelFilePathRule.ClientID);
                BtnCreateChannelRule.Attributes.Add("onclick", showPopWinString);

                showPopWinString = ModalFilePathRule.GetOpenWindowString(SiteId, _channelId, false, TbContentFilePathRule.ClientID);
                BtnCreateContentRule.Attributes.Add("onclick", showPopWinString);

                showPopWinString = ModalSelectImage.GetOpenWindowString(SiteInfo, TbImageUrl.ClientID);
                BtnSelectImage.Attributes.Add("onclick", showPopWinString);

                showPopWinString = ModalUploadImage.GetOpenWindowString(SiteId, TbImageUrl.ClientID);
                BtnUploadImage.Attributes.Add("onclick", showPopWinString);

                ELinkTypeUtils.AddListItems(DdlLinkType);

                ETaxisTypeUtils.AddListItemsForChannelEdit(DdlTaxisType);
                ControlUtils.SelectSingleItem(DdlTaxisType, ETaxisTypeUtils.GetValue(ETaxisType.OrderByTaxisDesc));

                CblNodeGroupNameCollection.DataSource = DataProvider.ChannelGroupDao.GetDataSource(SiteId);
                DdlChannelTemplateId.DataSource       = DataProvider.TemplateDao.GetDataSourceByType(SiteId, TemplateType.ChannelTemplate);
                DdlContentTemplateId.DataSource       = DataProvider.TemplateDao.GetDataSourceByType(SiteId, TemplateType.ContentTemplate);

                DataBind();

                DdlChannelTemplateId.Items.Insert(0, new ListItem("<默认>", "0"));
                DdlChannelTemplateId.Items[0].Selected = true;

                DdlContentTemplateId.Items.Insert(0, new ListItem("<默认>", "0"));
                DdlContentTemplateId.Items[0].Selected = true;
                TbContent.SetParameters(SiteInfo, ChannelAttribute.Content, string.Empty);
            }
            else
            {
                CacAttributes.Attributes = new ExtendedAttributes(Request.Form);
            }
        }