<%@ page language="VB" autoeventwireup="false" enabletheming="false" inherits="storage_edit, App_Web_5ydpmfdq" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>试题编辑</title>
   
</head>
<body style="height: 100%">
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    
    <telerik:RadTabStrip runat="server" ID="RadTabStrip1" 
        OnClientTabSelected="OnClientTabSelectingHandler" Skin="Sunset" Style="float: left"
        SelectedIndex="0">
        <Tabs>
        <telerik:RadTab Value="a" Text="单选题"></telerik:RadTab>
        <telerik:RadTab Value="b" Text="多选题"></telerik:RadTab>
        <telerik:RadTab Value="c" Text="填空题"></telerik:RadTab>
        <telerik:RadTab Value="d" Text="判断题"></telerik:RadTab>
        <telerik:RadTab Value="e" Text="问答题"></telerik:RadTab>
        <telerik:RadTab Value="f" Text="选项题"></telerik:RadTab>
        </Tabs>
    </telerik:RadTabStrip>

    <telerik:RadSplitter ID="RadSplitter1" runat="server" Width="100%" Height ="100%"
        Skin="WebBlue">
        <telerik:RadPane ID="LeftPane" runat="server" Width="770" ContentUrl="about:blank" Scrolling="both" OnClientExpanded="leftPaneExpands">
        
        </telerik:RadPane>
        <telerik:RadSplitBar ID="Radsplitbar2" runat="server" CollapseMode="both" ></telerik:RadSplitBar>
        <telerik:RadPane ID="testsPane" runat="server" ContentUrl="about:blank" Scrolling="both">
        </telerik:RadPane>
    </telerik:RadSplitter>
     <script type ="text/javascript" >
     var url2="../testeditor/editsingletest.aspx"+self.location.search;
     function leftPaneExpands(pane)
     {
       // expandCount is a custom variable

       if (pane.get_contentUrl()!=url2)
      pane.set_contentUrl(url2);
      }
      function editTest(testId){
         var ttt=url2.indexOf("&testid=");
         if (ttt!=-1){
            url2=url2.substring(0,ttt)
         }
        
         url2+="&testid="+testId;
        
         var splitter = $find("<%= RadSplitter1.ClientId() %>");if(splitter==null)return;
         var rightPane = splitter.getPaneById("<%= testsPane.ClientId() %>");if(rightPane==null)return;
         var LeftPane = splitter.getPaneById("<%= LeftPane.ClientId() %>");if(LeftPane==null)return;
         LeftPane.set_contentUrl(url2);
         LeftPane.expand();
      }
      function addTest(){
        var splitter = $find("<%= RadSplitter1.ClientId() %>");if(splitter==null)return;
         var rightPane = splitter.getPaneById("<%= testsPane.ClientId() %>");if(rightPane==null)return;
         var LeftPane = splitter.getPaneById("<%= LeftPane.ClientId() %>");if(LeftPane==null)return;
         var ttt=url2.indexOf("&testid=");
         if (ttt!=-1){
            url2=url2.substring(0,ttt)
         }
         LeftPane.set_contentUrl(url2);
         LeftPane.expand();
      }
      function changeTestClass(testClass){
       var splitter = $find("<%= RadSplitter1.ClientId() %>");if(splitter==null)return;
       var rightPane = splitter.getPaneById("<%= testsPane.ClientId() %>");if(rightPane==null)return;
       var LeftPane = splitter.getPaneById("<%= LeftPane.ClientId() %>");if(LeftPane==null)return;
       
       var url="lista.aspx"+location.search;url2="../testeditor/editsingletest.aspx"+self.location.search;
       switch(testClass){
          case "a":
            url="lista.aspx"+location.search;url2="../testeditor/editsingletest.aspx"+self.location.search;
            break;
          case "b":
            url="listb.aspx"+location.search;url2="../testeditor/editmultest.aspx"+self.location.search;
            break;
          case "c":
            url="listc.aspx"+location.search;url2="../testeditor/editfilltest.aspx"+self.location.search;
            break;
          case "d":
            url="listd.aspx"+location.search;url2="../testeditor/editjudgetest.aspx"+self.location.search;
            break;
          case "e":
            url="liste.aspx"+location.search;url2="../testeditor/editanswertest.aspx"+self.location.search;
            break;
          case "f":
            url="listf.aspx"+location.search;url2="../testeditor/editchoicetest.aspx"+self.location.search;
            break;
                
       
       }
      
         rightPane.set_contentUrl(url);
      
       //LeftPane.collapse();
       if (!LeftPane.get_collapsed())
       LeftPane.set_contentUrl(url2);
       //
      }
    
    function OnClientTabSelectingHandler(sender, args)
    {
      changeTestClass(args.get_tab().get_value() );
    }
   

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