增加了uploadify的错误调试
This commit is contained in:
parent
ea17ac8556
commit
8d40a45d1e
|
@ -25,11 +25,11 @@
|
||||||
<?php echo str_replace(array("\r\n", "\n", "\r"),'</p><p>',$md['description']);?>
|
<?php echo str_replace(array("\r\n", "\n", "\r"),'</p><p>',$md['description']);?>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
[<a href="/data/<?php echo $md['uuid']; ?>"><img src="/images/westdc_40w.gif" alt="查看元数据"/>元数据查看</a>]
|
[<a href="/data/<?php echo $md['uuid']; ?>"><img src="/images/westdc_40w.gif" alt="查看元数据"/>元数据查看</a>]
|
||||||
[<a href="/service/pdf/review/1/uuid/<?php echo $md['uuid']; ?>"><img src="/images/pdf_icon.jpg" alt="Adobe PDF格式">PDF版本下载</a>]
|
[<a href="/service/pdf/review/1/uuid/<?php echo $md['uuid']; ?>"><img src="/images/pdf_icon.jpg" alt="Adobe PDF格式">PDF版本下载</a>]
|
||||||
[<a href="/service/odt/review/1/uuid/<?php echo $md['uuid']; ?>"><img src="/images/odt_icon.png" alt="OpenOffice odt格式">ODT版本下载</a>]
|
[<a href="/service/odt/review/1/uuid/<?php echo $md['uuid']; ?>"><img src="/images/odt_icon.png" alt="OpenOffice odt格式">ODT版本下载</a>]
|
||||||
[<a href="/service/doc/review/1/uuid/<?php echo $md['uuid']; ?>"><img src="/images/doc_icon.gif" alt="MS Word doc格式">DOC版本下载</a>]
|
[<a href="/service/doc/review/1/uuid/<?php echo $md['uuid']; ?>"><img src="/images/doc_icon.gif" alt="MS Word doc格式">DOC版本下载</a>]
|
||||||
[<a href="/service/xml/uuid/<?php echo $md['uuid'];?>"><img src="/images/xml.gif" alt="查看XML源文件">XML源文件查看</a>]
|
[<a href="/service/xml/uuid/<?php echo $md['uuid'];?>"><img src="/images/xml.gif" alt="查看XML源文件">XML源文件查看</a>]
|
||||||
[<a href="/review/help"><img src="/images/help_icon.jpg" alt="元数据评审说明">元数据评审说明</a>]
|
[<a href="/review/help"><img src="/images/help_icon.jpg" alt="元数据评审说明">元数据评审说明</a>]
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
<ul id="datalist">
|
<ul id="datalist">
|
||||||
</ul>
|
</ul>
|
||||||
<input id="file_upload" name="Filedata" type="file" />
|
<input id="file_upload" name="Filedata" type="file" />
|
||||||
<input type="button" class="btn btn-small" onclick="$('#file_upload').uploadifyUpload()" value="上传" />
|
<input type="button" class="btn btn-small" onclick="$('#file_upload').uploadifyUpload();" value="上传" />
|
||||||
<a href="javascript:void(0);" onclick="$('#showexts').toggle()">查看可上传的附件类型</a>
|
<a href="javascript:void(0);" onclick="$('#showexts').toggle()">查看可上传的附件类型</a>
|
||||||
<div id='showexts' style="display:none;">'doc', 'docx', 'xls', 'xlsx', 'ppt', 'htm', 'html', 'txt', 'zip', 'rar', 'gz', 'bz2','gif', 'jpg', 'jpeg', 'png', 'bmp', 'pdf'</div>
|
<div id='showexts' style="display:none;">'doc', 'docx', 'xls', 'xlsx', 'ppt', 'htm', 'html', 'txt', 'zip', 'rar', 'gz', 'bz2','gif', 'jpg', 'jpeg', 'png', 'bmp', 'pdf'</div>
|
||||||
</p>
|
</p>
|
||||||
|
@ -188,7 +188,7 @@ $(document).ready(function() {
|
||||||
|
|
||||||
$('#file_upload').uploadify({
|
$('#file_upload').uploadify({
|
||||||
'uploader' : '/static/js/uploadify/uploadify.swf',
|
'uploader' : '/static/js/uploadify/uploadify.swf',
|
||||||
'scriptData' : {'PHPSESSID' : '<?php echo session_id(); ?>'},
|
'scriptData': {'PHPSESSID' : '<?php echo session_id(); ?>'},
|
||||||
'script' : '/upload',
|
'script' : '/upload',
|
||||||
'cancelImg' : '/static/js/uploadify/cancel.png',
|
'cancelImg' : '/static/js/uploadify/cancel.png',
|
||||||
'folder' : '/uploads',
|
'folder' : '/uploads',
|
||||||
|
@ -200,11 +200,7 @@ $(document).ready(function() {
|
||||||
var obj = jQuery.parseJSON(response);
|
var obj = jQuery.parseJSON(response);
|
||||||
var html;
|
var html;
|
||||||
if(obj.error=='')
|
if(obj.error=='')
|
||||||
{
|
{html = obj.html;}else{html = obj.error;}
|
||||||
html = obj.html;
|
|
||||||
}else{
|
|
||||||
html = obj.error;
|
|
||||||
}
|
|
||||||
$('<li/>', {
|
$('<li/>', {
|
||||||
"id":'uploadedItem_'+obj.attid,
|
"id":'uploadedItem_'+obj.attid,
|
||||||
"class":'uploadifyQueueItem',
|
"class":'uploadifyQueueItem',
|
||||||
|
@ -213,6 +209,9 @@ $(document).ready(function() {
|
||||||
$('#deletebtn_'+obj.attid).bind('click', function() {
|
$('#deletebtn_'+obj.attid).bind('click', function() {
|
||||||
deleteatt(obj.attid);
|
deleteatt(obj.attid);
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
'onError' : function (event,ID,fileObj,errorObj) {
|
||||||
|
alert(errorObj.type + ' Error: ' + errorObj.info);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -245,6 +244,9 @@ $(document).ready(function() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
function checkfiles(rid){
|
||||||
|
alert(rid);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue