<%@ Page Language="C#" AutoEventWireup="true" Inherits="System_Label_SetLabelContent, QianboCMS" EnableEventValidation="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>设置标签内容</title>
<link rel="stylesheet" href="../Css/layout.css" type="text/css" />
<script type="text/javascript" src="../../Js/jquery.js"></script>
<script type="text/javascript" src="../../Js/lhgdialog/lhgdialog.min.js?self=true"></script>
<script src="../../Js/Common.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
var jq = jQuery.noConflict();
function setx(values)
{
    $('lblContent').focus();
    if (document.selection)
    {
        var range= document.selection.createRange();
        range.text = values;
    }
}
function HidValue(hidvalue)
{
    $("hidModelId").value=hidvalue;
}
function CheckValidate()
{
    if($("txtLabelName").value.trim().length==0)
    {
        alert("标签名称不能为空！");
        $("txtLabelName").focus();
        return false;
    }
    if($("lblContent").value.trim().length==0)
    {
        alert("标签内容不能为空！");
        $("txtLabelName").focus();
        return false;
    }
    return true;
}
</script>
</head>

<body>
<form id="form1" runat="server">
  <div>
    <table width="99%" cellspacing="1" cellpadding="0" class="wzdh" align="center">
      <tr>
        <td style="padding-left: 10px;"><img src="../Images/Skin/Default/you.gif" align="absmiddle" /> 您现在的位置：<a href="../SystemInfo.aspx">后台管理</a> &gt;&gt; <a href="../Template/CreateFolder.aspx">标签&模板管理</a> &gt;&gt; <a href="LabelManager.aspx">标签管理</a> &gt;&gt;
          <asp:Label ID="lblInfo" runat="server" Text="Label"></asp:Label></td>
      </tr>
    </table>
    <table cellpadding="0" cellspacing="1" class="border" align="center">
      <tr class="wzlist">
        <td><span style="float: left;">
          <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="LabelManager.aspx">标签管理首页</asp:HyperLink> | <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="SetLabelCategory.aspx">新增标签分类</asp:HyperLink> | <asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl="SetLabelContent.aspx">创建新标签</asp:HyperLink> | <a href="#" onclick="javascript:window.history.back();">返回</a></span>
          <span style="float: right;">
          <asp:DropDownList ID="ddlRedirectPage" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlRedirectPage_SelectedIndexChanged">
            <asp:ListItem>跳转类型至…</asp:ListItem>
            <asp:ListItem Value="StyleManager.aspx">样式管理</asp:ListItem>
            <asp:ListItem Value="LabelManager.aspx">标签管理</asp:ListItem>
            <asp:ListItem Value="../Template/CreateFolder.aspx">模板管理</asp:ListItem>
          </asp:DropDownList>
          </span></td>
      </tr>
    </table>
    <table cellpadding="0" cellspacing="1" class="border" align="center">
      <tr>
        <td class="bqleft">标签名称：</td>
        <td class="bqright"><asp:Label ID="lblPrefix" runat="server" Text="{Qianbo_" ForeColor="Red"></asp:Label>
          <asp:TextBox ID="txtLabelName" runat="server"></asp:TextBox>
          <asp:Label ID="lblPostfix" runat="server" Text="}" ForeColor="red"></asp:Label>
          <asp:DropDownList ID="dllLbCategory" runat="server"></asp:DropDownList></td>
      </tr>
      <tr>
        <td class="bqleft">选择模型：</td>
        <td class="bqright"> |
          <asp:Repeater runat="server" ID="repModelList">
            <ItemTemplate>
<script type="text/javascript">
jQuery(function(){
    jQuery('#CommonlyList<%# Eval("ModelId") %>').click(function(){
        jQuery.dialog({
            id: 'txtCommonlyList',
            lock: true,
            title: '选择模型',
            content: "url:CommonlyList.aspx?modelId=<%# Eval("ModelId") %>",
            width: 850,
            height: 'auto'
        });
    });
});
</script>
            <a id="CommonlyList<%# Eval("ModelId") %>" onclick="javascript:HidValue(<%# Eval("ModelId") %>);" class="mouseStyle"><%# Eval("ModelName") %></a> | </ItemTemplate>
          </asp:Repeater>
          <input id="hidModelId" runat="server" type="hidden" value="1" /></td>
      </tr>
<script type="text/javascript">
jQuery(function(){
    jQuery('#NewsRoutine').click(function(){
        jQuery.dialog({
            id: 'txtNewsRoutine',
            lock: true,
            title: '模型常规',
            content: "url:NewsRoutine.aspx?modelId=",
            width: 950,
            height: 280
        });
    });
    jQuery('#SetSpecial').click(function(){
        jQuery.dialog({
            id: 'txtSetSpecial',
            lock: true,
            title: '专题模块',
            content: "url:SetSpecial.aspx?modelId=",
            width: 800,
            height: 'auto'
        });
    });
    jQuery('#SysParameter').click(function(){
        jQuery.dialog({
            id: 'txtSysParameter',
            lock: true,
            title: '系统常用标签',
            content: "url:SysParameter.aspx?modelId=",
            width: 800,
            height: 300
        });
    });
    jQuery('#PropertyList').click(function(){
        jQuery.dialog({
            id: 'txtPropertyList',
            lock: true,
            title: '属性标签',
            content: "url:PropertyList.aspx",
            width: 800,
            height: 'auto'
        });
    });
});
</script>
      <tr>
        <td class="bqleft">通用标签：</td>
        <td class="bqright"> | <a id="NewsRoutine" onclick="javascript:HidValue(0)" class="mouseStyle">模型常规</a> | <a id="SetSpecial" onclick="javascript:HidValue(-1)" class="mouseStyle">专题模块</a> | <a id="SysParameter" onclick="javascript:HidValue(-2)" class="mouseStyle">系统常用标签</a> | <a id="PropertyList" onclick="javascript:HidValue(-3)" class="mouseStyle">属性标签</a></td>
      </tr>
      <tr>
        <td class="bqleft">标签内容：</td>
        <td class="bqright"><textarea id="lblContent" rows="8" style="width: 550px;" runat="server"></textarea></td>
      </tr>
      <tr>
        <td class="bqleft"></td>
        <td class="bqright"><asp:Button ID="btnSave" runat="server" Text="确认保存标签" CssClass="btn" OnClick="btnSave_Click" OnClientClick="return CheckValidate()" />
          <asp:Button ID="btnReset" runat="server" Text="重置" CssClass="btn" OnClick="btnReset_Click" /></td>
      </tr>
    </table>
  </div>
</form>
<br />
</body>
</html>