| <!DOCTYPE HTML> | 
| <html xmlns:th="http://www.thymeleaf.org"> | 
| <head> | 
| <meta charset="utf-8"> | 
| <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> | 
| <meta name="renderer" content="webkit|ie-comp|ie-stand"> | 
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | 
| <meta name="viewport" | 
|     content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" /> | 
| <meta http-equiv="Cache-Control" content="no-siteapp" /> | 
| <!-- 本框架基本脚本和样式 --> | 
| <script type="text/javascript" | 
|     th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script> | 
| <script type="text/javascript" th:src="@{/js/systools/MBase.js}"></script> | 
| </head> | 
| <body> | 
|     <div class="ibox-content"> | 
|         <form class="form-horizontal " id="dataform" | 
|               onsubmit="javascripr:return false;"> | 
|             <div class="form-group"> | 
|                 <label class="col-offset-1 col-sm-2 control-label">父级文章类型</label> | 
|                 <div class="col-sm-3"> | 
|                     <select class="select2 form-control " size="1" name="parentId" | 
|                             id="parentId"> | 
|                         <option value="0" selected="selected">一级文章类别</option> | 
|                     </select> | 
|                 </div> | 
|   | 
|                 <label class="col-sm-2 control-label">文章类型名称<span class="text-danger">*</span></label> | 
|                 <div class="col-sm-3"> | 
|                     <input autocomplete="off"   name="articleTypeName" type="text" class="form-control " nullmsg="文章类型名称不能为空" | 
|                            datatype="*1-50" errormsg="文章类型名称长度不能超过50"> | 
|                 </div> | 
|                 <div class="Validform_checktip"></div> | 
|             </div> | 
|             <div class="form-group"> | 
|                 <label class="col-sm-2 control-label">文章类型序号<span class="text-danger">*</span></label> | 
|                 <div class="col-sm-3"> | 
|                     <input autocomplete="off"   name="sort" type="text" class="form-control " nullmsg="文章类型序号不能为空" | 
|                            datatype="n1-10" errormsg="文章类型序号不能超过10"> | 
|                 </div> | 
|                 <div class="Validform_checktip"></div> | 
|                 <label class="col-sm-2 control-label">文章类型描述</label> | 
|                 <div class="col-sm-3"> | 
|                     <input autocomplete="off"   name="description" type="text" class="form-control"> | 
|                 </div> | 
|             </div> | 
|             <div class="form-group"> | 
|                 <label class="col-sm-2 control-label">文章类型图标</label> | 
|                 <div class="col-sm-3"> | 
|                     <input autocomplete="off"   id="iconText" name="icon" | 
|                            type="text" class="form-control "  onclick="showIcon()" readonly="readonly"> | 
|                 </div> | 
|                 <div class="Validform_checktip"></div> | 
|                 <!-- <label class="col-sm-2 control-label">链接地址</label> | 
|                 <div class="col-sm-3"> | 
|                     <input autocomplete="off"   name="url" type="text" class="form-control " nullmsg="产品名称不能为空" | 
|                         datatype="*1-20" errormsg="产品名称长度不能超过20"> | 
|                 </div> | 
|                 <div class="Validform_checktip"></div> --> | 
|             </div> | 
|   | 
|             <div class="form-group "> | 
|                 <div class="col-12 text-center"> | 
|                     <a href="javascript:;" onclick="myForm.submit()" | 
|                        class="btn btn-success radius">保存</a>     | 
|                     <button type="button" class="btn btn-danger radius" onclick="MTools.closeForm()" >取消</button> | 
|                 </div> | 
|             </div> | 
|         </form> | 
|     </div> | 
| </body> | 
|   | 
|   | 
| <script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script> | 
| <script  th:inline="javascript"> | 
|     var myForm; | 
|     $(function() { | 
|         $(".select2").select2({'width':'100%'}); | 
|         myForm=MForm.initForm({ | 
|             invokeUrl:basePath+"/admin/articleType/addModify", | 
|             afterSubmit : function() { | 
|                 parent.initFunctionList(); | 
|             } | 
|         }); | 
|         initFunctionList(); | 
|     }); | 
|   | 
|     /** | 
|      * 初始化产品列表 | 
|      */ | 
|     function initFunctionList() { | 
|         $.AjaxProxy({ | 
|             a : false, | 
|             c : false | 
|         }).invoke(basePath+"/admin/articleType/queryAll", function(loj) { | 
|             $("#parentId").createSelectTree(loj.attr("result").rows, { | 
|                 append : true, | 
|                 value:"articleTypeName" | 
|             }); | 
|         }); | 
|   | 
|     } | 
|   | 
|   | 
|     function showIcon() { | 
|         layer.open({ | 
|             type : 2, | 
|             title : "选择图标", | 
|             area : [ '90%', '90%' ], | 
|             fix : true, // 不固定 | 
|             maxmin : true, | 
|             content : basePath+'/common/redirect/icons' | 
|         }); | 
|     } | 
|     </script> | 
| </body> | 
| </html> |