You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
1.9 KiB
76 lines
1.9 KiB
{extend name="admin@public/base" /}
|
|
{block name="main-content"}
|
|
<div class="page-content">
|
|
<!--主题-->
|
|
<div class="page-header">
|
|
<h1>
|
|
您当前操作
|
|
<small>
|
|
<i class="ace-icon fa fa-angle-double-right"></i>
|
|
修改
|
|
</small>
|
|
</h1>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-xs-12">
|
|
<form class="form-horizontal" name="form0" id="postForm" method="post" action="{:url('ask/edit',array('kind'=>$kind,'page'=>$page,'id'=>$id))}" enctype="multipart/form-data">
|
|
|
|
<div id="contentbox">
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-2 control-label no-padding-right" >回复: </label>
|
|
<div class="col-sm-10">
|
|
<textarea rows="6" id="replay" name="replay" style="width:400px"></textarea>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="clearfix form-actions">
|
|
<div class="col-md-offset-3 col-md-9">
|
|
<button class="btn btn-info" type="submit">
|
|
<i class="ace-icon fa fa-check bigger-110"></i>
|
|
保存
|
|
</button>
|
|
|
|
|
|
<button class="btn" type="reset">
|
|
<i class="ace-icon fa fa-undo bigger-110"></i>
|
|
重置
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div><!-- /.page-content -->
|
|
{/block}
|
|
|
|
{block name="scripts"}
|
|
<script>
|
|
function getTxt(url){
|
|
$.get(url,function(data){
|
|
$("#contentbox").html(data);
|
|
});
|
|
}
|
|
$(function(){
|
|
var url="{:url('content',['id'=>$id,'kind'=>$kind])}";
|
|
getTxt(url);
|
|
setInterval(function(){
|
|
getTxt(url);
|
|
},3000);
|
|
$("#postForm").submit(function(event){
|
|
event.preventDefault();
|
|
var replay=$("#replay").val();
|
|
|
|
var url=$("#form0").attr("action");
|
|
if(typeof replay=='undefined'||replay=='')return false;
|
|
$.post(url,{"replay":replay},function(res){
|
|
console.log(res);
|
|
layer.msg(res.msg);
|
|
$("#replay").val("");
|
|
});
|
|
return false;
|
|
});
|
|
})
|
|
</script>
|
|
{/block}
|
|
|