修改js代码在IE6中的兼容问题
This commit is contained in:
parent
a8809be07d
commit
444f78b74f
|
@ -343,7 +343,7 @@ function getSubFileList(uuid,id,depth){
|
||||||
$('<div/>', {
|
$('<div/>', {
|
||||||
'style':'max-height:400px; overflow:scroll; overflow-x:hidden;',
|
'style':'max-height:400px; overflow:scroll; overflow-x:hidden;',
|
||||||
'id': 'div_'+id,
|
'id': 'div_'+id,
|
||||||
html: '<li><img src="/images/11887177066.gif" />加载中</li>'
|
"html": '<li><img src="/images/11887177066.gif" />加载中</li>'
|
||||||
}).appendTo('#li_'+id);
|
}).appendTo('#li_'+id);
|
||||||
url="/filelist/sub/uuid/"+uuid+"/subpath/"+id+"/depth/"+depth;
|
url="/filelist/sub/uuid/"+uuid+"/subpath/"+id+"/depth/"+depth;
|
||||||
$.getJSON(url, function(data) {
|
$.getJSON(url, function(data) {
|
||||||
|
|
|
@ -136,8 +136,53 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript" language="javascript">
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
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" />正在加载...');}});}
|
||||||
|
$('.slideabletbox .title').click(
|
||||||
|
function(){
|
||||||
|
$(this).next(".content").slideToggle(1000,function(){
|
||||||
|
if($(this).css('display')=='none')
|
||||||
|
$(this).prev('.title').find(".slidebtn").html('<img src="/images/slidedown.png" />');
|
||||||
|
else
|
||||||
|
$(this).prev('.title').find(".slidebtn").html('<img src="/images/slideup.png" />');
|
||||||
|
;})
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#submit').click(function(){
|
||||||
|
savereview(1);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#save').click(function(){
|
||||||
|
savereview(0);
|
||||||
|
});
|
||||||
|
|
||||||
|
function savereview(save){
|
||||||
|
var url="/review/save/uuid/<?php echo $md['uuid'];?>";
|
||||||
|
if(save>0)
|
||||||
|
{
|
||||||
|
url = url+"/do/submit";
|
||||||
|
}
|
||||||
|
var date = $('#postcomment').serialize();
|
||||||
|
$.ajax({
|
||||||
|
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(){
|
||||||
|
$('#save').attr('disabled','disabled');
|
||||||
|
$('#save').html('<img src="/images/11887177066.gif" />正在保存...');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
$('#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(); ?>'},
|
||||||
|
@ -158,9 +203,9 @@ $(document).ready(function() {
|
||||||
html = obj.error;
|
html = obj.error;
|
||||||
}
|
}
|
||||||
$('<li/>', {
|
$('<li/>', {
|
||||||
id:'uploadedItem_'+obj.attid,
|
"id":'uploadedItem_'+obj.attid,
|
||||||
class:'uploadifyQueueItem',
|
"class":'uploadifyQueueItem',
|
||||||
html: html
|
"html": html
|
||||||
}).appendTo('#datalist');
|
}).appendTo('#datalist');
|
||||||
$('#deletebtn_'+obj.attid).bind('click', function() {
|
$('#deletebtn_'+obj.attid).bind('click', function() {
|
||||||
deleteatt(obj.attid);
|
deleteatt(obj.attid);
|
||||||
|
@ -187,9 +232,9 @@ $(document).ready(function() {
|
||||||
{
|
{
|
||||||
$.each(data, function(key, val) {
|
$.each(data, function(key, val) {
|
||||||
$('<li/>', {
|
$('<li/>', {
|
||||||
id:'uploadedItem_'+val['id'],
|
"id":'uploadedItem_'+val['id'],
|
||||||
class:'uploadifyQueueItem',
|
"class":'uploadifyQueueItem',
|
||||||
html: val['html']
|
"html": val['html']
|
||||||
}).appendTo('#datalist');
|
}).appendTo('#datalist');
|
||||||
$('#deletebtn_'+val['id']).bind('click', function() {
|
$('#deletebtn_'+val['id']).bind('click', function() {
|
||||||
deleteatt(val['id']);
|
deleteatt(val['id']);
|
||||||
|
@ -197,51 +242,6 @@ $(document).ready(function() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
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" />正在加载...');}});}
|
|
||||||
$('.slideabletbox .title').click(
|
|
||||||
function(){
|
|
||||||
$(this).next(".content").slideToggle(1000,function(){
|
|
||||||
if($(this).css('display')=='none')
|
|
||||||
$(this).prev('.title').find(".slidebtn").html('<img src="/images/slidedown.png" />');
|
|
||||||
else
|
|
||||||
$(this).prev('.title').find(".slidebtn").html('<img src="/images/slideup.png" />');
|
|
||||||
;})
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#submit').click(function(){
|
|
||||||
savereview(1);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#save').click(function(){
|
|
||||||
savereview(0);
|
|
||||||
});
|
|
||||||
|
|
||||||
function savereview(save){
|
|
||||||
var url="/review/save/uuid/<?php echo $md['uuid'];?>";
|
|
||||||
if(save>0)
|
|
||||||
{
|
|
||||||
url += "/do/submit";
|
|
||||||
}
|
|
||||||
var date = $('#postcomment').serialize();
|
|
||||||
$.ajax({
|
|
||||||
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(){
|
|
||||||
$('#save').attr('disabled','disabled');
|
|
||||||
$('#save').html('<img src="/images/11887177066.gif" />正在保存...');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue