* Merge 18.8 common into Merge184.

This commit is contained in:
tanghucheng
2023-11-20 22:04:48 -05:00
parent 08da5e6d35
commit fb60afb5ff
3 changed files with 65 additions and 13 deletions
+17 -3
View File
@@ -3,6 +3,14 @@
<?php $datatableId = $this->moduleName . ucfirst($this->methodName);?>
<?php js::set('currentMethod', $this->app->rawMethod)?>
<?php js::set('currentModule', $this->app->rawModule)?>
<?php
$showSwitchLink = true;
if($currentModule == 'product' && $currentMethod == 'browse') $showSwitchLink = false;
if($currentModule == 'projectstory' && $currentMethod == 'story') $showSwitchLink = false;
if($currentModule == 'project' && $currentMethod == 'bug') $showSwitchLink = false;
if($currentModule == 'execution' && strpos(',all,task,bug,', ",{$currentMethod},") !== false) $showSwitchLink = false;
if($currentModule == 'bug' && $currentMethod == 'browse') $showSwitchLink = false;
?>
<style>
#setShowModule {margin-left: 30px;}
@@ -32,15 +40,21 @@ $(function()
{
$dropmenu.append("<li><a href='<?php echo $this->createLink('datatable', 'ajaxCustom', 'id=' . $this->moduleName . '&method=' . $this->methodName . '&extra=unsetStory')?>' data-toggle='modal' data-type='ajax'><?php echo $lang->datatable->custom?></a></li>");
}
else if((currentModule == 'marketreport' || currentModule == 'marketresearch') && currentMethod == 'browse')
{
$dropmenu.append("<li><a href='<?php echo $this->createLink('datatable', 'ajaxCustom', 'id=' . $this->moduleName . '&method=' . $this->methodName . '&extra=unsetMarket')?>' data-toggle='modal' data-type='ajax'><?php echo $lang->datatable->custom?></a></li>");
}
else
{
$dropmenu.append("<li><a href='<?php echo $this->createLink('datatable', 'ajaxCustom', 'id=' . $this->moduleName . '&method=' . $this->methodName)?>' data-toggle='modal' data-type='ajax'><?php echo $lang->datatable->custom?></a></li>");
}
if(!(currentModule == 'execution' && currentMethod == 'all')) $dropmenu.append("<li><a href='javascript:saveDatatableConfig(\"mode\", \"<?php echo $mode == 'table' ? 'datatable' : 'table';?>\", true);' id='switchToDatatable'><?php echo $mode == 'table' ? $lang->datatable->switchToDatatable : $lang->datatable->switchToTable;?></a></li>");
<?php if($showSwitchLink):?>
$dropmenu.append("<li><a href='javascript:saveDatatableConfig(\"mode\", \"<?php echo $mode == 'table' ? 'datatable' : 'table';?>\", true);' id='switchToDatatable'><?php echo $mode == 'table' ? $lang->datatable->switchToDatatable : $lang->datatable->switchToTable;?></a></li>");
<?php endif;?>
$dropdown.append($dropmenu)
.appendTo($btnToolbar)
.on('shown.zui.dropdown', function(){$btnToolbar.closest('.table-header').css('z-index', 11);})
.on('hidden.zui.dropdown', function(){$btnToolbar.closest('.table-header').css('z-index', 5);});
.on('hidden.zui.dropdown', function(){$btnToolbar.closest('.table-header').css('z-index', 11);});
}
};
$('#main .main-table').on('tableReload', addSettingButton);
@@ -112,7 +126,7 @@ $(function()
<td><?php echo html::radio('showAllModule', $lang->datatable->showAllModuleList, isset($config->execution->task->allModule) ? $config->execution->task->allModule : 0);?></td>
</tr>
<?php endif;?>
<?php if($showBranch):?>
<?php if(isset($showBranch) and $showBranch):?>
<tr>
<td><?php echo $lang->datatable->showBranch;?></td>
<td><?php echo html::radio('showBranch', $lang->datatable->showBranchList, isset($config->$currentModule->$currentMethod->showBranch) ? $config->$currentModule->$currentMethod->showBranch : 1);?></td>