+ finish task #939.

This commit is contained in:
wangyidong
2012-12-14 07:34:07 +00:00
parent d0041a5abb
commit 653b197912
4 changed files with 19 additions and 7 deletions

View File

@@ -7,13 +7,13 @@ function switchChange(historyID,type)
{
$('#switchButton' + historyID).val(fold);
$('#changeBox' + historyID).show();
$('#changeBox' + historyID).prev().show();
$('#changeBox' + historyID).prev('.changeDiff').show();
}
else
{
$('#switchButton' + historyID).val(unfold);
$('#changeBox' + historyID).hide();
$('#changeBox' + historyID).prev().hide();
$('#changeBox' + historyID).prev('.changeDiff').hide();
}
}
@@ -30,8 +30,17 @@ function toggleStripTags(obj)
})
}
function toggleShow()
{
$('.changes').each(function(){
var box = $(this).parent();
var switchButtonID = ($(box).find('span').find("input[type='button']").attr('id'));
switchChange(switchButtonID.replace('switchButton', ''), $('#' + switchButtonID).val());
})
}
$(function(){
var diffButton = "<button onclick='toggleStripTags(this)' class='hidden'><?php echo $lang->action->toggleDiff?></button>";
var diffButton = "<input type='button' onclick='toggleStripTags(this)' class='hidden changeDiff' value='<?php echo $lang->action->toggleDiff?>' >";
var newBoxID = ''
var oldBoxID = ''
$('blockquote').each(function(){
@@ -52,14 +61,14 @@ $(function(){
<div id='actionbox'>
<fieldset>
<legend>
<span onclick='$("#historyItem li").reverseOrder();' class='hand'> <?php echo $lang->history . $lang->reverse;?></span>
<span onclick='$(".changes").toggle();' class='hand'><?php echo $lang->switchDisplay;?></span>
<span onclick='$("#historyItem li").reverseOrder();' class='hand'> <?php echo $lang->history . "[<span title='$lang->reverse' class='log-reverse'>&nbsp;</span>]";?></span>
<span onclick='toggleShow();' class='hand'><?php echo "[<span title='$lang->switchDisplay' class='switchDisplay'>&nbsp;</span>]";?></span>
</legend>
<?php else:?>
<table class='table-1' id='actionbox'>
<caption>
<span onclick='$("#historyItem li").reverseOrder();' class='hand'> <?php echo $lang->history . $lang->reverse;?></span>
<span onclick='$(".changes").toggle();' class='hand'><?php echo $lang->switchDisplay;?></span>
<span onclick='$("#historyItem li").reverseOrder();' class='hand'> <?php echo $lang->history . "[<span title='$lang->reverse' class='log-reverse'>&nbsp;</span>]";?></span>
<span onclick='toggleShow();' class='hand'><?php echo "[<span title='$lang->switchDisplay' class='switchDisplay'>&nbsp;</span>]";?></span>
</caption>
<tr><td>
<?php endif;?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -533,3 +533,6 @@ table.tablesorter thead tr .headerSortDown {background-image: url(./images/table
/* Todo icons. */
#featurebar .f-right .icon-green-todo-create {padding:2px 8px; background:url(images/main/zt-icons.png) 0px -202px;}
#featurebar .f-right .icon-green-todo-batchCreate {padding:2px 8px; background:url(images/main/zt-icons.png) -20px -202px;}
.log-reverse{padding:2px 10px; background:url(images/main/log-reverse.png) center no-repeat}
.switchDisplay{padding:2px 10px; background:url(images/main/switchdisplay.png) center no-repeat}