增加了uploadify的错误调试

This commit is contained in:
Li Jianxuan 2011-11-07 02:46:35 +00:00
parent ea17ac8556
commit 8d40a45d1e
1 changed files with 14 additions and 12 deletions

View File

@ -25,11 +25,11 @@
<?php echo str_replace(array("\r\n", "\n", "\r"),'</p><p>',$md['description']);?>
</p>
<p>
[<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/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/xml/uuid/<?php echo $md['uuid'];?>"><img src="/images/xml.gif" alt="查看XML源文件">XML源文件查看</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/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/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>]
</p>
@ -83,7 +83,7 @@
<ul id="datalist">
</ul>
<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>
<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>
@ -188,7 +188,7 @@ $(document).ready(function() {
$('#file_upload').uploadify({
'uploader' : '/static/js/uploadify/uploadify.swf',
'scriptData' : {'PHPSESSID' : '<?php echo session_id(); ?>'},
'scriptData': {'PHPSESSID' : '<?php echo session_id(); ?>'},
'script' : '/upload',
'cancelImg' : '/static/js/uploadify/cancel.png',
'folder' : '/uploads',
@ -200,11 +200,7 @@ $(document).ready(function() {
var obj = jQuery.parseJSON(response);
var html;
if(obj.error=='')
{
html = obj.html;
}else{
html = obj.error;
}
{html = obj.html;}else{html = obj.error;}
$('<li/>', {
"id":'uploadedItem_'+obj.attid,
"class":'uploadifyQueueItem',
@ -213,6 +209,9 @@ $(document).ready(function() {
$('#deletebtn_'+obj.attid).bind('click', function() {
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>