<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Tabsecrityadd.aspx.cs" Inherits="Portal.Portal.Tabsecrityadd" %>

<!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>
<script src="../Javascript/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script src="../Javascript/common.js" type="text/javascript"></script>
</head>

<body style=" font-family:Verdana; font-size:12px;">
    <form id="form1" runat="server">
    <div style=" margin-left:30px; margin-top:15px">
   <b>请输入权限名称</b>
 
 <br /> <br />
    
      1.选择添加的类型：<asp:RadioButtonList ID="rpt_roletype"   RepeatColumns="2" Width="250px" runat="server">
        <asp:ListItem Text="用户" Value="user"  ></asp:ListItem>
        <asp:ListItem Text="组" Value="group" Selected="True" ></asp:ListItem>
        </asp:RadioButtonList>
       <br />   
   
        
        
   2.单击选择 <a href="#" style="color:#124ba7;  text-decoration:underline;" id="ckname">用户/用户组<img src="../Images/checknames.gif" id="cknames" style="width:14px;vertical-align:bottom "  /></a> 
     
        
        
        <br /> <br />   
   3. 用户/用户组   <br />
        <asp:TextBox ID="txt_user" ClientIDMode="Static"  TextMode="MultiLine" Width="400px" Height="60px" runat="server"></asp:TextBox>  <br />
     
       
            <br /><br />  
        4. 单击 <asp:LinkButton ID="Add" Text="确定"   style="color:#124ba7;  text-decoration:underline;"   
              runat="server" onclick="Add_Click" />
              
              
              
              <script>

                  $(":radio").click(function() {

                      $("#ckname").unbind("click");
                      $("#txt_user").val('');
                      $("#ckname").click(
                         function() {

                             if ($(":radio:checked").val() == "group") {
                                 window.open('popup.aspx?type=group', '', 'width=550px,left=100px,top=200px,height=500px'); return false;
                             }

                             else {
                                 window.open('popup.aspx?type=user&ismulti=1', '', 'width=550px,left=200px,top=100px,height=500px'); return false;
                             }
                         }
                          );
                  }
                );



               $(document).ready(
                  function() {
                      $("#ckname").click(
                          function () { window.open('popup.aspx?type=group', '', 'width=550px,left=200px,top=100px,height=500px'); return false; }
                          ); }
                    );

                   


               function setPopGroup(result) {

                   theresult = result.split('#'); 
                   for (var i = 0; i < theresult.length; i++) {
                       if (theresult[i] != "") {
                           $("#txt_user").val($("#txt_user").val() + ";" + theresult[i]);
                       }
                   }
                  }



               function setPopUser(result) {

                   theresult = result.split('#');

                   for (var i = 0; i < theresult.length; i++) {
                       if (theresult[i] != "") {
                           $("#txt_user").val($("#txt_user").val() + ";" + theresult[i].split('$')[1]);
                       }
                   }
                    

               }

          

              </script>
         
         
          
    </div>
    </form>
</body>
</html>
