<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
xmlns:c="http://java.sun.com/jsp/jstl/core"
|
xmlns:h="http://java.sun.com/jsf/html"
|
xmlns:f="http://java.sun.com/jsf/core"
|
xmlns:ui="http://java.sun.com/jsf/facelets">
|
<ui:composition template="/template/nit/tmp_brief.xhtml">
|
<ui:define name="acss">
|
<style>
|
.form-body span.text {
|
line-height: 34px
|
}
|
</style>
|
</ui:define>
|
<ui:define name="acontent">
|
<div class="row">
|
<div class="col-md-12 form-horizontal">
|
<div class="col-md-6">
|
<div class="input-group">
|
<input type="text" class="form-control" placeholder="请输入过滤内容" aria-describedby="basic-addon2" data-bind="value:filter" />
|
<a href="javascript:;" id="searcha" class="input-group-addon"><span class="fa fa-search"></span></a>
|
|
</div>
|
</div>
|
<div class="col-md-2 col-md-offset-4">
|
<button id="ctbtn" type="button" class="btn btn-primary" autocomplete="off">新建</button>
|
</div>
|
</div>
|
</div>
|
<div class="row goods-table">
|
<div class="col-md-12">
|
<table class="table table-striped table-bordered table-condensed">
|
<thead>
|
<tr>
|
<th>序号</th>
|
<th>名称</th>
|
<th>icon</th>
|
<th>url</th>
|
<th>状态</th>
|
<th>target</th>
|
<th>顺序</th>
|
<th>操作</th>
|
</tr>
|
</thead>
|
<tbody data-bind="foreach:menus">
|
<tr>
|
<td data-bind="text:$index()+1"></td>
|
<td data-bind="text:$data.level()+$data.title()">名称</td>
|
<td ><span class="fa" data-bind="css:$data.icon"></span></td>
|
<td data-bind="text:$data.url">url</td>
|
<td>
|
<a href="javascript:;" data-bind="event:{click:$parent.validchg}">
|
<span data-bind="css:($data.valid()==true)?'glyphicon glyphicon-ok':'glyphicon glyphicon-remove' "></span>
|
</a>
|
</td>
|
<td data-bind="text:$data.target">target</td>
|
<td>
|
<a href="javascript:;" data-bind="event:{click:$parent.uporder}">
|
<span class="fa fa-arrow-circle-o-up"></span>
|
</a>|
|
<a href="javascript:;" data-bind="event:{click:$parent.downorder}">
|
<span class="fa fa-arrow-circle-o-down"></span>
|
</a>
|
</td>
|
<td >
|
<a href="javascript:;" data-bind="event:{click:$parent.delmenu}">
|
<span class="fa fa-times"></span>
|
</a>|
|
<a href="javascript:;" data-bind="event:{click:$parent.editmenu}">
|
<span class="fa fa-edit"></span>
|
</a>
|
</td>
|
</tr>
|
</tbody>
|
<tfoot>
|
<tr>
|
<td colspan="8">
|
<div id="pagdiv">
|
</div>
|
</td>
|
</tr>
|
</tfoot>
|
</table>
|
</div>
|
</div>
|
<input type="hidden" name="mtype" id="mtype" value="#{param.mtype==null?0:param.mtype}" />
|
<input type="hidden" name="mtypetitle" id="mtypetitle" value="#{param.mtypetitle==null?'':param.mtypetitle}" />
|
|
<div class="modal fade" id="modal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
<div class="modal-dialog">
|
<div class="modal-content">
|
<div class="modal-header">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<span aria-hidden="true">×</span>
|
</button>
|
<h4 class="modal-title" >编辑菜单</h4>
|
</div>
|
<div class="modal-body">
|
<form class="form-horizontal" id="fm1">
|
<input type="hidden" name="menuid" id="menuid" value="" data-bind="value:menu().id" />
|
<div class="form-group">
|
<label for="title" class="col-sm-2 control-label">题目</label>
|
<div class="col-sm-8">
|
<input type="text" class="form-control" id="title" name="title" placeholder="title" data-bind="value:menu().title"/>
|
</div>
|
</div>
|
<div class="form-group">
|
<label for="icon" class="col-sm-2 control-label">图标</label>
|
<div class="col-sm-8">
|
<input type="text" class="form-control" id="icon" name="icon" placeholder="fa fa-download" data-bind="value:menu().icon"/>
|
</div>
|
</div>
|
<div class="form-group">
|
<label for="URL" class="col-sm-2 control-label">URL</label>
|
<div class="col-sm-8">
|
<input type="text" class="form-control" id="URL" name="URL" placeholder="URL" data-bind="value:menu().url"/>
|
</div>
|
</div>
|
<div class="form-group">
|
<label for="vld" class="col-sm-2 control-label">启停用</label>
|
<div class="col-sm-8">
|
<label class="checkbox-inline">
|
<input type="checkbox" name="vld" id="vld" data-bind="checked:menu().valid"/> 是否启用
|
</label>
|
</div>
|
</div>
|
<div class="form-group">
|
<label for="TARGET" class="col-sm-2 control-label">TARGET</label>
|
<div class="col-sm-8">
|
<input type="text" class="form-control" id="TARGET" name="TARGET" placeholder="_blank,_self,etc..." data-bind="value:menu().trget"/>
|
</div>
|
</div>
|
<div class="form-group">
|
<label for="TARGET" class="col-sm-2 control-label">菜单类型</label>
|
<div class="col-sm-8">
|
<select data-bind="value:menu().mtype,options:mtypes,optionsText:'title',optionsValue:'id'" readonly="readonly">
|
<option value="0">-请选择-</option>
|
</select>
|
</div>
|
</div>
|
<div class="form-group">
|
<label for="TARGET" class="col-sm-2 control-label">上级菜单</label>
|
<div class="col-sm-8">
|
<div class="input-group">
|
<input type="hidden" id="pid" name="pid" value="" data-bind="value:menu().pmenu" />
|
<span class="form-control" id="ptitle" data-bind="text:menu().pmenutitle">请选择上级菜单</span>
|
<a href="javascript:;" id="selparent" class="input-group-addon"><span class="fa fa-caret-square-o-up"></span></a>
|
</div>
|
</div>
|
</div>
|
</form>
|
</div>
|
<div id="errmsg"></div>
|
<div class="modal-footer">
|
<button type="button" class="btn btn-primary" data-loading-text="保存中..." id="tjbtn">提交</button>
|
</div>
|
</div>
|
</div>
|
</div>
|
|
|
<div class="modal fade" id="modal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
<div class="modal-dialog">
|
<div class="modal-content">
|
<div class="modal-header">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<span aria-hidden="true">×</span>
|
</button>
|
<h4 class="modal-title" >选择上级菜单</h4>
|
</div>
|
<div class="modal-body">
|
<div class="row">
|
|
<table class="table table-striped table-bordered table-condensed">
|
<thead>
|
<tr>
|
<th>序号</th>
|
<th>菜单题目</th>
|
</tr>
|
</thead>
|
<tbody data-bind="foreach:pmenus">
|
<tr>
|
<td data-bind="text:$index()+1"></td>
|
<td>
|
<a href="javascript:;" data-bind="event:{click:$parent.psel},text:$data.title"></a>
|
</td>
|
</tr>
|
</tbody>
|
<tfoot>
|
<tr>
|
<td colspan="2">
|
<div id="pagdiv2">
|
|
</div>
|
</td>
|
</tr>
|
</tfoot>
|
</table>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</ui:define>
|
<ui:define name="myscript">
|
<script src="js/bmenu.js"></script>
|
</ui:define>
|
</ui:composition>
|
</html>
|