* Add project checkbox style.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user