<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" 
      xmlns:sec="http://www.pollix.at/thymeleaf/shiro">
<head th:replace="admin/common/html/head :: head_Normal(~{::title},~{::link},~{::style})">

<title th:text=${title}></title>
<!-- 这儿引用单独的css link -->
<!-- Ladda for Bootstrap 3按钮加载进度插件 -->
<link rel="stylesheet" th:href="@{/static/admin/assets/js/button/ladda/ladda.min.css}">
<!-- bootstrap-table表单样式 -->
<link th:href="@{/static/admin/assets/js/bootstrap/css/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet"/>

<!-- jquery向导插件stepy -->
<link th:href="@{/static/admin/assets/js/wizard/css/jquery.steps.css}" rel="stylesheet"/>

<style type="text/css">
/**
*这里写单独的css样式
*/

</style>

</head>

<body id="listbody">




<!-- ###############################代码编写处############################### -->

<!-- 右边内容 -->
<div class="wrap-fluid">
    <div class="container-fluid paper-wrap bevel tlbr">
        <!-- 内容 -->
        <!--标题 通用-->
        <div th:replace="admin/common/html/title :: title(${title},${parenttitle},${isMsg},${msgHTML})">
        </div>
        <!-- 结束标题 通用-->
        <div class="content-wrap">
            <!-- 结束内容 -->
            <div class="row">
                    <div class="col-sm-12">
                        <div class="nest" id="elementClose">
                            <div class="title-alt">
                                <h6> 全局配置表单</h6>
                                <div class="titleClose">
                                    <a class="gone" href="#elementClose">
                                        <span class="entypo-cancel"></span>
                                    </a>
                                </div>
                                <div class="titleToggle">
                                    <a class="nav-toggle-alt" href="#element">
                                        <span class="entypo-up-open"></span>
                                    </a>
                                </div>

                            </div>

                            <div class="body-nest" id="element">

                                <div class="panel-body">
                                
	                                <div class="body-nest" id="alert">
		                                <div class="alert alert-info">
		                                    <button data-dismiss="alert" class="close" type="button">×</button>
		                                    <span class="entypo-info-circled"></span>
		                                    <strong>说明!</strong>&nbsp;&nbsp; 全局参数配置(建议配置在配置文件中.在页面配置,当项目重启将重置参数)
		                                </div>
	                            	</div>
                             		
                                    <form id="form-add" class="form-horizontal bucket-form" th:object="${autoConfig}">
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">根路径</label>
                                            <div class="col-sm-6">
                                                <input type="text" name="parentPath" class="form-control" th:value="*{parentPath}">
                                                 <span class="help-block">生成代码需要存放的项目根路径</span>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">代码父包</label>
                                            <div class="col-sm-6">
                                                <input type="text" name="parentPack" class="form-control" th:value="*{parentPack}">
                                                 <span class="help-block">如父包是com.fc.test.控制器将在com.fc.test.controller包下</span>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">覆盖生成</label>
                                            <div class="col-sm-6">
                                                <select id="cover" name="cover" class="form-control" th:field="*{cover}">
                                                      	 <option value="false">不覆盖</option>
                                                         <option value="true">覆盖</option>
                                                </select>
                                                <span class="help-block">谨慎使用覆盖生成.覆盖初始化所有代码</span>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">表前缀</label>
                                            <div class="col-sm-6">
                                                <input type="text" name="tablePrefix" class="form-control" th:value="*{tablePrefix}">
                                                <span class="help-block">数据库{表前缀}_test</span>
                                            </div>
                                        </div>
                                         <div class="form-group">
                                            <label class="col-sm-3 control-label">java位置</label>
                                            <div class="col-sm-6">
                                                <input type="text" name="javaSource" id="javaSource" class="form-control" th:value="*{javaSource}">
                                                 <span class="help-block">java的源文件目录.一般是src/main/java</span>
                                            </div>
                                         </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">resource位置</label>
                                            <div class="col-sm-6">
                                                <input type="text"  name="resources" id="resources" class="form-control" th:value="*{resources}">
                                                 <span class="help-block">resource的源文件目录.一般是src/main/resources</span>
                                            </div>
                                         </div>
                                         <div class="form-group">
                                            <label class="col-sm-3 control-label">xml目录</label>
                                            <div class="col-sm-6">
                                                <input type="text"  name="xmlPath" id="xmlPath" class="form-control" th:value="*{xmlPath}">
                                                 <span class="help-block">mybatis XML存放的文件夹</span>
                                            </div>
                                         </div>
                                         <div class="form-group">
                                            <label class="col-sm-3 control-label">javaBean尾缀</label>
                                            <div class="col-sm-6">
                                                <input type="text"  name="packageBean" id="packageBean" class="form-control" th:value="*{packageBean}">
                                                 <span class="help-block">javaBean尾缀</span>
                                            </div>
                                         </div>
                                         <div class="form-group">
                                            <label class="col-sm-3 control-label">dao尾缀</label>
                                            <div class="col-sm-6">
                                                <input type="text"  name="packageDao" id="packageDao"  class="form-control" th:value="*{packageDao}">
                                                 <span class="help-block">dao尾缀</span>
                                            </div>
                                         </div>
                                         <div class="form-group">
                                            <label class="col-sm-3 control-label">controller尾缀</label>
                                            <div class="col-sm-6">
                                                <input type="text"   name="packageController" id="packageController" class="form-control" th:value="*{packageController}">
                                                 <span class="help-block">controller尾缀</span>
                                            </div>
                                         </div>
                                         <div class="form-group">
                                            <label class="col-sm-3 control-label">service尾缀</label>
                                            <div class="col-sm-6">
                                                <input type="text" name="packageService" id="packageService" class="form-control" th:value="*{packageService}">
                                                 <span class="help-block">service尾缀</span>
                                            </div>
                                         </div>
                                         <div class="form-group">
                                            <label class="col-sm-3 control-label">电子邮件</label>
                                            <div class="col-sm-6">
                                                <input type="text" name="email" id="email" class="form-control" th:value="*{email}">
                                                 <span class="help-block">注释用户邮件</span>
                                            </div>
                                         </div>
                                         <div class="form-group">
                                            <label class="col-sm-3 control-label">开发者名字</label>
                                            <div class="col-sm-6">
                                                <input type="text" name="author" id="author" class="form-control" th:value="*{author}">
                                                 <span class="help-block">开发者名字</span>
                                            </div>
                                         </div>
                                         <div class="form-group">
											<div class="form-control-static col-sm-offset-3">
												<button type="submit" class="btn btn-primary">提交</button>
												<button  class="btn btn-danger" type="reset">清除</button>
											</div>
										</div>
                                         
                                    </form>
                                </div>

                            </div>

                        </div>
                    </div>
                </div>
            
            
            
            <!-- 结束内容 -->
        </div>
    </div>
