修改了review视图中 在IE里Json.length方法失效的问题
This commit is contained in:
parent
1768ed5889
commit
3fe036d10b
|
@ -7,8 +7,8 @@
|
|||
$this->headLink()->appendStylesheet('/static/js/uploadify/uploadify.css');
|
||||
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
||||
$this->headScript()->appendFile('/static/js/uploadify/swfobject.js');
|
||||
$this->headScript()->appendFile('/static/js/uploadify/jquery.uploadify.v2.1.4.min.js');
|
||||
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
||||
$this->headScript()->appendFile('/static/js/uploadify/jquery.uploadify.v2.1.4.min.js');
|
||||
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
||||
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/review">'.$this->config->title->review.'</a>');
|
||||
|
@ -22,9 +22,9 @@
|
|||
</h1>
|
||||
<div id="left">
|
||||
<div id="abstract">
|
||||
<p>
|
||||
<p>
|
||||
<a class="colorbox" href="/service/bigthumb/id/<?php echo $md['id'];?>" title="<?php echo $md['title'];?>">
|
||||
<img src="/service/thumb/id/<?php echo $md['id'];?>" class="thumb" />
|
||||
<img src="/service/thumb/id/<?php echo $md['id'];?>" class="thumb" />
|
||||
</a>
|
||||
<?php echo str_replace(array("\r\n", "\n", "\r"),'</p><p>',$md['description']);?>
|
||||
</p>
|
||||
|
@ -145,20 +145,29 @@
|
|||
|
||||
<script>
|
||||
loadmdcomment(1);
|
||||
function loadmdcomment(page){var url="/review/allreview/uuid/<?php echo $md['uuid'];?>/";if(page!=''){url+='page/'+page;}
|
||||
$.ajax({type:"POST",url:url,data:'',success:function(html){$('#allcomments').html(html);},beforeSend:function(){$('#allcomments').html('<img src="/images/loading.gif" />正在加载...');}});}
|
||||
function loadmdcomment(page){
|
||||
var url="/review/allreview/uuid/<?php echo $md['uuid'];?>/";
|
||||
if(page!=''){url+='page/'+page;}
|
||||
$.ajax({
|
||||
'type':"POST",
|
||||
'url':url,
|
||||
'data':'',
|
||||
'success':function(html){$('#allcomments').html(html);},
|
||||
'beforeSend':function(){$('#allcomments').html('<img src="/images/loading.gif" />正在加载...');}
|
||||
});
|
||||
}
|
||||
|
||||
function checkfiles(rid){
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
url:"/review/attlist/id/"+rid,
|
||||
data:'',
|
||||
success:function(html){
|
||||
'type':"POST",
|
||||
'url':"/review/attlist/id/"+rid,
|
||||
'data':'',
|
||||
'success':function(html){
|
||||
$('#filelist_'+rid).html(html);
|
||||
},
|
||||
beforeSend:function(){
|
||||
'beforeSend':function(){
|
||||
$('#filelist_'+rid).html('<img src="/images/11887177066.gif" />正在加载...');
|
||||
},
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -189,16 +198,16 @@ $(document).ready(function() {
|
|||
}
|
||||
var date = $('#postcomment').serialize();
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
url:url,
|
||||
data:date,
|
||||
success:function(html){
|
||||
'type':"POST",
|
||||
'url':url,
|
||||
'data':date,
|
||||
'success':function(html){
|
||||
$('#infobox').html(html);
|
||||
$('#save').html('存草稿');
|
||||
setTimeout("$('#save').removeAttr('disabled');$('.box').remove();",3000);
|
||||
loadmdcomment(1);
|
||||
},
|
||||
beforeSend:function(){
|
||||
'beforeSend':function(){
|
||||
$('#save').attr('disabled','disabled');
|
||||
$('#save').html('<img src="/images/11887177066.gif" />正在保存...');
|
||||
}
|
||||
|
@ -251,7 +260,7 @@ $(document).ready(function() {
|
|||
}
|
||||
|
||||
$.getJSON("/upload/getatts/id/<?php echo $this->review['id'];?>", function(data) {
|
||||
if(data.length>0)
|
||||
if(data)
|
||||
{
|
||||
$.each(data, function(key, val) {
|
||||
$('<li/>', {
|
||||
|
@ -266,7 +275,7 @@ $(document).ready(function() {
|
|||
}
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
$(document).ready(function(){$(".colorbox").colorbox({photo:"true"});});
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue