<extend name="Public/base" /> <block name="body"> <div class="cf main-place top_nav_list navtab_list"> <h3 class="page_title">{$meta_title}</h3> <p class="description_text"></p> </div> <div class="tab-content tabcon1711 tabcon17112"> <form action="{:U('update')}" method="post" class="form-horizontal form_info_ml"> <table border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <td class="l noticeinfo">模型标识</td> <td class="r table_radio"> <input name="name" value="" type="text" class=""> <span class="notice-text">请输入文档模型标识</span> </td> </tr> <tr> <td class="l noticeinfo">模型名称</td> <td class="r table_radio"> <input name="title" value="" type="text" class=""> <span class="notice-text">请输入模型的名称</span> </td> </tr> <tr> <td class="l noticeinfo">模型类型</td> <td class="r table_radio"> <span class="form_select"><select name="extend"> <option value="0">独立模型</option> <option value="1">文档模型</option> </select></span> <span class="notice-text">目前只支持独立模型和文档模型</span> </td> </tr> <tr> <td class="l noticeinfo">引擎类型</td> <td class="r table_radio"> <span class="form_select"><select name="engine_type"> <option value="MyISAM">MyISAM</option> <option value="InnoDB">InnoDB</option> <option value="MEMORY">MEMORY</option> <option value="BLACKHOLE">BLACKHOLE</option> <option value="MRG_MYISAM">MRG_MYISAM</option> <option value="ARCHIVE">ARCHIVE</option> </select></span> <span class="notice-text"></span> </td> </tr> <tr> <td class="l noticeinfo">是否需要主键</td> <td class="r table_radio"> <span class="form_select"><select name="need_pk"> <option value="1" selected="selected">是</option> <option value="0">否</option> </select></span> <span class="notice-text">选“是”则会新建默认的id字段作为主键</span> </td> </tr> </tbody> </table> </form> <div class="form-item cf"> <button class="submit_btn ajax-post mlspacing mt0" id="submit" type="submit" target-form="form-horizontal"> 保存 </button> <a class="submit_btn mt0" alt="返回上一页" title="返回上一页" href="javascript:window.history.back();" > 返回 </a> </div> </div> <div class="common_settings"> <span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span> <form class="addShortcutIcon"> <input type="hidden" name="title" value="{$m_title}"> <input type="hidden" name="url" value="{$m_url}"> </form> <a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a> </div> </block> <block name="script"> <script type="text/javascript" src="__STATIC__/jquery.dragsort-0.5.1.min.js"></script> <script type="text/javascript" charset="utf-8"> //导航高亮 highlight_subnav('{:U('Model/index')}'); $(function(){ showTab(); }) //拖曳插件初始化 $(function(){ $(".dragsort").dragsort({ dragSelector:'li', placeHolderTemplate: '<li class="draging-place"> </li>', dragBetween:true, //允许拖动到任意地方 dragEnd:function(){ updateVal(); } }); $('#sortUl li b').click(function(){ $(this).parent().remove(); updateVal(); }); // 更新排序后的隐藏域的值 function updateVal() { var sortVal = []; var i = 1; var val = ''; $('#base li').each(function(){ sortVal[i++] = $(this).find('em').text(); }); i = -1; $('#extend li').each(function(){ sortVal[i--] = $(this).find('em').text(); }); //将排序数组拼接成json格式字符串 val += "["; for (k in sortVal){ val += "\"" + sortVal[k] + "\"" + ":" + k + ","; } val = val.substr(0,val.length - 1) + "]"; $("input[name='fields']").val(val); } }) </script> </block>