<%@ Page Title="" Language="C#" MasterPageFile="~/Public/SitePublic.Master" AutoEventWireup="true" CodeBehind="ViewTeachPlan.aspx.cs" Inherits="Project25175.ViewTeachPlan" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <link rel="stylesheet" href="../assets/css/jquery-ui-1.10.3.full.min.css" />

    <script type="text/javascript">
    //后台调用,区分提示信息底色
        //Danger,Info
        function ChangeMsgClass(MsgType) {
            if (MsgType == "Danger") {
                DivMsg.className = 'alert alert-danger';
            }
            else {
                DivMsg.className = 'alert alert-info';
            }
        }
    </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="breadcrumbs" id="breadcrumbs">
		<script type="text/javascript">
		    try { ace.settings.check('breadcrumbs', 'fixed') } catch (e) { }
        </script>
		
		<div class="row">
	        <div class="col-xs-12">
                <ul class="breadcrumb">
                    <li>
				    <i class="icon-home"></i>
                    教案信息
                    </li>
                    <li>
                    <asp:Label ID="LabTitle" runat="server"></asp:Label>
                    <asp:TextBox runat="server" ID="TPID" CssClass="hidden"></asp:TextBox>
                    </li>
                </ul>
			</div>
        </div>
	</div>

    <div id="dialog-alarm" class="hide">
		<div class="alert alert-warning bigger-110 col-xs-12">
			<input id="IpEr" type="text" class="alert alert-warning col-xs-12" disabled="disabled" >
		</div>
		<div class="space-6"></div>
	</div><!-- #dialog-confirm -->

    <div id="dialog-del" class="hide">
		<div class="alert alert-info bigger-110">
			将当前评价内容保存
		</div>
		<div class="space-6"></div>
		<p class="bigger-110 bolder center grey">
			<i class="icon-hand-right blue bigger-120"></i>
			确定保存吗?
		</p>
	</div><!-- #dialog-confirm -->

    <div class="page-content">
        <div class="form-group row col-xs-12 text-right">
                <asp:Label ID="LabTitleF" runat="server"> </asp:Label>
        </div>
        <div class="page-header">
        </div>

        <div class="col-xs-12"><span class="bigger-130 text-primary">详细内容<asp:Label runat="server" ID="LabGrade"></asp:Label></span></div>
        <div class="page-header"></div>

        <div class="row">
	        <div class="col-xs-12">
                <asp:Label ID="LabContent" runat="server"></asp:Label>
	        </div>            
        </div>
        <div class="page-header">
        </div>
        <div class="row">
            <div class="col-xs-10 bigger-200">
                <i class="icon-download blue"></i>
                <asp:Label runat="server" ID="LabDownLoad"></asp:Label>
            </div>
        </div>

        <div class="page-header">
        </div>
        <div class="row">
            <span class="bigger-120 text-danger">评价<a name="AfterAdd"></a></span> (评分仅一次,评论可多次)
            <div class="page-header">
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <div class="col-sm-12">
					    <label class="control-label no-padding-right">评分：<input runat="server" readonly="true" style="width:30px" class="blue bolder bigger-200" type="text" id="form_field_4" value="1"/></label>
					</div>
                    <div class="form-group col-sm-6">
                        <div class="help-block" id="input-size-slider"></div> 
					</div>
				</div>
            </div>

            <div class="col-xs-12">
                <asp:TextBox runat="server" ID="TxtGradeContent" CssClass="col-xs-8" 
                    TextMode="MultiLine"></asp:TextBox>
            </div>
            
            <div class="col-xs-12">
                <div class="space-2"></div>
                <div class="row col-xs-2">
                    <asp:Button ID="BT_Add" runat="server" Text="确认" 
                            CssClass="btn btn-info icon-ok bigger-110 hidden " onclick="BT_Add_Click" />
                    <button id="BtAdd" class="btn btn-info" type="button">
				        <i class="icon-ok bigger-110"></i>
				        确认评价
			        </button>
                </div>
                <div class="row col-xs-8">
                    <div id="DivMsg" class="alert alert-info hidden">
                        <i class="icon-hand-right"></i>
                        <asp:Label ID="LabMsg" runat="server" Text=" "></asp:Label>
			            <button class="close" data-dismiss="alert">
                        <i class="icon-remove"></i>
                        </button>
                    </div>
                </div>
            </div>

        </div>

        <div class="page-header">
        </div>

        <div class="col-xs-12">
            <span class="bigger-120 text-danger">历史评价</span>
            <asp:GridView ID="GridView1" runat="server" CssClass="table table-striped table-bordered table-hover " 
                AutoGenerateColumns="False" AllowPaging="True" 
                    OnPageIndexChanging="GridView1_PageIndexChanging">
                    <Columns>                                
                        <asp:BoundField DataField="CreateTime" HeaderText="评价时间" ReadOnly="True">
                        <ItemStyle CssClass="col-xs-2" />
                        </asp:BoundField>
                        <asp:BoundField DataField="DiscussVallue" HeaderText="评价内容" ReadOnly="True"/>
                    </Columns>
            </asp:GridView>
        </div>

    </div>
    
        
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder_Footer" runat="server">
    <script type="text/javascript" src="../assets/js/jquery-2.0.3.min.js"></script>
	<script type="text/javascript">
	    window.jQuery || document.write("<script src='../assets/js/jquery-2.0.3.min.js'>" + "<" + "/script>");
	</script>

	<script type="text/javascript">
	    if ("ontouchend" in document) document.write("<script src='../assets/js/jquery.mobile.custom.min.js'>" + "<" + "/script>");
	</script>
    <script type="text/javascript" src="../assets/js/bootstrap.min.js"></script>
	<script type="text/javascript" src="../assets/js/typeahead-bs2.min.js"></script>

	<!-- page specific plugin scripts -->
    <!-- page specific plugin scripts -->

	<script type="text/javascript" src="../assets/js/jquery-ui-1.10.3.full.min.js"></script>
	<script type="text/javascript" src="../assets/js/jquery.ui.touch-punch.min.js"></script>

	<!-- ace scripts -->

	<script type="text/javascript" src="../assets/js/ace-elements.min.js"></script>
	<script type="text/javascript" src="../assets/js/ace.min.js"></script>


    <script type="text/javascript">


        jQuery(function ($) {


            var AlertWindows = function () {
                $("#dialog-alarm").removeClass('hide').dialog(
                {
                    resizable: false,
                    modal: true,
                    title: "<div class='widget-header'><h4 class='smaller'><i class='icon-warning-sign red'></i>提示</h4></div>",
                    title_html: true,
                    buttons: [
						{
						    html: "<i class='icon-remove bigger-110'></i>&nbsp; 确定",
						    "class": "btn btn-xs",
						    click: function () {
						        $(this).dialog("close");
						    }
						}]
                });
};




            //对话框全局
            $.widget("ui.dialog", $.extend({}, $.ui.dialog.prototype, {
                _title: function (title) {
                    var $title = this.options.title || '&nbsp;'
                    if (("title_html" in this.options) && this.options.title_html == true)
                        title.html($title);
                    else title.text($title);
                }
            }));

            $("#BtAdd").on('click', function (e) {
                var p_text = $("#ContentPlaceHolder1_TxtGradeContent").val();
                //                var p_text = $("#TxtGradeContent").value;

                if (p_text.length <= 0) {
                    document.getElementById("IpEr").value = "请输入评价内容";
                    AlertWindows();
                    return;
                }
                else if (p_text.length > 200) {
                    document.getElementById("IpEr").value = "评价内容不能超过200字符";
                    AlertWindows();
                    return;
                }
                ee();
            });

            //
            //            $("#BtAdd").on('click', function (e) {
            var ee = function () {
                //    e.preventDefault();
                $("#dialog-del").removeClass('hide').dialog(
                {
                    resizable: false,
                    modal: true,
                    title: "<div class='widget-header'><h4 class='smaller'><i class='icon-ok blue'></i>评价</h4></div>",
                    title_html: true,
                    buttons: [
				        {
				            html: "<i class='icon-ok bigger-110'></i>&nbsp; 确定",
				            "class": "btn btn-success btn-xs",
				            click: function () {
				                document.getElementById('<%=BT_Add.ClientID %>').click();
				            }
				        }
				        ,
				        {
				            html: "<i class='icon-remove bigger-110'></i>&nbsp; 取消",
				            "class": "btn btn-xs",
				            click: function () {
				                $(this).dialog("close");
				            }
				        }]
                });
            };


////				$("#input-size-slider").css('width', '200px').slider({
////				    value: 1,
////				    range: "min",
////				    min: 1,
////				    max: 8,
////				    step: 1,
////				    slide: function (event, ui) {
////				        var sizing = ['', 'input-sm', 'input-lg', 'input-mini', 'input-small', 'input-medium', 'input-large', 'input-xlarge', 'input-xxlarge'];
////				        var val = parseInt(ui.value);
////				        $('#form-field-4').attr('class', sizing[val]).val('.' + sizing[val]);
////				    }
////				});

				$("#input-size-slider").css('width', '200px').slider({
				    value: 1,
				    range: "min",
				    min: 1,
				    max: 5,
				    step: 1,
				    slide: function (event, ui) {
				        var sizing = ['0','1', '2', '3', '4', '5'];
				        var val = parseInt(ui.value);
				        $('#ContentPlaceHolder1_form_field_4').val(sizing[val]);
				    }
				});
        });

	</script>







</asp:Content>
