<%@ Page Language="C#" MasterPageFile="Admin.Master"  EnableEventValidation="false" EnableViewState="false" AutoEventWireup="true" CodeBehind="view.aspx.cs" Inherits="Math.math.view" %>
 <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
       <style>
           #cnt img{ max-width:800px}
           #cnt{ line-height:60px; }
       </style>
    
    <div id="cnt">

   
     <asp:FormView runat="server" ID="fv" RenderOuterTable="false">
        <ItemTemplate>
      <style>
        legend{ color:#ff6a00 }
        .layui-table td{ font-size:12px; }
        .mrate{ height:20px; }
    </style>
 
            <div>

             <a href="javascript:history.go(-1);"><i class="layui-icon layui-icon-return" style="font-size:12px; color: #1E9FFF;"></i>返回</a> 

            </div>


  <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
  <legend>1.试题题目</legend>
</fieldset>
 
  
    <table class="layui-table" style="font-size:12px;">
        <tr>
            <td width="100px">
                课程分类
            </td>
            <td width="300">
                <%#Eval("fullcatname") %>
            </td>


             <td width="100px">
                题目类型
            </td>
            <td width="200px">
                <%#Eval("qtype") %>
            </td>



             <td width="100">
                难度等级
            </td>
            <td width="200">
                 <%#GetHard(Eval("hard")) %>
            </td>
            </tr>


         <tr>

                 <td>
                标签
            </td>
            <td>
                <%#Eval("tags") %>
            </td>


            <td>
                题目来源
            </td>
            <td>
                 <%#Eval("source") %>
            </td>


             <td>
                题目分数
            </td>
            <td>
                 <%#Eval("score") %>
            </td>



         
            </tr>

 
        </table>


   <div style="margin:20px;"> 
   <%#Eval("question2") %>
     </div>




            <div style="text-align:right">

                <a href="###" id="op_answer" onclick="$('#div_answer').toggle();"   title="老师教学时，可以通过此按钮显示隐藏答案" class="layui-btn layui-btn-primary layui-border-black layui-btn-sm">
                    显示答案
                </a>

                    <a href="###" id="op_analyse" onclick="$('#div_analyse').toggle();" title="老师教学时，可以通过此按钮显示隐藏解析过程" class="layui-btn layui-btn-primary layui-border-green layui-btn-sm">
                    显示解析
                </a>

               <a href="###" id="op_pad"   onclick="$('#thepad').toggle(); $('#sign').jqSignature(); " title="老师教学时，可以通过手写版来教学" class="layui-btn layui-btn-primary layui-border-blue layui-btn-sm">
                    显示手写板
                </a>
                <a href="question_new.aspx?id=<%= Request.QueryString["id"] %>" class="layui-btn layui-btn-primary  layui-btn-sm">更新试题</a>
            </div>



<div id="div_answer" style="display:none">


     <fieldset class="layui-elem-field layui-field-title" style="margin-top:40px;">
  <legend>2.试题答案</legend>
</fieldset>

    <div style="margin:0px 20px;"> 
     <%#Eval("answer") %>
     </div>

</div>

  
<div id="div_analyse" style="display:none">
 <fieldset class="layui-elem-field layui-field-title" style="margin-top: 40px;">
  <legend>3.试题解析</legend>
</fieldset>
        <div style="margin:20px;"> 
   <%#Eval("analyse2") %>
     </div>
    </div>




             

 
             



         

         

        <div id="thepad" style=" display:none; margin:15px auto;  width:96%; ">
              
            
             <div style="margin:10px; text-align:center">

                
               <input type="button"  value="清除面板" class="layui-btn  layui-btn-warm layui-btn-sm " onclick="$('#sign').jqSignature('clearCanvas');"/>

                  <input type="button" style="display:none"  value="保存面板" class="btn btn-success btn-sm" onclick=" $('#sign').empty(); $('#sign').jqSignature('getDataURL'); var img = $('<img>').attr('src', dataUrl); "/>

                </div>

               <script src="../javascript/sign/jq-signature.js"></script>
                  <div id='sign'  
            data-auto-fit="true" 
            data-height="600" 
            data-border="1px solid red"
            data-background="#ffffff"
            data-line-color="#ff0000"
            data-line-width="2"
               style=" width:100%; "
             >

               </div>

         

          
        
        </div>
 
     


            
        </ItemTemplate>
    </asp:FormView> 


    
          <script>

              $(".editormd-tex").each(function () {
                  var tex = $(this).text();
                  var element = $(this)[0];
                  katex.render(tex, element, {
                      throwOnError: false
                  });

              });

    </script>

     </div>

    </asp:Content>
