修复拼写错误;修复单数据查看模式下上传问题

This commit is contained in:
wlx 2012-05-18 13:14:52 +00:00
parent ad5f92f0d1
commit 0628745e69
3 changed files with 9 additions and 16 deletions

View File

@ -2543,7 +2543,7 @@ class AuthorController extends Zend_Controller_Action
try{ try{
$files=new files(); $files=new files();
$msg = $files -> upload($this->view->config->upload,$_FILES['Filedata'],'liteature'); $msg = $files -> upload($this->view->config->upload,$_FILES['Filedata'],'literature');
if(empty($msg['error'])) if(empty($msg['error']))
{ {
@ -2729,7 +2729,7 @@ class AuthorController extends Zend_Controller_Action
try{ try{
$files=new files(); $files=new files();
$msg = $files -> upload($this->view->config->upload,$_FILES['Filedata'],'md'); $msg = $files -> upload($this->view->config->upload,$_FILES['Filedata'],'document');
if(empty($msg['error'])) if(empty($msg['error']))
{ {

View File

@ -6,6 +6,9 @@ $this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->headScript()->appendFile('/js/jquery.colorbox-min.js'); $this->headScript()->appendFile('/js/jquery.colorbox-min.js');
$this->headLink()->appendStylesheet('/css/author.css'); $this->headLink()->appendStylesheet('/css/author.css');
$this->headLink()->appendStylesheet('/css/colorbox.css'); $this->headLink()->appendStylesheet('/css/colorbox.css');
$this->headScript()->appendFile('/static/js/uploadify/swfobject.js');
$this->headScript()->appendFile('/static/js/uploadify/jquery.uploadify.v2.1.4.min.js');
$this->headLink()->appendStylesheet('/static/js/uploadify/uploadify.css');
$this->breadcrumb('<a href="/">首页</a>'); $this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/author">数据作者</a>'); $this->breadcrumb('<a href="/author">数据作者</a>');
$this->breadcrumb('数据文献管理'); $this->breadcrumb('数据文献管理');
@ -42,7 +45,7 @@ $this->breadcrumb()->setSeparator(' > ');
<p><?php echo $item['reference'];?> <p><?php echo $item['reference'];?>
<a href="/author/literature/id/<?php echo $item['id'];?>">查看详细</a> <a href="/author/literature/id/<?php echo $item['id'];?>">查看详细</a>
| <a onclick="return confirm('是否确定删除该版本?');" href="javascript:action('delete&id=<?php echo $item['id'];?>','<?php echo $item['uuid'];?>');" class="more">删除</a> | <a onclick="return confirm('是否确定删除该版本?');" href="javascript:action('delete&id=<?php echo $item['id'];?>','<?php echo $item['uuid'];?>');" class="more">删除</a>
| <a onclick="$('#commit_submit').attr('onclick','commit(\'<?php echo $item['uuid'];?>\');');" href="#addform" class="more inline">添加文献</a> | <a href="/author/literature/ac/add/uuid/<?php echo $item['uuid'];?>" class="more iframe">添加文献</a>
</p> </p>
</li> </li>
<?php endforeach; <?php endforeach;
@ -79,23 +82,13 @@ function action(ac,uuid){
} }
}); });
} }
$(".iframe").colorbox({iframe:true, width:"60%", height:"80%"});
$(".inline").colorbox({inline:true, width:"50%"}); $(".inline").colorbox({inline:true, width:"50%"});
function commit(id){ function commit(id){
action('add&ref='+$('#ref').val()+'&reftype='+$('#reftype').val(),id); action('add&ref='+$('#ref').val()+'&reftype='+$('#reftype').val(),id);
} }
</script> </script>
<div class="colorbox" style="display:none;"> <div class="colorbox" style="display:none;">
<div id="addform">
<form>
<p>
<label>文献引用信息:</label><br />
<textarea class="full" style="height:40px;" id="ref"></textarea>
<input type="radio" id="reftype" name="reftype" value="0" checked />数据作者的文献
<input type="radio" id="reftype" name="reftype" value="1" />数据用户的文献
</p>
<input type="button" onclick="" id="commit_submit" class="btn btn-green big" value="提交"/>
</form>
</div>
<div class="error"><img src="/images/alert_big_error.png" /><span></span></div> <div class="error"><img src="/images/alert_big_error.png" /><span></span></div>
<div class="ok"><img src="/images/alert_big_ok.png" /><span></span></div> <div class="ok"><img src="/images/alert_big_ok.png" /><span></span></div>
<div class="warning"><img src="/images/alert_big_warning.png" /><span></span></div> <div class="warning"><img src="/images/alert_big_warning.png" /><span></span></div>

View File

@ -28,7 +28,7 @@ class files{
'file' => array('doc', 'docx', 'xls', 'xlsx', 'ppt', 'htm', 'html', 'txt', 'zip', 'rar', 'gz', 'bz2'), 'file' => array('doc', 'docx', 'xls', 'xlsx', 'ppt', 'htm', 'html', 'txt', 'zip', 'rar', 'gz', 'bz2'),
'reviewatt'=>array('doc', 'docx', 'xls', 'xlsx', 'ppt', 'htm', 'html', 'txt', 'zip', 'rar', 'gz', 'bz2','gif', 'jpg', 'jpeg', 'png', 'bmp','pdf','odt'), 'reviewatt'=>array('doc', 'docx', 'xls', 'xlsx', 'ppt', 'htm', 'html', 'txt', 'zip', 'rar', 'gz', 'bz2','gif', 'jpg', 'jpeg', 'png', 'bmp','pdf','odt'),
'md'=>array('doc', 'docx', 'xls', 'xlsx', 'ppt', 'htm', 'html', 'txt', 'zip', 'rar', 'gz', 'bz2','gif', 'jpg', 'jpeg', 'png', 'bmp','pdf','odt'), 'md'=>array('doc', 'docx', 'xls', 'xlsx', 'ppt', 'htm', 'html', 'txt', 'zip', 'rar', 'gz', 'bz2','gif', 'jpg', 'jpeg', 'png', 'bmp','pdf','odt'),
'liteature'=>array('doc', 'docx', 'xls', 'xlsx', 'ppt', 'htm', 'html', 'txt', 'zip', 'rar', 'gz', 'bz2','gif', 'jpg', 'jpeg', 'png', 'bmp','pdf','odt'), 'literature'=>array('doc', 'docx', 'xls', 'xlsx', 'ppt', 'htm', 'html', 'txt', 'zip', 'rar', 'gz', 'bz2','gif', 'jpg', 'jpeg', 'png', 'bmp','pdf','odt'),
'document'=>array('doc', 'docx', 'xls', 'xlsx', 'ppt', 'htm', 'html', 'txt', 'zip', 'rar', 'gz', 'bz2','gif', 'jpg', 'jpeg', 'png', 'bmp','pdf','odt'), 'document'=>array('doc', 'docx', 'xls', 'xlsx', 'ppt', 'htm', 'html', 'txt', 'zip', 'rar', 'gz', 'bz2','gif', 'jpg', 'jpeg', 'png', 'bmp','pdf','odt'),
); );
//最大文件大小 //最大文件大小