Files
DzzOffice/dzz/comment/template/list.htm

222 lines
8.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!--{template common/header_simple_start}-->
<link href="{MOD_PATH}/images/folder.css?{VERHASH}" rel="stylesheet" media="all">
<link href="{MOD_PATH}/images/comment.css?Xqd" rel="stylesheet" media="all">
<link href="static/dzzthumb/jquery.dzzthumb.css?{VERHASH}" rel="stylesheet" media="all">
<script type="text/javascript" src="static/dzzthumb/jquery.dzzthumb.js?{VERHASH}"></script>
<style type="text/css">
.overflow-auto{
max-height: 60px;
}
.lie{
min-width: 120px
}
</style>
<!--{template common/header_simple_end}-->
<!--{template common/commer_header}-->
<div class="bs-container clearfix">
<div class="bs-left-container clearfix">
<!--{template left}-->
</div>
<div class="left-drager">
<div class="left-drager-op">
<div class="left-drager-sub"></div>
</div>
</div>
<div class="bs-main-container">
<!--{if !$list}-->
<p class="no-result-title text-center">暂无文件</p>
<!--{else}-->
<div class="main-header clearfix">
<form name="search" class="form-horizontal" action="{BASESCRIPT}" method="get">
<input type="hidden" name="mod" value="comment" />
<ul class="nav nav-pills">
<li class="pull-left btn-secetlt" style="display: none;">
<button class="btn btn-danger " type="submit" value="{lang delete}" onclick="delete_file();">{lang delete}</button>
</li>
</ul>
</form>
</div>
<form id="appform" name="appform" class="form-horizontal " action="{BASESCRIPT}?mod=comment" method="post" >
<input type="hidden" name="delsubmit" value="true" />
<input type="hidden" name="formhash" value="{FORMHASH}" />
<input type="hidden" name="refer" value="$refer" />
<table class="table table-hover">
<thead node-type="title" class="title">
<tr class="item clearfix">
<th node-type="title-col" class="col">
<div class="col-sm-10">
<div class="form-check">
<input class="form-check-input" name="del[]" type="checkbox" id="chkall"><label></label>
</div>
</div>
</th>
<th class="lie">内容</th>
<th class="lie">IP地址</th>
<th class="lie">设备信息</th>
<th node-type="title-col" data-key="dateline" class="lie col">发布时间<span class="asc $_GET[dateline]" style="visibility: <!--{if $_GET[dateline]}-->visible<!--{else}-->hidden<!--{/if}-->;"></span> </th>
<th node-type="title-col" data-key="author" class="lie col">发布人<span class="asc $_GET[author]" style="visibility: <!--{if $_GET[author]}-->visible<!--{else}-->hidden<!--{/if}-->;"></span></th>
<th class="lie">操作</th>
</tr>
</thead>
<tbody node-type="list" class="list list-share">
<!--{loop $list $value}-->
<tr node-type="item" id="comment_$value[cid]" data-cid="$value[cid]" class="item shareblock clearfix">
<td data-name="$value[name]" class="col">
<div class="col-sm-10">
<div class="form-check">
<input type="checkbox" class="form-check-input" name="del[]" value="$value[cid]" data-cid="$value[cid]">
<label></label>
</div>
</div>
</td>
<td node-type="name" class="name" title="$value[name]" data-size="$value[name]"><div class="overflow-auto">$value[message]</div></td>
<td><div class="overflow-auto">$value[ip]</div></td>
<td><div class="overflow-auto">$value[xtllq]</div></td>
<td><div class="overflow-auto">{eval echo dgmdate($value[dateline])}</div></td>
<td><div class="overflow-auto">$value[author]</div></td>
<td>
<div>
<a class="btn btn-outline-info" href="javascript:void(0);" title="{lang delete}" onclick="feed_delete('$value[cid]','comment_$value[cid]','$value[cid]')"><i class="dzz dzz-delete"></i></a>
<a class="btn btn-outline-info" title="编辑" hidefocus="true" href="javascript:void(0);" onclick="feed_edit('$value[cid]','$_GET[allowattach]','$_GET[allowat]','$_GET[allowsmiley]');"><i class="dzz dzz-create"></i></a>
</div>
</td>
</tr>
<!--{/loop}-->
</tbody>
</table>
</form>
<div class="clearfix" style="padding:10px;text-align:center">$multi</div>
<!--{/if}-->
</div>
</div>
<script type="text/javascript">
function feed_edit(cid,allowattach,allowat,allowsmiley){
showWindow('publish_edit_'+cid,DZZSCRIPT+'?mod=comment&op=ajax&do=edit&cid='+cid+'&allowattach='+allowattach+'&allowat='+allowat+'&allowsmiley='+allowsmiley);
}
function feed_delete(cid,domid,tid){
var msg='';
if(tid){
msg=__lang.sure_want_delete_comment;
}else{
msg=__lang.sure_want_delete_all_comment;
}
if(confirm(msg)){
jQuery.getJSON(DZZSCRIPT+'?mod=comment&op=ajax&do=delete&cid='+cid,function(json){
jQuery('#'+domid).slideUp(500,function(){
jQuery(this).remove();
if(tid ){
var replysum=parseInt(jQuery('#comment_reply_'+tid+'.item').html());
if(replysum>0) jQuery('#comment_reply_'+tid+'.item').html(replysum-1);
}
});
try{
callback_by_comment(domid,'delete');
}catch(e){}
});
}
}
var cids=[];
var theurl='$theurl';
jQuery(document).ready(function(e) {
jQuery(document).on('mouseenter', 'div[node-type=item]', function() {
jQuery(this).addClass('item-hover');
});
jQuery(document).on('mouseleave', 'div[node-type=item]', function() {
jQuery(this).removeClass('item-hover');
});
jQuery('.title .item .col[node-type=title-col][data-key=dateline],.title .item .col[node-type=title-col][data-key=author]').on('click', function() {
var el = jQuery(this);
el.find('.asc').css('visibility', 'visible').toggleClass('desc');
el.siblings().find('.asc').css('visibility', 'hidden');
var param=el.data('key')+'='+ (el.find('.asc').hasClass('desc') ? 'desc' : 'asc');
var regx=new RegExp('&(dateline|author)=(asc|desc)','i');
var url=theurl.replace(regx,'')+'&'+param;
location.href=correcturl(url);
});
});
//复选框选中问题
jQuery(document).off('click.shareclick').on('click.shareclick',".shareblock",function(){
var checkinput = jQuery(this).find("input[name='del[]']");
if(checkinput.prop('checked')){
checkinput.prop('checked',false);
jQuery(this).removeClass('item-block');
var cid=jQuery(this).find('input[name="del[]"]').data('cid');
var index = jQuery.inArray(cid,cids);
if(index != -1){
cids.splice(index,1);
}
}else{
checkinput.prop('checked',true);
jQuery(this).addClass('item-block');
var cid=jQuery(this).data('cid');
if(jQuery.inArray(cid,cids) == -1){
cids.push(cid);
}
}
sharelength();
});
jQuery(document).off('click.inputclick').on('click.inputclick',".shareblock input[name='del[]']",function(){
if($(this).prop('checked')){
jQuery(this).prop('checked',false);
jQuery(this).removeClass('item-block');
}else{
jQuery(this).prop('checked',true);
jQuery(this).addClass('item-block');
}
});
//复选框全选
jQuery(document).off('click.allclick').on('click.allclick','#chkall',function(){
var allchecked=jQuery(this).prop('checked');
jQuery(this).closest('.title').next('.list-share').find('input[name="del[]"]').each(function(){
if(allchecked){
jQuery(this).prop('checked',true);
jQuery(this).closest('.item').addClass('item-block');
var cid=jQuery(this).data('cid');
if(jQuery.inArray(cid,cids) == -1){
cids.push(cid);
}
}else{
jQuery(this).prop('checked',false);
jQuery(this).closest('.item').removeClass('item-block');
var cid=jQuery(this).data('cid');
var index = jQuery.inArray(cid,cids);
if(index != -1){
cids.splice(index,1);
}
}
});
sharelength();
})
function sharelength(){
if(cids.length>0){
jQuery('.sharepame-selected').show().next('.show_first').hide();
jQuery('#chkall').prop('checked',true);
jQuery('.btn-secetlt').show();
}else{
jQuery('.sharepame-selected').hide().next('.show_first').show();
jQuery('#chkall').prop('checked',false);
jQuery('.btn-secetlt').hide();
}
jQuery('.ex-number').html(cids.length);
}
function delete_file(){
var delnums = cids.length;
var icoids = cids.join(',');
if(confirm('你确定要删除'+delnums+'条评论吗(如果有回复评论也将一同删除)')){
jQuery.post('{MOD_URL}&do=delete',{'cid':icoids},function(data){
if(data['success']){
window.location.reload();
}else{
}
})
}
}
</script>
<!--{template common/footer_simple}-->