* fix select buttons.

This commit is contained in:
Catouse
2014-12-16 10:55:22 +08:00
parent e5f9fa752d
commit 6e5148963e
2 changed files with 9 additions and 7 deletions

View File

@@ -377,7 +377,9 @@ EOT;
<script>
$(function()
{
$('#allchecker, #reversechecker').click(function()
if($('body').data('bindSelectBtn')) return;
$('body').data('bindSelectBtn', true);
$(document).on('click', '.check-all, .check-inverse', function()
{
var e = $(this);
if(e.closest('.datatable').length) return;
@@ -390,8 +392,8 @@ $(function()
</script>
EOT;
global $lang;
$string .= "<a id='allchecker' class='btn btn-select-all check-all' data-scope='$scope' href='javascript:;' >{$lang->selectAll}</a>";
$string .= "<a id='reversechecker' class='btn btn-select-reverse check-inverse' data-scope='$scope' href='javascript:;'>{$lang->selectReverse}</a>";
$string .= "<a class='btn btn-select-all check-all' data-scope='$scope' href='javascript:;' >{$lang->selectAll}</a>";
$string .= "<a class='btn btn-select-reverse check-inverse' data-scope='$scope' href='javascript:;'>{$lang->selectReverse}</a>";
return $string;
}

View File

@@ -120,7 +120,7 @@
if(count($planStories) and $canBatchUnlink)
{
echo "<div class='btn-group'>" . html::selectButton() . '</div>';
echo html::submitButton("<i class='icon-remove-sign'></i> " . $lang->productplan->batchUnlink);
echo html::submitButton($lang->productplan->batchUnlink);
}
?>
<div class='text'><?php echo $summary;?></div>
@@ -136,7 +136,7 @@
<div class='action'><?php echo html::a(inlink('linkBug',"planID=$plan->id"), '<i class="icon-bug"></i> ' . $lang->productplan->linkBug, '', "class='btn btn-sm'");?></div>
<?php endif;?>
<form method='post' target='hiddenwin' action="<?php echo inLink('batchUnlinkBug');?>">
<table class='table tablesorter table-condensed table-hover table-striped table-borderless' id='bugList'>
<table class='table tablesorter table-condensed table-hover table-striped table-borderless table-fixed' id='bugList'>
<?php $vars = "planID={$plan->id}&type=bug&orderBy=%s"; ?>
<thead>
<tr>
@@ -183,8 +183,8 @@
<?php
if(count($planBugs) and $canBatchUnlink)
{
echo "<div class='btn-group'>" . html::selectButton('linkedBugsForm') . '</div>';
echo html::submitButton("<i class='icon-remove-sign'></i> " . $lang->productplan->batchUnlink);
echo "<div class='btn-group'>" . html::selectButton() . '</div>';
echo html::submitButton($lang->productplan->batchUnlink);
}
?>
<div class='text'><?php echo sprintf($lang->productplan->bugSummary, count($planBugs));?> </div>