<%@ page language="C#" autoeventwireup="true" inherits="admin_storeConfig_TabChildList, LebiMall" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!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 id="Head1" runat="server">
<title>子导航管理</title>
<link rel="stylesheet" type="text/css" href="css/css.css" media="screen"/>
<script type="text/javascript" language="javascript" src="js/topHead.js">
</script><script src="js/checked.js" type="text/javascript"></script>
<link href="css/tipswindown.css" type="text/css" rel="stylesheet" />
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/tipswindown.js" type="text/javascript"></script>
<script type="text/javascript">
    var $=jQuery;
    function add_(){
        tipsWindown("添加类别","url:get?TabChildAdd.aspx?tid=<%=id %>&pp=<%=cc %>","350","460","true","","true",""); 
    }
    function edit_(id){
        tipsWindown("修改类别","url:get?TabChildEdit.aspx?tid=<%=id %>&id="+id+"&pp=<%=cc %>","350","460","true","","true",""); 
    }
    function dels(){
        var list=document.getElementsByName("check_");
        var strid="";
        if (confirm("确认要删除？")) {
            for(i=0;i<list.length;i++)
            {
                if(list[i].checked==true){
                    strid += list[i].value+",";
                }
            } 
            if(strid!=""){
            document.getElementById("hid_del").value=strid;
            return true;}
            else{return false;}
        }else{
            return false;
        }
    }
</script>
</head>
<body>
    <form id="form1" runat="server">
          <!--顶部logo区域-->
        <script>header(6,6,"images/");</script>
        <div class="blank clearfix"></div>
        <script type="text/javascript">
            var fc='<%=results %>';
            if(fc=="true"){
                tipsWindown("提示","text:操作成功！","250","60","true","2000","true","");
            }
            if(fc=="false"){
                tipsWindown("提示","text:操作失败！","250","60","true","2000","true","");
            }
        </script>
        <!--功能区-->
        <div class="tabmenus mainwidth">
            <ul>
                <li><a href="TabList.aspx"><span>导航管理</span></a></li>
                <li><a href="TabAdd.aspx"><span>添加导航</span></a></li>
                <li class="current"><a href="#"><span>导航设置</span></a></li>
            </ul>
        </div>
        
        <div class="tab-mainbody">
            <div class="tab-mainbody2">
                <div class="functionHandleArea clearfix">
                        <input type="button" class="btn-app" runat=server id="btn1" onserverclick="btn1_ServerClick" />
                        <input type="button" class="btn-add1" onclick="add_();" />
                        <asp:Button ID="Button2" runat="server" CssClass="btn-del" OnClientClick="return dels();" ToolTip="删除" OnClick="Button2_Click"/>
                        <input type="button" class="btn-res" onclick="reset();return false;" title="重置"/>
                        <input type="hidden" id="hid_del" runat="server"/>
                </div>
                <div id="datalist">
                    <table cellspacing="0" border="0" id="list" style="width: 100%; border-collapse: collapse;">
                    <!-- table 导航 -->
                        <tr>
                            <th style="width:5%;cursor:pointer;" onclick="CheckedAllInfo2('check_')">选择</th>
                            <th style="width:30%">名称</th>
                            <th style="width:30%">排序</th>
                            <th style="width:35%">显示数量</th>
                        </tr>
                        <%for(int i=0;i<ds.Tables[0].Rows.Count;i++){ %>
                        <tr>
                            <td><input type="checkbox" value="<%=ds.Tables[0].Rows[i]["id"] %>" name="check_" />
                                <input type="hidden" id="hidden_id<%=i %>" name="hidden_id<%=i %>" value="<%=ds.Tables[0].Rows[i]["id"] %>" />
                            </td>
                            <td><input type="text" id="txt_name_<%=i %>" name="txt_name_<%=i %>" value="<%=ds.Tables[0].Rows[i]["ctname"] %>" class="input" onfocus="edit_('<%=ds.Tables[0].Rows[i]["id"] %>');" />
                            </td>
                            <td><input type="text" id="txt_sort_<%=i %>" name="txt_sort_<%=i %>" style="width:60px"  value="<%=ds.Tables[0].Rows[i]["sort"] %>" class="input" onkeyup="value=value.replace(/[^\d]/g,'')"
                                    onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"  />
                            </td>
                            <td><input type="text" id="txt_num_<%=i %>" name="txt_num_<%=i %>" style="width:60px" value="<%=ds.Tables[0].Rows[i]["num"] %>" class="input" onkeyup="value=value.replace(/[^\d]/g,'')"
                                    onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"  />
                            </td>
                        </tr>
                        <%} %>
                        
                    </table>
                    <script type="text/javascript">tdshowm("list");</script>
                </div>
            </div>
        </div>
    </form>
</body>
</html>
