<%@ Page Title="" Language="C#" MasterPageFile="~/whir_system/master/DialogMasterPage.master" AutoEventWireup="true" CodeFile="UpdateList.aspx.cs" Inherits="Whir_System_ModuleMark_Common_UpdateList" %>

<%@ Import Namespace="Whir.Framework" %>
<%@ Import Namespace="Whir.Language" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <script src="<%= SysPath %>res/script/jquery.form.js" type="text/javascript"></script>

    <link rel="stylesheet" href="<%= AppName %>Editor/KindEditor/themes/default/default.css" />
	<link rel="stylesheet" href="<%= AppName %>Editor/KindEditor/plugins/code/prettify.css" />
	<script charset="utf-8" src="<%= AppName %>Editor/KindEditor/kindeditor.js"></script>
	<script charset="utf-8" src="<%= AppName %>Editor/KindEditor/lang/zh_CN.js"></script>
	<script charset="utf-8" src="<%= AppName %>Editor/KindEditor/plugins/code/prettify.js"></script>

    <script type="text/javascript" src="<%= AppName %>Editor/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" src="<%= AppName %>Editor/ueditor/ueditor.all.js"></script>

    <script src="<%= SysPath %>res/script/ColorPicker/dhtmlxcommon.js" type="text/javascript"></script>
    <link href="<%= SysPath %>res/script/ColorPicker/dhtmlxcolorpicker.css" rel="stylesheet" type="text/css" />
    <script src="<%= SysPath %>res/script/ColorPicker/dhtmlxcolorpicker.js" type="text/javascript"></script>
	<script type="text/javascript">
	    $(function () {

	        $("[name=_dialog] .btn-primary", parent.document).text("保存");
	        $("[name=_dialog] .btn-primary", parent.document)
	            .click(function() {
	                $("#formEdit").bootstrapValidator('validate');
	                if ($("#formEdit").data('bootstrapValidator').isValid()) {
	                    $(document).click();
	                    var data = $("#formEdit").serialize() + "&columnid=<%=ColumnId %>&itemIds=<%=ItemIds %>&exceptFields=<%=ExceptFields %>";
	                    whir.ajax.post("<%= SysPath %>Handler/Common/Common.aspx?_action=UpdateList",{
	                            data: data,
	                            success: function(response) {
	                                whir.loading.remove();
	                                if (response.Status == true) {
	                                    window.parent.whir.toastr.success(response.Message);
	                                    window.parent.$table.bootstrapTable('refresh');
	                                    window.parent.whir.dialog.remove();
	                                } else {
	                                    whir.toastr.error(response.Message);
	                                }
	                            }
	                        });
	                    return false;
	                }

	            });
	    });
	</script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<whir:DynamicForm id="dynamicForm1" runat="server" FormType="All"></whir:DynamicForm>
</asp:Content>