</div>
<!-- 结束右边内容 -->
<!-- ###############################代码编写处end############################### -->







<!-- 右侧隐藏滑块内容 -->
<div th:include="admin/common/html/rightHide :: rightHide">
    
</div>
   <!-- END 右侧隐藏滑块内容-->

<!-- 通用js -->
<div th:include="admin/common/html/js :: onload_js">
   
</div>
<!-- bootstarp 表格 -->
<script th:src="@{/static/admin/assets/js/bootstrap/js/bootstrap-table/bootstrap-table.min.js}" type="text/javascript"></script>
<script th:src="@{/static/admin/assets/js/bootstrap/js/bootstrap-table/locale/bootstrap-table-zh-CN.min.js}" type="text/javascript"></script>
<script th:src="@{/static/admin/assets/js/bootstrap/js/base_list.js}" type="text/javascript"></script>
<!-- 导出 -->
<script th:src="@{/static/admin/assets/js/bootstrap/extensions/export/bootstrap-table-export.js}" type="text/javascript"></script>
<script th:src="@{/static/admin/assets/js/bootstrap/extensions/export/tableExport.js}" type="text/javascript"></script>

<!-- 弹窗 -->
<script th:src="@{/static/admin/assets/js/layer/layer.js}" type="text/javascript"></script>
<!-- 遮罩层 -->
<script th:src="@{/static/admin/assets/js/blockUI/jquery.blockUI.js}" type="text/javascript"></script>
<!-- jquery向导插件stepy -->
<script type="text/javascript" th:src="@{/static/admin/assets/js/wizard/build/jquery.steps.js}"></script>
<!-- 提示插件  -->
<script type="text/javascript" th:src="@{/static/admin/assets/js/tip/jquery.tooltipster.js}"></script>

<script type="text/javascript">
  $("#form-add").validate({
  	rules:{
  		receiversEmail:{
  			required:true,
  			 email: true
  		},
  		title:{
  			required:true,
  			minlength: 2,
  			maxlength: 20,
  		}
  	},
  	messages: {
          "title": {
              remote: "标题必填"
          }
      },
  	submitHandler:function(form){
  		add();
  	}
  });

  /**
   * 用户添加方法
   */
  function add() {
  	var dataFormJson=$("#form-add").serialize();
  	$.ajax({
  		cache : true,
  		type : "POST",
  		url : rootPath + "/autoCodeController/addGlobal",
  		data : dataFormJson,
  		async : false,
  		error : function(request) {
  			$.modal.alertError("系统错误");
  		},
  		success : function(data) {
  			$.operate.saveSuccess(data);
  		}
  	});
  }

</script>


<script type="text/javascript">



</script>



</body>


</html>
