* remove fixedTheadOfList and fixedTfootAction.

This commit is contained in:
wangyidong
2018-04-28 15:57:16 +08:00
parent 8d15930ecf
commit fddcb3f23c
28 changed files with 175 additions and 289 deletions
+74 -70
View File
@@ -213,77 +213,87 @@ js::set('browseType', $browseType);
<div class="table-footer">
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class="table-actions btn-toolbar">
<?php
$canBatchEdit = common::hasPriv('task', 'batchEdit', !empty($task) ? $task : null);
$canBatchClose = (common::hasPriv('task', 'batchClose', !empty($task) ? $task : null) && strtolower($browseType) != 'closedBy');
$canBatchCancel = common::hasPriv('task', 'batchCancel', !empty($task) ? $task : null);
$canBatchChangeModule = common::hasPriv('task', 'batchChangeModule', !empty($task) ? $task : null);
$canBatchAssignTo = common::hasPriv('task', 'batchAssignTo', !empty($task) ? $task : null);
?>
<div class='btn-group dropup'>
<?php
$canBatchEdit = common::hasPriv('task', 'batchEdit', !empty($task) ? $task : null);
$canBatchClose = (common::hasPriv('task', 'batchClose', !empty($task) ? $task : null) && strtolower($browseType) != 'closedBy');
$canBatchCancel = common::hasPriv('task', 'batchCancel', !empty($task) ? $task : null);
$canBatchChangeModule = common::hasPriv('task', 'batchChangeModule', !empty($task) ? $task : null);
$canBatchAssignTo = common::hasPriv('task', 'batchAssignTo', !empty($task) ? $task : null);
if(count($tasks))
{
$actionLink = $this->createLink('task', 'batchEdit', "projectID=$projectID");
$disabled = $canBatchEdit ? '' : "disabled='disabled'";
$actionLink = $this->createLink('task', 'batchEdit', "projectID=$projectID");
$disabled = $canBatchEdit ? '' : "disabled='disabled'";
echo html::commonButton($lang->edit, "data-form-action='$actionLink' $disabled");
echo "<button type='button' class='btn dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>";
echo "<ul class='dropdown-menu'>";
echo html::commonButton($lang->edit, "data-form-action='$actionLink' $disabled");
echo "<button type='button' class='btn dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>";
echo "<ul class='dropdown-menu'>";
$actionLink = $this->createLink('task', 'batchClose');
$misc = $canBatchClose ? "onclick=\"setFormAction('$actionLink', 'hiddenwin', '#moreAction')\"" : "class='disabled'";
echo "<li>" . html::a('#', $lang->close, '', $misc) . "</li>";
$actionLink = $this->createLink('task', 'batchClose');
$misc = $canBatchClose ? "onclick=\"setFormAction('$actionLink', 'hiddenwin', '#taskList')\"" : "class='disabled'";
echo "<li>" . html::a('#', $lang->close, '', $misc) . "</li>";
$actionLink = $this->createLink('task', 'batchCancel');
$misc = $canBatchCancel ? "onclick=\"setFormAction('$actionLink', 'hiddenwin', '#moreAction')\"" : "class='disabled'";
echo "<li>" . html::a('#', $lang->task->cancel, '', $misc) . "</li>";
if($canBatchChangeModule)
{
$withSearch = count($modules) > 10;
echo "<li class='dropdown-submenu'>";
echo html::a('javascript:;', $lang->task->moduleAB, '', "id='moduleItem'");
echo "<div class='dropdown-menu" . ($withSearch ? ' with-search':'') . "'>";
echo '<ul class="dropdown-list">';
foreach($modules as $moduleId => $module)
{
$actionLink = $this->createLink('task', 'batchChangeModule', "moduleID=$moduleId");
echo "<li class='option' data-key='$moduleID'>" . html::a('#', $module, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin', '#moreAction')\"") . "</li>";
}
echo '</ul>';
if($withSearch) echo "<div class='menu-search'><div class='input-group input-group-sm'><input type='text' class='form-control' placeholder=''><span class='input-group-addon'><i class='icon-search'></i></span></div></div>";
echo '</div></li>';
}
else
{
echo '<li>' . html::a('javascript:;', $lang->task->moduleAB, '', $misc) . '</li>';
}
/* Batch assign. */
if($canBatchAssignTo)
{
$withSearch = count($memberPairs) > 10;
$actionLink = $this->createLink('task', 'batchAssignTo', "projectID=$projectID");
echo html::select('assignedTo', $memberPairs, '', 'class="hidden"');
echo "<li class='dropdown-submenu'>";
echo html::a('javascript::', $lang->task->assignedTo, 'id="assignItem"');
echo "<div class='dropdown-menu" . ($withSearch ? ' with-search':'') . "'>";
echo '<ul class="dropdown-list">';
foreach ($memberPairs as $key => $value)
{
if(empty($key)) continue;
echo "<li class='option' data-key='$key'>" . html::a("javascript:$(\".table-actions #assignedTo\").val(\"$key\");setFormAction(\"$actionLink\", \"hiddenwin\", \"#moreAction\")", $value, '', '') . '</li>';
}
echo "</ul>";
if($withSearch) echo "<div class='menu-search'><div class='input-group input-group-sm'><input type='text' class='form-control' placeholder=''><span class='input-group-addon'><i class='icon-search'></i></span></div></div>";
echo "</div></li>";
}
echo "</ul>";
}
$actionLink = $this->createLink('task', 'batchCancel');
$misc = $canBatchCancel ? "onclick=\"setFormAction('$actionLink', 'hiddenwin', '#taskList')\"" : "class='disabled'";
echo "<li>" . html::a('#', $lang->task->cancel, '', $misc) . "</li>";
echo "</ul>";
?>
</div>
<?php if($canBatchChangeModule):?>
<div class="btn-group dropup">
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->story->moduleAB;?> <span class="caret"></span></button>
<div class="dropdown-menu search-list" data-ride="searchList">
<?php $withSearch = count($modules) > 10;?>
<?php if($withSearch):?>
<div class="input-control search-box search-box-circle has-icon-left has-icon-right search-example">
<input id="userSearchBox" type="search" autocomplete="off" class="form-control search-input">
<label for="userSearchBox" class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>
<a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a>
</div>
<?php endif;?>
<div class="list-group">
<?php
foreach($modules as $moduleId => $module)
{
$actionLink = $this->createLink('task', 'batchChangeModule', "moduleID=$moduleId");
echo html::a('#', $module, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin', '#taskList')\"");
}
?>
</div>
</div>
</div>
<?php $pager->show('right', 'pagerjs');?>
<?php endif;?>
<?php if($canBatchAssignTo):?>
<div class="btn-group dropup">
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->story->assignedTo;?> <span class="caret"></span></button>
<div class="dropdown-menu search-list" data-ride="searchList">
<?php
$withSearch = count($memberPairs) > 10;
$actionLink = $this->createLink('task', 'batchAssignTo', "projectID=$projectID");
echo html::select('assignedTo', $memberPairs, '', 'class="hidden"');
if($withSearch):
?>
<div class="input-control search-box search-box-circle has-icon-left has-icon-right search-example">
<input id="userSearchBox" type="search" autocomplete="off" class="form-control search-input">
<label for="userSearchBox" class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>
<a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a>
</div>
<?php endif;?>
<div class="list-group">
<?php
foreach($memberPairs as $key => $value)
{
if(empty($key)) continue;
echo html::a("javascript:$(\".table-actions #assignedTo\").val(\"$key\");setFormAction(\"$actionLink\", \"hiddenwin\", \"#taskList\")", $value);
}
?>
</div>
</div>
</div>
<?php endif;?>
</div>
<?php $pager->show('right', 'pagerjs');?>
</div>
<?php endif;?>
</form>
@@ -292,22 +302,16 @@ js::set('browseType', $browseType);
<?php js::set('checkedSummary', $lang->project->checkedSummary);?>
<?php js::set('replaceID', 'taskList')?>
<script>
$('#project<?php echo $projectID;?>').addClass('active')
$('#listTab').addClass('active')
$('#<?php echo ($browseType == 'bymodule' and $this->session->taskBrowseType == 'bysearch') ? 'all' : $this->session->taskBrowseType;?>Tab').addClass('active');
<?php if($browseType == 'bysearch'):?>
$shortcut = $('#QUERY<?php echo (int)$param;?>Tab');
if($shortcut.size() > 0)
{
$shortcut.addClass('active');
$('#bysearchTab').removeClass('active');
$shortcut.addClass('btn-active-text');
$('#bysearchTab').removeClass('btn-active-text');
$('#querybox').removeClass('show');
}
<?php endif;?>
statusActive = '<?php echo isset($lang->project->statusSelects[$this->session->taskBrowseType]);?>';
if(statusActive) $('#statusTab').addClass('active')
<?php if(isset($this->config->project->homepage) and $this->config->project->homepage != 'browse'):?>
$('#modulemenu .nav li.right:last').after("<li class='right'><a style='font-size:12px' href='javascript:setHomepage(\"project\", \"browse\")'><i class='icon icon-cog'></i> <?php echo $lang->homepage?></a></li>")
<?php endif;?>
</script>
<?php include '../../common/view/footer.html.php';?>