Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -11,5 +11,13 @@ $(function()
|
||||
{
|
||||
$("input[name='" + name + "'][type=hidden]").val('0').attr('disabled', false);
|
||||
}
|
||||
})
|
||||
});
|
||||
$('input[name=allChecker]').change(function()
|
||||
{
|
||||
$(this).closest('tr').find("input[name^='module']").prop('checked', $(this).prop('checked')).change();
|
||||
});
|
||||
$('#allChecker').change(function()
|
||||
{
|
||||
$('input[name=allChecker]').prop('checked', $(this).prop('checked')).change();
|
||||
});
|
||||
})
|
||||
|
||||
@@ -20,12 +20,8 @@
|
||||
<table class='table table-condensed table-bordered active-disabled table-fixed'>
|
||||
<thead class='text-center'>
|
||||
<tr>
|
||||
<th rowspan='2' class='w-120px'><?php echo $lang->admin->setModule->module;?></th>
|
||||
<th colspan='2'><?php echo $lang->admin->setModule->optional;?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->admin->setModule->opened;?></th>
|
||||
<th><?php echo $lang->admin->setModule->closed;?></th>
|
||||
<th class='w-200px'><?php echo $lang->admin->setModule->module;?></th>
|
||||
<th><?php echo $lang->admin->setModule->optional;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -41,26 +37,20 @@
|
||||
|
||||
<?php if($hasData):?>
|
||||
<tr>
|
||||
<td class='text-right'><?php echo $lang->admin->setModule->{$group};?></td>
|
||||
<td class='text-middle text-right thWidth'>
|
||||
<div class="checkbox-primary checkbox-inline checkbox-right check-all">
|
||||
<input type='checkbox' id='allChecker<?php echo $group;?>' name='allChecker'>
|
||||
<label class='text-right' for='allChecker<?php echo $group;?>'><?php echo $lang->admin->setModule->{$group};?></label>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<?php foreach($features as $feature):?>
|
||||
<?php $code = $group. ucfirst($feature);?>
|
||||
<?php if(strpos(",$disabledFeatures,", ",$code,") !== false) continue;?>
|
||||
<?php if(strpos(",$closedFeatures,", ",$code,") !== false) continue;?>
|
||||
<?php $value = strpos(",$closedFeatures,", ",$code,") === false ? '1' : '0';?>
|
||||
<div class='group-item'>
|
||||
<?php echo html::checkbox("module[{$code}]", array('1' => $lang->admin->setModule->{$feature}), '1', "data-code='{$code}'", 'inline');?>
|
||||
<?php echo html::hidden("module[{$code}][]", '1', 'disabled');?>
|
||||
</div>
|
||||
<?php endForeach;?>
|
||||
</td>
|
||||
<td>
|
||||
<?php foreach($features as $feature):?>
|
||||
<?php $code = $group . ucfirst($feature);?>
|
||||
<?php if(strpos(",$disabledFeatures,", ",$code,") !== false) continue;?>
|
||||
<?php if(strpos(",$closedFeatures,", ",$code,") === false) continue;?>
|
||||
<div class='group-item'>
|
||||
<?php echo html::checkbox("module[{$code}]", array('1' => $lang->admin->setModule->{$feature}), '0', "data-code='{$code}'", 'inline');?>
|
||||
<?php echo html::hidden("module[{$code}][]", '0');?>
|
||||
<?php echo html::checkbox("module[{$code}]", array('1' => $lang->admin->setModule->{$feature}), $value, "data-code='{$code}'", 'inline');?>
|
||||
<?php echo html::hidden("module[{$code}][]", $value, $value ? 'disabled' : '');?>
|
||||
</div>
|
||||
<?php endForeach;?>
|
||||
</td>
|
||||
@@ -68,7 +58,13 @@
|
||||
<?php endif;?>
|
||||
<?php endForeach;?>
|
||||
<tr>
|
||||
<td colspan='3' class='text-center'><?php echo html::submitButton();?></td>
|
||||
<td class='text-middle text-right thWidth'>
|
||||
<div class="checkbox-primary checkbox-inline checkbox-right check-all">
|
||||
<input type='checkbox' id='allChecker'>
|
||||
<label class='text-right' for='allChecker'><?php echo $lang->selectAll;?></label>
|
||||
</div>
|
||||
</td>
|
||||
<td><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -2126,7 +2126,7 @@ class bugModel extends model
|
||||
*/
|
||||
public function getLinkedExecutionByIdList($buildIdList)
|
||||
{
|
||||
$builds = $this->dao->select('id,execution')->from(TABLE_BUILD)->where('id')->in($buildIdList)->fetchAll('id');
|
||||
$builds = $this->dao->select('id,execution,builds')->from(TABLE_BUILD)->where('id')->in($buildIdList)->fetchAll('id');
|
||||
|
||||
$executionIdList = array();
|
||||
$linkedBuildIdList = array();
|
||||
|
||||
@@ -115,10 +115,12 @@ function renderSpanItem(item, $item)
|
||||
*/
|
||||
function renderProductItem(item, $item)
|
||||
{
|
||||
var $title = $item.find('.title');
|
||||
var $title = $item.find('.title');
|
||||
var isShadow = (typeof(item.shadow) != 'undefined' && item.shadow == '1') ? true : false;
|
||||
|
||||
if(!$title.length)
|
||||
{
|
||||
if(window.userPrivs.product)
|
||||
if(window.userPrivs.product && !isShadow)
|
||||
{
|
||||
$title = $('<a class="title" />')
|
||||
.attr('href', $.createLink('product', 'browse', 'productID=' + item._id));
|
||||
|
||||
@@ -32,7 +32,7 @@ class product extends control
|
||||
$this->loadModel('user');
|
||||
|
||||
/* Get all products, if no, goto the create page. */
|
||||
$this->products = $this->product->getPairs('nocode');
|
||||
$this->products = $this->product->getPairs('nocode', 0, '', 'all');
|
||||
$isAPI = ($this->app->viewType == 'json' or (defined('RUN_MODE') and RUN_MODE == 'api'));
|
||||
if(empty($this->products) and strpos($this->config->product->skipRedirectMethod, ",$this->methodName,") === false and $this->app->getViewType() != 'mhtml' and !$isAPI) $this->locate($this->createLink('product', 'create'));
|
||||
$this->view->products = $this->products;
|
||||
|
||||
@@ -53,7 +53,7 @@ function processKanbanData(key, programsData)
|
||||
|
||||
/* unclosed products */
|
||||
var productID = product.id;
|
||||
var productItem = {id: 'product-' + productID, _id: productID, name: product.name};
|
||||
var productItem = {id: 'product-' + productID, _id: productID, name: product.name, shadow: product.shadow};
|
||||
items.unclosedProduct = [productItem];
|
||||
|
||||
/* plans */
|
||||
|
||||
@@ -274,7 +274,7 @@ class programModel extends model
|
||||
$involvedPrograms = $this->getInvolvedPrograms($this->app->user->account);
|
||||
|
||||
/* Get all products under programs. */
|
||||
$productGroup = $this->dao->select('id, program, name')->from(TABLE_PRODUCT)
|
||||
$productGroup = $this->dao->select('id, program, name, shadow')->from(TABLE_PRODUCT)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('program')->in(array_keys($programs))
|
||||
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->products)->fi()
|
||||
@@ -285,7 +285,12 @@ class programModel extends model
|
||||
$productPairs = array();
|
||||
foreach($productGroup as $programID => $products)
|
||||
{
|
||||
foreach($products as $product) $productPairs[$product->id] = $product->id;
|
||||
foreach($products as $product)
|
||||
{
|
||||
$productPairs[$product->id] = $product->id;
|
||||
|
||||
if($product->shadow) $product->name = $product->name . ' (' . $this->lang->project->common . ')';
|
||||
}
|
||||
}
|
||||
|
||||
/* Get all plans under products. */
|
||||
|
||||
@@ -88,10 +88,7 @@
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th id='projectType'><?php echo $lang->project->type;?></th>
|
||||
<td>
|
||||
<?php echo zget($lang->project->projectTypeList, $project->hasProduct);?>
|
||||
<?php echo html::hidden('hasProduct', $project->hasProduct);?>
|
||||
</td>
|
||||
<td colspan='3'><?php echo nl2br(html::radio('hasProduct', $lang->project->projectTypeList, $project->hasProduct, 'disabled'));?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->PM;?></th>
|
||||
|
||||
Reference in New Issue
Block a user