* Add project checkbox style.

This commit is contained in:
曹延义
2022-09-28 10:09:32 +08:00
parent d16362e3da
commit ca5110623e
5 changed files with 44 additions and 14 deletions
+8 -7
View File
@@ -249,13 +249,14 @@ $filter->product->dynamic->cookie['preBranch'] = 'reg::word';
$filter->branch->default->cookie['preBranch'] = 'reg::word';
$filter->program->default->cookie['lastPGM'] = 'int';
$filter->program->default->cookie['lastPRJ'] = 'int';
$filter->program->prjbrowse->cookie['programType'] = 'code';
$filter->program->project->cookie['involved'] = 'code';
$filter->program->browse->cookie['showClosed'] = 'code';
$filter->program->export->cookie['checkedItem'] = 'reg::checked';
$filter->program->ajaxgetdropmenu->cookie['showClosed'] = 'code';
$filter->program->default->cookie['lastPGM'] = 'int';
$filter->program->default->cookie['lastPRJ'] = 'int';
$filter->program->prjbrowse->cookie['programType'] = 'code';
$filter->program->project->cookie['involved'] = 'code';
$filter->program->project->cookie['showProjectBatchEdit'] = 'int';
$filter->program->browse->cookie['showClosed'] = 'code';
$filter->program->export->cookie['checkedItem'] = 'reg::checked';
$filter->program->ajaxgetdropmenu->cookie['showClosed'] = 'code';
$filter->project->default->cookie['lastProject'] = 'int';
$filter->project->default->cookie['lastPRJ'] = 'int';
+7 -6
View File
@@ -479,12 +479,13 @@ class program extends control
$this->view->title = $this->lang->program->project;
$this->view->position[] = $this->lang->program->project;
$this->view->projectStats = $projectStats;
$this->view->pager = $pager;
$this->view->programID = $programID;
$this->view->users = $this->loadModel('user')->getPairs('noletter|pofirst|nodeleted');
$this->view->browseType = $browseType;
$this->view->orderBy = $orderBy;
$this->view->projectStats = $projectStats;
$this->view->pager = $pager;
$this->view->programID = $programID;
$this->view->users = $this->loadModel('user')->getPairs('noletter|pofirst|nodeleted');
$this->view->browseType = $browseType;
$this->view->orderBy = $orderBy;
$this->view->showBatchEdit = $this->cookie->showProjectBatchEdit;
$this->display();
}
+21
View File
@@ -0,0 +1,21 @@
$(function()
{
$('input[name^="showEdit"]').click(function()
{
$.cookie('showProjectBatchEdit', $(this).is(':checked') ? 1 : 0, {expires: config.cookieLife, path: config.webRoot});
setCheckbox();
});
setCheckbox();
});
/**
* Set batch edit checkbox.
*
* @access public
* @return void
*/
function setCheckbox()
{
$('#projectsForm .checkbox-primary').hide();
if($.cookie('showProjectBatchEdit') == 1) $('#projectsForm .checkbox-primary').show();
}
+2 -1
View File
@@ -14,6 +14,7 @@
<?php
js::set('programID', $programID);
js::set('browseType', $browseType);
$canBatchEdit = common::hasPriv('project', 'batchEdit');
?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolBar pull-left">
@@ -24,6 +25,7 @@ js::set('browseType', $browseType);
<?php if($browseType == $key) $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";?>
<?php echo html::a(inlink('project', "programID=$programID&browseType=$key"), $label, '', "class='btn btn-link $active'");?>
<?php endforeach;?>
<?php if($canBatchEdit) echo html::checkbox('showEdit', array('1' => $lang->project->edit), $showBatchEdit);?>
<?php echo html::checkbox('involved ', array('1' => $lang->project->mine), '', $this->cookie->involved ? 'checked=checked' : '');?>
</div>
<div class="btn-toolbar pull-right">
@@ -46,7 +48,6 @@ js::set('browseType', $browseType);
$setting = $this->datatable->getSetting('program');
?>
<table class='table has-sort-head'>
<?php $canBatchEdit = common::hasPriv('project', 'batchEdit');?>
<thead>
<tr>
<?php
+6
View File
@@ -24,6 +24,12 @@ $(function()
if(!useDatatable) resetNameWidth();
});
/**
* Set batch edit checkbox.
*
* @access public
* @return void
*/
function setCheckbox()
{
$('#projectForm .checkbox-primary').hide();