更新文件列表及数据文档附件功能
This commit is contained in:
parent
cf9dff3999
commit
99451c403b
|
@ -99,7 +99,15 @@ else
|
||||||
echo $this->doc;
|
echo $this->doc;
|
||||||
}?>">数据说明文档</a></li>
|
}?>">数据说明文档</a></li>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<li id="datatype">数据共享方式:<?php if ($md->datatype) print "离线"; else print "在线(可直接下载)";?> <a href="#" id="show-list" rel="<?php echo $md->uuid;?>">文件列表</a></li>
|
<?php if ($this->attachments) : ?>
|
||||||
|
<li>相关文档:
|
||||||
|
<?php foreach ($this->attachments as $k=>$a) : ?>
|
||||||
|
<a href="/service/attach/id/<?php echo $a->id; ?>" title="<?php echo $a->realname; ?>"><?php echo ($k+1); ?></a>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<a href="/service/attach/zip/<?php echo $md->uuid; ?>"><img src="/images/zip_icon.gif" title="打包下载"/></a>
|
||||||
|
</li>
|
||||||
|
<?php endif; ?>
|
||||||
|
<li id="datatype">数据共享方式:<?php if ($md->datatype) print "离线"; else print "在线(可直接下载)";?> <a href="javascript:void(0);" id="show-list" onclick="getFileList()" title="">文件列表</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<div id="linkurl">
|
<div id="linkurl">
|
||||||
<?php if ($md->status>0 and $md->status<5) : ?>
|
<?php if ($md->status>0 and $md->status<5) : ?>
|
||||||
|
@ -231,9 +239,9 @@ endforeach;
|
||||||
|
|
||||||
<div id="window-outter" style="display:none;">
|
<div id="window-outter" style="display:none;">
|
||||||
<div id="window-inner">
|
<div id="window-inner">
|
||||||
<div id="window-closer-container">[<a href="#" id="window-closer">关闭</a>]</div>
|
<div id="window-closer-container">[<a href="#" id="window-closer" onclick="$('#window-outter').hide()">关闭</a>]</div>
|
||||||
<div id="window-content-container">
|
<div id="window-content-container">
|
||||||
<div id="window-loading">加载中...</div>
|
<div id="window-loading"><img src="/images/loading.gif" />加载中...</div>
|
||||||
<ol id="file-list">
|
<ol id="file-list">
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
|
@ -280,10 +288,9 @@ function ajaxpage(page){
|
||||||
};ajaxpage(0);
|
};ajaxpage(0);
|
||||||
function getFileList(){
|
function getFileList(){
|
||||||
var tw = ($(window).width() - $('#window-outter').width())/2;
|
var tw = ($(window).width() - $('#window-outter').width())/2;
|
||||||
$('#window-inner').css('min-height','450px');
|
|
||||||
$('#window-outter').css({'right':tw});
|
$('#window-outter').css({'right':tw});
|
||||||
$('#window-outter').show();
|
$('#window-outter').show();
|
||||||
$.getJSON("/filelist/uuid/<?php echo $md->uuid;?>", function(data) {
|
$.getJSON("/service/filelist/uuid/<?php echo $md->uuid;?>", function(data) {
|
||||||
var items = [];
|
var items = [];
|
||||||
if(data.length>0)
|
if(data.length>0)
|
||||||
{
|
{
|
||||||
|
@ -310,11 +317,11 @@ function getSubFileList(uuid,id,depth){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$('<div/>', {
|
$('<div/>', {
|
||||||
'style':'max-height:400px; overflow:scroll; overflow-x:hidden;',
|
'style':'max-height:400px; overflow:auto; overflow-x:hidden;',
|
||||||
'id': 'div_'+id,
|
'id': 'div_'+id,
|
||||||
"html": '<li><img src="/images/11887177066.gif" />加载中</li>'
|
"html": '<li><img src="/images/loading.gif" />加载中</li>'
|
||||||
}).appendTo('#li_'+id);
|
}).appendTo('#li_'+id);
|
||||||
url="/filelist/sub/uuid/"+uuid+"/subpath/"+id+"/depth/"+depth;
|
url="/service/subfilelist/uuid/"+uuid+"/subpath/"+id+"/depth/"+depth;
|
||||||
$.getJSON(url, function(data) {
|
$.getJSON(url, function(data) {
|
||||||
var items = [];
|
var items = [];
|
||||||
$.each(data, function(key, val) {
|
$.each(data, function(key, val) {
|
||||||
|
|
Loading…
Reference in New Issue