<%@ Page Title="" Language="C#" MasterPageFile="~/whir_system/master/SystemMasterPage.master"
    AutoEventWireup="true" CodeFile="QuickMenuSetting.aspx.cs" Inherits="Whir_System_Module_Setting_QuickMenuSetting" %>

 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

</asp:Content>
<asp:content id="Content2" contentplaceholderid="ContentPlaceHolder1" runat="Server">
    <div class="content-wrap">
        <div class="space15">
        </div>
        <div class="panel">
        <div class="panel-heading">快捷菜单设置</div>
            <div class="panel-body">
                <div class="form_center">
                        <form id="formQuick" class="form-horizontal" form-url="<%=SysPath %>Handler/Setting/SeoSetting.aspx">
                             <%var names = SystemConfig.QuickMenuName.Split(',');
                               var icons = SystemConfig.QuickMenuIcon.Split(',');
                               var urls = SystemConfig.QuickMenuUrl.Split(',');
                              for(int i=0;i<6;i++) 
                               {
                                %>
                            <div class="form-group">
                                <div class="col-md-2 control-label" >
                                   菜单名称<%=i+1 %>
                                </div>
                                <div class="col-md-4">
                                    <input type="text"  name="QuickMenuName"  value="<%=i>=names.Length?"": names[i] %>"
                                        class="form-control" maxlength="8" />
                                </div>
                                 <div class="col-md-2 control-label" >
                                   菜单图标<%=i+1 %>
                                </div>
                                <div class="col-md-4">
                                    <input type="text" name="QuickMenuIcon"   value="<%=i>=names.Length?"":icons[i] %>"
                                        class="form-control"  />
                                </div>
                            </div>
                            <div class="form-group ">
                                <div class="col-md-2 control-label" >
                                   菜单Url<%=i+1 %>
                                </div>
                                <div class="col-md-10 ">
                                    <input type="text"  name="QuickMenuUrl"   value="<%=i>=names.Length?"":urls[i] %>"
                                        class="form-control"  />
                                </div>
                            </div>
                               <%} %>
                            <div class="form-group">
                                <div class="col-md-offset-2 col-md-10 ">
                                    <input type="hidden" name="_action" value="SaveQuickMenuSetting" />
                                     <%if (IsCurrentRoleMenuRes("379"))
                                       { %>
                                    <button  onclick="save();return false;"  class="btn btn-info btn-block">保存</button> 
                                <%} %>
                                </div>
                            </div>
                        </form>
                     
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">

        function save () {
            var $form = $("#formQuick");
            $form.post({
                success: function (response) {
                    if (response.Status == true) {
                        whir.toastr.success(response.Message);
                    } else {
                        whir.toastr.error(response.Message);
                    }
                    whir.loading.remove();
                },
                error: function (response) {
                    whir.toastr.error(response.Message);
                    whir.loading.remove();
                }
            });
        } 
    </script>
</asp:content>
