This commit is contained in:
liugang
2017-10-24 18:02:30 +08:00
408 changed files with 2160 additions and 1944 deletions
+4
View File
@@ -13,3 +13,7 @@ tmp/cache/*
tmp/extension/*
.gitkeep
.bak
.idea
.gitignore
.DS_Store
framework/
+2
View File
@@ -129,3 +129,5 @@ $config->objectTables['custom'] = TABLE_LANG;
$config->objectTables['branch'] = TABLE_BRANCH;
$config->objectTables['module'] = TABLE_MODULE;
$config->objectTables['caselib'] = TABLE_TESTSUITE;
$config->objectTables['entry'] = TABLE_ENTRY;
$config->objectTables['webhook'] = TABLE_WEBHOOK;
+29
View File
@@ -58,3 +58,32 @@ CREATE TABLE IF NOT EXISTS `zt_log` (
KEY `objectType` (`objectType`),
KEY `obejctID` (`objectID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
ALTER TABLE `zt_task` ADD `parent` INT(11) NULL DEFAULT '0' AFTER `deleted`;
ALTER TABLE `zt_team` ADD `task` INT(11) NULL DEFAULT '0' AFTER `project`;
ALTER TABLE `zt_team` ADD `estimate` DECIMAL(12,2) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `zt_team` ADD `consumed` DECIMAL(12,2) UNSIGNED NOT NULL DEFAULT '0' AFTER `estimate`;
ALTER TABLE `zt_team` ADD `left` DECIMAL(12,2) UNSIGNED NOT NULL DEFAULT '0' AFTER `consumed`;
ALTER TABLE `zt_team` ADD `order` TINYINT(3) NOT NULL DEFAULT '0' AFTER `left`;
ALTER TABLE `zt_team` CHANGE `days` `days` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `zt_team` DROP PRIMARY KEY;
ALTER TABLE `zt_team` ADD PRIMARY KEY (`project`, `task`, `account`);
ALTER TABLE `zt_user` ADD `score` DECIMAL(12,1) NOT NULL DEFAULT '0' AFTER `deleted`;
ALTER TABLE `zt_user` ADD `score_level` DECIMAL(12,1) NOT NULL DEFAULT '0' AFTER `score`;
CREATE TABLE `zt_score` (
`id` bigint(12) unsigned NOT NULL AUTO_INCREMENT,
`userID` int(11) NOT NULL DEFAULT '0',
`account` varchar(30) NOT NULL,
`model` varchar(30) NOT NULL,
`method` varchar(30) NOT NULL,
`score` decimal(12,1) NOT NULL DEFAULT '0.0',
`type` enum('repeat','one') NOT NULL DEFAULT 'repeat',
`time` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `account` (`account`),
KEY `model` (`model`),
KEY `method` (`method`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+1 -1
View File
@@ -140,4 +140,4 @@ function formatTime($time, $format = '')
if(trim($time) == '') return ;
if($format) return date($format, strtotime($time));
return trim($time);
}
}
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
+2 -2
View File
@@ -165,7 +165,7 @@ $config->bug->search['params']['lastEditedDate']= array('operator' => '=',
$config->bug->search['params']['deadline'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
$config->bug->datatable = new stdclass();
$config->bug->datatable->defaultField = array('id', 'severity', 'pri', 'title', 'status', 'openedBy', 'openedDate', 'assignedTo', 'resolvedBy', 'resolution', 'resolvedDate', 'actions');
$config->bug->datatable->defaultField = array('id', 'severity', 'pri', 'title', 'status', 'openedBy', 'openedDate', 'assignedTo', 'resolvedBy', 'resolution', 'actions');
$config->bug->datatable->fieldList['id']['title'] = 'idAB';
$config->bug->datatable->fieldList['id']['fixed'] = 'left';
@@ -174,7 +174,7 @@ $config->bug->datatable->fieldList['id']['required'] = 'yes';
$config->bug->datatable->fieldList['severity']['title'] = 'severityAB';
$config->bug->datatable->fieldList['severity']['fixed'] = 'left';
$config->bug->datatable->fieldList['severity']['width'] = '50';
$config->bug->datatable->fieldList['severity']['width'] = '40';
$config->bug->datatable->fieldList['severity']['required'] = 'no';
$config->bug->datatable->fieldList['pri']['title'] = 'P';
+9 -6
View File
@@ -2310,8 +2310,9 @@ class bugModel extends model
* @access public
* @return void
*/
public function printCell($col, $bug, $users, $builds, $branches, $modulePairs, $projects = array(), $plans = array(), $stories = array(), $tasks = array())
public function printCell($col, $bug, $users, $builds, $branches, $modulePairs, $projects = array(), $plans = array(), $stories = array(), $tasks = array(), $mode = 'datatable')
{
$canView = common::hasPriv('bug', 'view');
$bugLink = inlink('view', "bugID=$bug->id");
$account = $this->app->user->account;
$id = $col->id;
@@ -2319,15 +2320,17 @@ class bugModel extends model
{
$class = '';
if($id == 'status') $class .= ' bug-' . $bug->status;
if($id == 'title') $class .= ' text-left';
if($id == 'title') $class .= ' text-left';
if($id == 'id') $class .= ' cell-id';
if($id == 'assignedTo' && $bug->assignedTo == $account) $class .= ' red';
if($id == 'deadline' && isset($bug->delay)) $class .= ' delayed';
echo "<td class='" . $class . "'" . ($id=='title' ? " title='{$bug->title}'" : '') . ">";
switch ($id)
switch($id)
{
case 'id':
echo html::a($bugLink, sprintf('%03d', $bug->id));
if($mode == 'table') echo "<input type='checkbox' name='bugIDList[{$bug->id}]' value='{$bug->id}'/> ";
echo $canView ? html::a($bugLink, sprintf('%03d', $bug->id)) : sprintf('%03d', $bug->id);
break;
case 'severity':
echo "<span class='severity" . zget($this->lang->bug->severityList, $bug->severity, $bug->severity) . "'>";
@@ -2344,7 +2347,7 @@ class bugModel extends model
echo "<span class='$class'>[{$this->lang->bug->confirmedList[$bug->confirmed]}]</span> ";
if($bug->branch)echo "<span class='label label-info label-badge'>{$branches[$bug->branch]}</span> ";
if($modulePairs and $bug->module)echo "<span class='label label-info label-badge'>{$modulePairs[$bug->module]}</span> ";
echo html::a($bugLink, $bug->title, null, "style='color: $bug->color'");
echo $canView ? html::a($bugLink, $bug->title, null, "style='color: $bug->color'") : "<span style='color: $bug->color'>{$bug->title}</span>";
break;
case 'branch':
echo $branches[$bug->branch];
@@ -2401,7 +2404,7 @@ class bugModel extends model
echo substr($bug->openedDate, 5, 11);
break;
case 'openedBuild':
foreach(explode(',', $bug->openedBuild) as $build) echo zget($builds, $build) . '<br />';
foreach(explode(',', $bug->openedBuild) as $build) echo zget($builds, $build) . ' ';
break;
case 'assignedTo':
echo zget($users, $bug->assignedTo, $bug->assignedTo);
+27 -6
View File
@@ -168,16 +168,37 @@ js::set('branch', $branch);
<?php
$datatableId = $this->moduleName . ucfirst($this->methodName);
$useDatatable = (isset($this->config->datatable->$datatableId->mode) and $this->config->datatable->$datatableId->mode == 'datatable');
$file2Include = $useDatatable ? dirname(__FILE__) . '/datatabledata.html.php' : dirname(__FILE__) . '/browsedata.html.php';
$vars = "productID=$productID&branch=$branch&browseType=$browseType&param=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";
include $file2Include;
if($useDatatable) include '../../common/view/datatable.html.php';
$setting = $this->datatable->getSetting('bug');
$widths = $this->datatable->setFixedFieldWidth($setting);
$columns = 0;
?>
<table class='table table-condensed table-hover table-striped tablesorter table-fixed <?php echo $useDatatable ? 'datatable' : ''?>' id='bugList' data-checkable='true' data-fixed-left-width='<?php echo $widths['leftWidth']?>' data-fixed-right-width='<?php echo $widths['rightWidth']?>' data-custom-menu='true' data-checkbox-name='bugIDList[]'>
<thead>
<tr>
<?php
foreach($setting as $key => $value)
{
if($value->show)
{
$this->datatable->printHead($value, $orderBy, $vars);
$columns ++;
}
}
?>
</tr>
</thead>
<tbody>
<?php foreach($bugs as $bug):?>
<tr class='text-center' data-id='<?php echo $bug->id?>'>
<?php foreach ($setting as $key => $value) $this->bug->printCell($value, $bug, $users, $builds, $branches, $modulePairs, $projects, $plans, $stories, $tasks, $useDatatable ? 'datatable' : 'table');?>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<?php
$columns = $this->cookie->windowWidth >= $this->config->wideSize ? 13 : 11;
if($browseType == 'needconfirm') $columns = 8;
?>
<td colspan='<?php echo $columns;?>'>
<?php if(!empty($bugs)):?>
<div class='table-actions clearfix'>
-114
View File
@@ -1,114 +0,0 @@
<?php
/**
* The browse data view file of bug module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Yidong Wang <yidong@cnezsoft.com>
* @package bug
* @version $Id$
* @link http://www.zentao.net
*/
?>
<table class='table table-condensed table-hover table-striped tablesorter table-fixed table-selectable' id='bugList'>
<thead>
<tr>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th class='w-severity'> <?php common::printOrderLink('severity', $orderBy, $vars, $lang->bug->severityAB);?></th>
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
<th class='w-100px'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->bug->statusAB);?></th>
<th class='w-80px'> <?php common::printOrderLink('deadline', $orderBy, $vars, $lang->bug->deadline);?></th>
<?php if($browseType == 'needconfirm'):?>
<th class='w-200px'><?php common::printOrderLink('story', $orderBy, $vars, $lang->bug->story);?></th>
<th class='w-50px'><?php echo $lang->actions;?></th>
<?php else:?>
<th class='w-user'><?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
<th class='w-date'><?php common::printOrderLink('openedDate', $orderBy, $vars, $lang->bug->openedDateAB);?></th>
<?php endif;?>
<th class='w-user'><?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->assignedToAB);?></th>
<th class='w-user'><?php common::printOrderLink('resolvedBy', $orderBy, $vars, $lang->bug->resolvedByAB);?></th>
<th class='w-resolution'><?php common::printOrderLink('resolution', $orderBy, $vars, $lang->bug->resolutionAB);?></th>
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
<th class='w-date'><?php common::printOrderLink('resolvedDate', $orderBy, $vars, $lang->bug->resolvedDateAB);?></th>
<?php endif;?>
<th class='w-140px {sorter:false}'><?php echo $lang->actions;?></th>
<?php endif;?>
</tr>
</thead>
<?php if($bugs):?>
<tbody>
<?php foreach($bugs as $bug):?>
<?php $bugLink = inlink('view', "bugID=$bug->id");?>
<tr class='text-center'>
<td class='cell-id bug-<?php echo $bug->status;?> strong text-left'>
<input type='checkbox' name='bugIDList[<?php echo $bug->id ?>]' value='<?php echo $bug->id;?>'/>
<?php echo html::a($bugLink, sprintf('%03d', $bug->id));?>
</td>
<td><span class='<?php echo 'severity' . zget($lang->bug->severityList, $bug->severity, $bug->severity);?>'><?php echo zget($lang->bug->severityList, $bug->severity, $bug->severity);?></span></td>
<td><span class='<?php echo 'pri' . zget($lang->bug->priList, $bug->pri, $bug->pri);?>'><?php echo zget($lang->bug->priList, $bug->pri, $bug->pri);?></span></td>
<?php $class = 'confirm' . $bug->confirmed;?>
<td class='text-left' title="<?php echo $bug->title?>">
<?php
echo "<span class='$class'>[{$lang->bug->confirmedList[$bug->confirmed]}]</span> ";
if($bug->branch)echo "<span title='{$lang->product->branchName[$product->type]}' class='label label-branch label-badge'>{$branches[$bug->branch]}</span> ";
if($modulePairs and $bug->module)echo "<span title='{$lang->bug->module}' class='label label-info label-badge'>{$modulePairs[$bug->module]}</span> ";
echo html::a($bugLink, $bug->title, null, "style='color: $bug->color'");
?>
</td>
<td class='bug-<?php echo $bug->status?>'>
<?php
if($bug->needconfirm)
{
echo "(<span class='warning'>{$lang->story->changed}</span> ";
echo html::a($this->createLink('bug', 'confirmStoryChange', "bugID=$bug->id"), $lang->confirm, 'hiddenwin');
echo ")";
}
else
{
echo $lang->bug->statusList[$bug->status];
}
?>
</td>
<td class="<?php if(isset($bug->delay)) echo 'delayed';?>"><?php if(substr($bug->deadline, 0, 4) > 0) echo substr($bug->deadline, 5, 6)?></td>
<?php if($browseType == 'needconfirm'):?>
<td class='text-left' title="<?php echo $bug->storyTitle?>"><?php echo html::a($this->createLink('story', 'view', "stoyID=$bug->story"), $bug->storyTitle, '_blank');?></td>
<td><?php $lang->bug->confirmStoryChange = $lang->confirm; common::printIcon('bug', 'confirmStoryChange', "bugID=$bug->id", '', 'list', '', 'hiddenwin')?></td>
<?php else:?>
<td><?php echo zget($users, $bug->openedBy, $bug->openedBy);?></td>
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
<td><?php echo substr($bug->openedDate, 5, 11)?></td>
<?php endif;?>
<td <?php if($bug->assignedTo == $this->app->user->account) echo 'class="red"';?>><?php echo zget($users, $bug->assignedTo, $bug->assignedTo);?></td>
<td><?php echo zget($users, $bug->resolvedBy, $bug->resolvedBy)?></td>
<td><?php echo zget($lang->bug->resolutionList, $bug->resolution);?></td>
<?php if($this->cookie->windowWidth >= $this->config->wideSize):?>
<td><?php echo substr($bug->resolvedDate, 5, 11)?></td>
<?php endif;?>
<td class='text-right'>
<?php
$params = "bugID=$bug->id";
common::printIcon('bug', 'confirmBug', $params, $bug, 'list', 'search', '', 'iframe', true);
common::printIcon('bug', 'assignTo', $params, $bug, 'list', '', '', 'iframe', true);
common::printIcon('bug', 'resolve', $params, $bug, 'list', '', '', 'iframe', true);
common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true);
common::printIcon('bug', 'edit', $params, $bug, 'list');
common::printIcon('bug', 'create', "product=$bug->product&branch=$bug->branch&extra=bugID=$bug->id", $bug, 'list', 'copy');
?>
</td>
<?php endif;?>
</tr>
<?php endforeach;?>
</tbody>
<?php endif;?>
-29
View File
@@ -1,29 +0,0 @@
<?php
/**
* The datatable data view file of bug module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Yidong Wang <yidong@cnezsoft.com>
* @package bug
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php
include '../../common/view/datatable.html.php';
$setting = $this->datatable->getSetting('bug');
$widths = $this->datatable->setFixedFieldWidth($setting);
extract($widths);
?>
<table class='table table-condensed table-hover table-striped tablesorter table-fixed datatable' id='bugList' data-checkable='true' data-fixed-left-width='<?php echo $leftWidth?>' data-fixed-right-width='<?php echo $rightWidth?>' data-custom-menu='true' data-checkbox-name='bugIDList[]'>
<thead>
<tr><?php foreach ($setting as $key => $value) $this->datatable->printHead($value, $orderBy, $vars);?></tr>
</thead>
<tbody>
<?php foreach($bugs as $bug):?>
<tr class='text-center' data-id='<?php echo $bug->id?>'>
<?php foreach ($setting as $key => $value) $this->bug->printCell($value, $bug, $users, $builds, $branches, $modulePairs, $projects, $plans, $stories, $tasks);?>
</tr>
<?php endforeach;?>
</tbody>
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
+42 -37
View File
@@ -342,6 +342,7 @@ $lang->admin->menu->cron = array('link' => 'Cron|cron|index', 'subModule' =
$lang->admin->menu->trashes = array('link' => 'Recycle|action|trash', 'subModule' => 'action');
$lang->admin->menu->dev = array('link' => 'Develop|dev|api', 'alias' => 'db', 'subModule' => 'dev,editor');
$lang->admin->menu->entry = array('link' => 'API|entry|browse', 'alias' => 'create,edit', 'subModule' => 'entry,webhook');
$lang->admin->menu->score = array('link' => 'Score|score|browse', 'subModule' => 'score');
$lang->admin->menu->sso = 'RangerTeam|admin|sso';
$lang->convert = new stdclass();
@@ -354,6 +355,7 @@ $lang->editor = new stdclass();
$lang->mail = new stdclass();
$lang->cron = new stdclass();
$lang->dev = new stdclass();
$lang->score = new stdclass();
$lang->entry = new stdclass();
$lang->webhook = new stdclass();
$lang->search = new stdclass();
@@ -368,6 +370,7 @@ $lang->custom->menu = $lang->admin->menu;
$lang->editor->menu = $lang->admin->menu;
$lang->mail->menu = $lang->admin->menu;
$lang->dev->menu = $lang->admin->menu;
$lang->score->menu = $lang->admin->menu;
$lang->webhook->menu = $lang->admin->menu;
/* 菜单分组。*/
@@ -399,6 +402,7 @@ $lang->menugroup->custom = 'admin';
$lang->menugroup->editor = 'admin';
$lang->menugroup->mail = 'admin';
$lang->menugroup->dev = 'admin';
$lang->menugroup->score = 'admin';
$lang->menugroup->entry = 'admin';
$lang->menugroup->webhook = 'admin';
@@ -519,44 +523,45 @@ $lang->icons['trash'] = 'trash';
$lang->icons['extension'] = 'th-large';
$lang->icons['app'] = 'th-large';
$lang->icons['results'] = 'list-alt';
$lang->icons['create'] = 'plus';
$lang->icons['post'] = 'edit';
$lang->icons['batchCreate'] = 'plus-sign';
$lang->icons['batchEdit'] = 'edit-sign';
$lang->icons['batchClose'] = 'off';
$lang->icons['edit'] = 'pencil';
$lang->icons['delete'] = 'remove';
$lang->icons['copy'] = 'copy';
$lang->icons['report'] = 'bar-chart';
$lang->icons['export'] = 'download-alt';
$lang->icons['report-file'] = 'file-powerpoint';
$lang->icons['import'] = 'upload-alt';
$lang->icons['finish'] = 'ok-sign';
$lang->icons['resolve'] = 'ok-sign';
$lang->icons['start'] = 'play';
$lang->icons['restart'] = 'play';
$lang->icons['run'] = 'play';
$lang->icons['runCase'] = 'play';
$lang->icons['batchRun'] = 'play-sign';
$lang->icons['assign'] = 'hand-right';
$lang->icons['assignTo'] = 'hand-right';
$lang->icons['change'] = 'random';
$lang->icons['link'] = 'link';
$lang->icons['close'] = 'off';
$lang->icons['activate'] = 'magic';
$lang->icons['review'] = 'review';
$lang->icons['confirm'] = 'search';
$lang->icons['confirmBug'] = 'search';
$lang->icons['putoff'] = 'calendar';
$lang->icons['suspend'] = 'pause';
$lang->icons['pause'] = 'pause';
$lang->icons['cancel'] = 'ban-circle';
$lang->icons['recordEstimate'] = 'time';
$lang->icons['customFields'] = 'cogs';
$lang->icons['manage'] = 'cog';
$lang->icons['unlock'] = 'unlock-alt';
$lang->icons['results'] = 'list-alt';
$lang->icons['create'] = 'plus';
$lang->icons['post'] = 'edit';
$lang->icons['batchCreate'] = 'plus-sign';
$lang->icons['batchEdit'] = 'edit-sign';
$lang->icons['batchClose'] = 'off';
$lang->icons['edit'] = 'pencil';
$lang->icons['delete'] = 'remove';
$lang->icons['copy'] = 'copy';
$lang->icons['report'] = 'bar-chart';
$lang->icons['export'] = 'download-alt';
$lang->icons['report-file'] = 'file-powerpoint';
$lang->icons['import'] = 'upload-alt';
$lang->icons['finish'] = 'ok-sign';
$lang->icons['resolve'] = 'ok-sign';
$lang->icons['start'] = 'play';
$lang->icons['restart'] = 'play';
$lang->icons['run'] = 'play';
$lang->icons['runCase'] = 'play';
$lang->icons['batchRun'] = 'play-sign';
$lang->icons['assign'] = 'hand-right';
$lang->icons['assignTo'] = 'hand-right';
$lang->icons['change'] = 'random';
$lang->icons['link'] = 'link';
$lang->icons['close'] = 'off';
$lang->icons['activate'] = 'magic';
$lang->icons['review'] = 'review';
$lang->icons['confirm'] = 'search';
$lang->icons['confirmBug'] = 'search';
$lang->icons['putoff'] = 'calendar';
$lang->icons['suspend'] = 'pause';
$lang->icons['pause'] = 'pause';
$lang->icons['cancel'] = 'ban-circle';
$lang->icons['recordEstimate'] = 'time';
$lang->icons['customFields'] = 'cogs';
$lang->icons['manage'] = 'cog';
$lang->icons['unlock'] = 'unlock-alt';
$lang->icons['confirmStoryChange'] = 'search';
$lang->icons['score'] = 'tint';
include (dirname(__FILE__) . '/menuOrder.php');
+42 -37
View File
@@ -342,6 +342,7 @@ $lang->admin->menu->cron = array('link' => '计划任务|cron|index', 'subM
$lang->admin->menu->trashes = array('link' => '回收站|action|trash', 'subModule' => 'action');
$lang->admin->menu->dev = array('link' => '二次开发|dev|api', 'alias' => 'db', 'subModule' => 'dev,editor');
$lang->admin->menu->entry = array('link' => '接口|entry|browse', 'alias' => 'create,edit', 'subModule' => 'entry,webhook');
$lang->admin->menu->score = array('link' => '积分|score|browse', 'subModule' => 'score');
$lang->admin->menu->sso = '然之集成|admin|sso';
$lang->convert = new stdclass();
@@ -357,6 +358,7 @@ $lang->dev = new stdclass();
$lang->entry = new stdclass();
$lang->webhook = new stdclass();
$lang->search = new stdclass();
$lang->score = new stdclass();
$lang->convert->menu = $lang->admin->menu;
$lang->upgrade->menu = $lang->admin->menu;
@@ -368,6 +370,7 @@ $lang->custom->menu = $lang->admin->menu;
$lang->editor->menu = $lang->admin->menu;
$lang->mail->menu = $lang->admin->menu;
$lang->dev->menu = $lang->admin->menu;
$lang->score->menu = $lang->admin->menu;
$lang->entry->menu = $lang->admin->menu;
$lang->webhook->menu = $lang->admin->menu;
@@ -400,6 +403,7 @@ $lang->menugroup->custom = 'admin';
$lang->menugroup->editor = 'admin';
$lang->menugroup->mail = 'admin';
$lang->menugroup->dev = 'admin';
$lang->menugroup->score = 'admin';
$lang->menugroup->entry = 'admin';
$lang->menugroup->webhook = 'admin';
@@ -521,44 +525,45 @@ $lang->icons['trash'] = 'trash';
$lang->icons['extension'] = 'th-large';
$lang->icons['app'] = 'th-large';
$lang->icons['results'] = 'list-alt';
$lang->icons['create'] = 'plus';
$lang->icons['post'] = 'edit';
$lang->icons['batchCreate'] = 'plus-sign';
$lang->icons['batchEdit'] = 'edit-sign';
$lang->icons['batchClose'] = 'off';
$lang->icons['edit'] = 'pencil';
$lang->icons['delete'] = 'remove';
$lang->icons['copy'] = 'copy';
$lang->icons['report'] = 'bar-chart';
$lang->icons['export'] = 'download-alt';
$lang->icons['report-file'] = 'file-powerpoint';
$lang->icons['import'] = 'upload-alt';
$lang->icons['finish'] = 'ok-sign';
$lang->icons['resolve'] = 'ok-sign';
$lang->icons['start'] = 'play';
$lang->icons['restart'] = 'play';
$lang->icons['run'] = 'play';
$lang->icons['runCase'] = 'play';
$lang->icons['batchRun'] = 'play-sign';
$lang->icons['assign'] = 'hand-right';
$lang->icons['assignTo'] = 'hand-right';
$lang->icons['change'] = 'random';
$lang->icons['link'] = 'link';
$lang->icons['close'] = 'off';
$lang->icons['activate'] = 'magic';
$lang->icons['review'] = 'review';
$lang->icons['confirm'] = 'search';
$lang->icons['confirmBug'] = 'search';
$lang->icons['putoff'] = 'calendar';
$lang->icons['suspend'] = 'pause';
$lang->icons['pause'] = 'pause';
$lang->icons['cancel'] = 'ban-circle';
$lang->icons['recordEstimate'] = 'time';
$lang->icons['customFields'] = 'cogs';
$lang->icons['manage'] = 'cog';
$lang->icons['unlock'] = 'unlock-alt';
$lang->icons['results'] = 'list-alt';
$lang->icons['create'] = 'plus';
$lang->icons['post'] = 'edit';
$lang->icons['batchCreate'] = 'plus-sign';
$lang->icons['batchEdit'] = 'edit-sign';
$lang->icons['batchClose'] = 'off';
$lang->icons['edit'] = 'pencil';
$lang->icons['delete'] = 'remove';
$lang->icons['copy'] = 'copy';
$lang->icons['report'] = 'bar-chart';
$lang->icons['export'] = 'download-alt';
$lang->icons['report-file'] = 'file-powerpoint';
$lang->icons['import'] = 'upload-alt';
$lang->icons['finish'] = 'ok-sign';
$lang->icons['resolve'] = 'ok-sign';
$lang->icons['start'] = 'play';
$lang->icons['restart'] = 'play';
$lang->icons['run'] = 'play';
$lang->icons['runCase'] = 'play';
$lang->icons['batchRun'] = 'play-sign';
$lang->icons['assign'] = 'hand-right';
$lang->icons['assignTo'] = 'hand-right';
$lang->icons['change'] = 'random';
$lang->icons['link'] = 'link';
$lang->icons['close'] = 'off';
$lang->icons['activate'] = 'magic';
$lang->icons['review'] = 'review';
$lang->icons['confirm'] = 'search';
$lang->icons['confirmBug'] = 'search';
$lang->icons['putoff'] = 'calendar';
$lang->icons['suspend'] = 'pause';
$lang->icons['pause'] = 'pause';
$lang->icons['cancel'] = 'ban-circle';
$lang->icons['recordEstimate'] = 'time';
$lang->icons['customFields'] = 'cogs';
$lang->icons['manage'] = 'cog';
$lang->icons['unlock'] = 'unlock-alt';
$lang->icons['confirmStoryChange'] = 'search';
$lang->icons['score'] = 'tint';
include (dirname(__FILE__) . '/menuOrder.php');
+42 -37
View File
@@ -341,6 +341,7 @@ $lang->admin->menu->safe = array('link' => '安全|admin|safe', 'alias' =>
$lang->admin->menu->cron = array('link' => '計劃任務|cron|index', 'subModule' => 'cron');
$lang->admin->menu->trashes = array('link' => '資源回收筒|action|trash', 'subModule' => 'action');
$lang->admin->menu->dev = array('link' => '二次開發|dev|api', 'alias' => 'db', 'subModule' => 'dev,editor');
$lang->admin->menu->score = array('link' => '積分|score|browse', 'subModule' => 'score');
$lang->admin->menu->sso = '然之整合|admin|sso';
$lang->convert = new stdclass();
@@ -354,6 +355,7 @@ $lang->mail = new stdclass();
$lang->cron = new stdclass();
$lang->dev = new stdclass();
$lang->search = new stdclass();
$lang->score = new stdclass();
$lang->convert->menu = $lang->admin->menu;
$lang->upgrade->menu = $lang->admin->menu;
@@ -365,6 +367,7 @@ $lang->custom->menu = $lang->admin->menu;
$lang->editor->menu = $lang->admin->menu;
$lang->mail->menu = $lang->admin->menu;
$lang->dev->menu = $lang->admin->menu;
$lang->scoret->menu = $lang->admin->menu;
/* 菜單分組。*/
$lang->menugroup = new stdclass();
@@ -395,6 +398,7 @@ $lang->menugroup->custom = 'admin';
$lang->menugroup->editor = 'admin';
$lang->menugroup->mail = 'admin';
$lang->menugroup->dev = 'admin';
$lang->menugroup->score = 'admin';
/* 錯誤提示信息。*/
$lang->error = new stdclass();
@@ -513,44 +517,45 @@ $lang->icons['trash'] = 'trash';
$lang->icons['extension'] = 'th-large';
$lang->icons['app'] = 'th-large';
$lang->icons['results'] = 'list-alt';
$lang->icons['create'] = 'plus';
$lang->icons['post'] = 'edit';
$lang->icons['batchCreate'] = 'plus-sign';
$lang->icons['batchEdit'] = 'edit-sign';
$lang->icons['batchClose'] = 'off';
$lang->icons['edit'] = 'pencil';
$lang->icons['delete'] = 'remove';
$lang->icons['copy'] = 'copy';
$lang->icons['report'] = 'bar-chart';
$lang->icons['export'] = 'download-alt';
$lang->icons['report-file'] = 'file-powerpoint';
$lang->icons['import'] = 'upload-alt';
$lang->icons['finish'] = 'ok-sign';
$lang->icons['resolve'] = 'ok-sign';
$lang->icons['start'] = 'play';
$lang->icons['restart'] = 'play';
$lang->icons['run'] = 'play';
$lang->icons['runCase'] = 'play';
$lang->icons['batchRun'] = 'play-sign';
$lang->icons['assign'] = 'hand-right';
$lang->icons['assignTo'] = 'hand-right';
$lang->icons['change'] = 'random';
$lang->icons['link'] = 'link';
$lang->icons['close'] = 'off';
$lang->icons['activate'] = 'magic';
$lang->icons['review'] = 'review';
$lang->icons['confirm'] = 'search';
$lang->icons['confirmBug'] = 'search';
$lang->icons['putoff'] = 'calendar';
$lang->icons['suspend'] = 'pause';
$lang->icons['pause'] = 'pause';
$lang->icons['cancel'] = 'ban-circle';
$lang->icons['recordEstimate'] = 'time';
$lang->icons['customFields'] = 'cogs';
$lang->icons['manage'] = 'cog';
$lang->icons['unlock'] = 'unlock-alt';
$lang->icons['results'] = 'list-alt';
$lang->icons['create'] = 'plus';
$lang->icons['post'] = 'edit';
$lang->icons['batchCreate'] = 'plus-sign';
$lang->icons['batchEdit'] = 'edit-sign';
$lang->icons['batchClose'] = 'off';
$lang->icons['edit'] = 'pencil';
$lang->icons['delete'] = 'remove';
$lang->icons['copy'] = 'copy';
$lang->icons['report'] = 'bar-chart';
$lang->icons['export'] = 'download-alt';
$lang->icons['report-file'] = 'file-powerpoint';
$lang->icons['import'] = 'upload-alt';
$lang->icons['finish'] = 'ok-sign';
$lang->icons['resolve'] = 'ok-sign';
$lang->icons['start'] = 'play';
$lang->icons['restart'] = 'play';
$lang->icons['run'] = 'play';
$lang->icons['runCase'] = 'play';
$lang->icons['batchRun'] = 'play-sign';
$lang->icons['assign'] = 'hand-right';
$lang->icons['assignTo'] = 'hand-right';
$lang->icons['change'] = 'random';
$lang->icons['link'] = 'link';
$lang->icons['close'] = 'off';
$lang->icons['activate'] = 'magic';
$lang->icons['review'] = 'review';
$lang->icons['confirm'] = 'search';
$lang->icons['confirmBug'] = 'search';
$lang->icons['putoff'] = 'calendar';
$lang->icons['suspend'] = 'pause';
$lang->icons['pause'] = 'pause';
$lang->icons['cancel'] = 'ban-circle';
$lang->icons['recordEstimate'] = 'time';
$lang->icons['customFields'] = 'cogs';
$lang->icons['manage'] = 'cog';
$lang->icons['unlock'] = 'unlock-alt';
$lang->icons['confirmStoryChange'] = 'search';
$lang->icons['score'] = 'tint';
include (dirname(__FILE__) . '/menuOrder.php');
+1 -1
View File
@@ -817,7 +817,7 @@ class commonModel extends model
if(strtolower($key) == 'closeddate' && $value == '') continue;
if($magicQuote) $value = stripslashes($value);
if($value != stripslashes($old->$key))
if(isset($old->$key) and $value != stripslashes($old->$key))
{
$diff = '';
if(substr_count($value, "\n") > 1 or
View File
View File
View File
View File
View File
View File
View File
+2 -2
View File
@@ -31,5 +31,5 @@ $lang->company->product = $lang->productCommon;
$lang->company->project = $lang->projectCommon;
$lang->company->user = 'User';
$lang->company->guestList[0] = 'On';
$lang->company->guestList[1] = 'Off';
$lang->company->guestList[0] = 'Off';
$lang->company->guestList[1] = 'On';
View File
View File
View File
View File
View File
View File
View File
+37
View File
@@ -8,3 +8,40 @@ $config->custom->canAdd['testtask'] = 'priList';
$config->custom->canAdd['todo'] = 'priList,typeList';
$config->custom->canAdd['user'] = 'roleList';
$config->custom->canAdd['block'] = '';
$config->custom->requiredModules[10] = 'todo';
$config->custom->requiredModules[15] = 'product';
$config->custom->requiredModules[20] = 'story';
$config->custom->requiredModules[25] = 'productplan';
$config->custom->requiredModules[30] = 'release';
$config->custom->requiredModules[35] = 'project';
$config->custom->requiredModules[40] = 'task';
$config->custom->requiredModules[45] = 'build';
$config->custom->requiredModules[50] = 'bug';
$config->custom->requiredModules[55] = 'testcase';
$config->custom->requiredModules[60] = 'testsuite';
$config->custom->requiredModules[65] = 'testreport';
$config->custom->requiredModules[70] = 'testtask';
$config->custom->requiredModules[75] = 'doc';
$config->custom->requiredModules[80] = 'group';
$config->custom->requiredModules[85] = 'user';
$config->custom->requiredModules[95] = 'entry';
$config->custom->requiredModules[100] = 'webhook';
$config->custom->fieldList['group'] = 'name,desc';
$config->custom->excludeFieldList['product'] = 'order';
$config->custom->excludeFieldList['story'] = 'version,duplicateStory,linkStories,childStories,toBug,fromBug';
$config->custom->excludeFieldList['project'] = 'order';
$config->custom->excludeFieldList['task'] = 'fromBug';
$config->custom->excludeFieldList['bug'] = 'storyVersion,toTask,toStory,hardware,found,confirmed,activatedCount,activatedDate,linkBug,case,caseVersion,result,testtask,repo';
$config->custom->excludeFieldList['testcase'] = 'version,lastRunResult,lastRunDate,lastRunner,linkCase,fromBug';
$config->custom->excludeFieldList['testreport'] = 'objectType';
$config->custom->excludeFieldList['doc'] = 'version';
$config->custom->excludeFieldList['user'] = 'ranzhi,visits,ip,last';
+67 -4
View File
@@ -230,6 +230,51 @@ class custom extends control
$this->display();
}
/**
* Set Required.
*
* @param string $moduleName
* @access public
* @return void
*/
public function required($moduleName = '')
{
if($_POST)
{
$this->custom->saveRequiredFields($moduleName);
die(js::reload('parent.parent'));
}
if(empty($moduleName)) $moduleName = current($this->config->custom->requiredModules);
foreach($this->config->custom->requiredModules as $requiredModule) $this->app->loadLang($requiredModule);
/* Get this module requiredFields. */
$this->loadModel($moduleName);
$requiredFields = $this->custom->getRequiredFields($this->config->$moduleName);
if($moduleName == 'doc')
{
unset($requiredFields['createLib']);
unset($requiredFields['editLib']);
}
$fields = $this->custom->getDBFields($moduleName);
if($moduleName == 'testsuite')
{
$this->app->loadLang('testcase');
$this->view->caseFields = $this->custom->getDBFields('testcase');
}
$this->view->title = $this->lang->custom->required;
$this->view->position[] = $this->lang->custom->required;
$this->view->requiredFields = $requiredFields;
$this->view->moduleName = $moduleName;
$this->view->fields = $fields;
$this->display();
}
/**
* Ajax save custom fields.
*
@@ -310,7 +355,7 @@ class custom extends control
if(is_array($menus))
{
foreach ($menus as $menu)
foreach($menus as $menu)
{
$menu = json_decode($menu);
$this->custom->saveCustomMenu($menu->value, $menu->module, isset($menu->method) ? $menu->method : '');
@@ -374,11 +419,29 @@ class custom extends control
* @access public
* @return void
*/
public function ajaxRestoreMenu($confirm = 'no')
public function ajaxRestoreMenu($setPublic = 0, $confirm = 'no')
{
if($confirm == 'no') die(js::confirm($this->lang->custom->confirmRestore, inlink('ajaxRestoreMenu', "confirm=yes")));
if($confirm == 'no') die(js::confirm($this->lang->custom->confirmRestore, inlink('ajaxRestoreMenu', "setPublic=$setPublic&confirm=yes")));
$this->loadModel('setting')->deleteItems("owner={$this->app->user->account}&module=common&section=customMenu");
$account = $this->app->user->account;
if($setPublic) $account = 'system';
$this->loadModel('setting')->deleteItems("owner={$account}&module=common&section=customMenu");
die(js::reload('parent.parent'));
}
/**
* Reset required.
*
* @param srting $module
* @param string $confirm
* @access public
* @return void
*/
public function resetRequired($module, $confirm = 'no')
{
if($confirm == 'no') die(js::confirm($this->lang->custom->confirmRestore, inlink('resetRequired', "module=$module&confirm=yes")));
$this->loadModel('setting')->deleteItems("owner=system&module={$module}&key=requiredFields");
die(js::reload('parent.parent'));
}
}
+9 -2
View File
@@ -217,9 +217,10 @@ $(function()
});
});
postData = $.map(postData, JSON.stringify);
postData = $.map(postData, JSON.stringify);
setPublic = $('#setPublic1').prop('checked') ? 1 : 0;
$.post(createLink('custom', 'ajaxSetMenu'), {menus: postData}, function(data)
$.post(createLink('custom', 'ajaxSetMenu'), {menus: postData, setPublic: setPublic}, function(data)
{
if(data.result === 'success') window.parent.location.reload()
if(data.message) alert(data.message);
@@ -242,4 +243,10 @@ $(function()
{
window.parent.$.closeModal();
});
$('#resetMenuBtn').click(function()
{
var setPublic = $('#setPublic1').prop('checked') ? 1 : 0;
hiddenwin.location.href = createLink('custom', 'ajaxRestoreMenu', "public=" + setPublic);
});
});
+2
View File
@@ -13,6 +13,8 @@ $lang->custom->owner = 'Owner';
$lang->custom->module = 'Module';
$lang->custom->section = 'Section';
$lang->custom->lang = 'Language';
$lang->custom->setPublic = 'Set Public';
$lang->custom->required = 'Required';
$lang->custom->object['story'] = 'Story';
$lang->custom->object['task'] = 'Task';
+2
View File
@@ -13,6 +13,8 @@ $lang->custom->owner = '所有者';
$lang->custom->module = '模块';
$lang->custom->section = '附加部分';
$lang->custom->lang = '所属语言';
$lang->custom->setPublic = '设为公共';
$lang->custom->required = '必填项';
$lang->custom->object['story'] = '需求';
$lang->custom->object['task'] = '任务';
+98
View File
@@ -359,6 +359,8 @@ class customModel extends model
$account = $this->app->user->account;
$settingKey = '';
$setPublic = $this->post->setPublic;
if($setPublic) $account = 'system';
if(!is_string($menu)) $menu = json_encode($menu);
$flow = $this->config->global->flow;
@@ -373,4 +375,100 @@ class customModel extends model
$this->loadModel('setting')->setItem($settingKey, $menu);
}
/**
* Get required fields by config.
*
* @param object $moduleConfig
* @access public
* @return array
*/
public function getRequiredFields($moduleConfig)
{
$requiredFields = array();
foreach($moduleConfig as $method => $subConfig)
{
if(is_object($subConfig) and isset($subConfig->requiredFields)) $requiredFields[$method] = trim(str_replace(' ', '', $subConfig->requiredFields));
}
return $requiredFields;
}
/**
* Get module fields.
*
* @param string $moduleName
* @param string $method
* @access public
* @return array
*/
public function getDBFields($moduleName, $method = '')
{
$fields = array();
$moduleLang = $this->lang->$moduleName;
$customFields = $this->config->custom->fieldList;
if(isset($customFields[$moduleName]))
{
$fieldList = isset($customFields[$moduleName][$method]) ? $customFields[$moduleName][$method] : $customFields[$moduleName];
foreach(explode(',', $fieldList) as $fieldName)
{
if(isset($moduleLang->$fieldName) and is_string($moduleLang->$fieldName)) $fields[$fieldName] = $moduleLang->$fieldName;
}
}
else
{
$table = zget($this->config->objectTables, $moduleName, '');
if($table)
{
$excludeFieldList = zget($this->config->custom->excludeFieldList, $moduleName, '');
foreach($this->dao->query("DESC $table")->fetchAll() as $field)
{
$fieldName = $field->Field;
if($fieldName == 'id' or $fieldName == 'deleted') continue;
if($fieldName == 'openedBy' or $fieldName == 'createdBy' or $fieldName == 'addedBy') continue;
if($fieldName == 'openedDate' or $fieldName == 'createdDate' or $fieldName == 'addedDate') continue;
if($fieldName == 'lastEditedBy' or $fieldName == 'editedBy') continue;
if($fieldName == 'lastEditedDate' or $fieldName == 'editedDate') continue;
if(isset($excludeFieldList) and strpos(",{$excludeFieldList},", ",$fieldName,") !== false) continue;
if(isset($moduleLang->$fieldName) and is_string($moduleLang->$fieldName)) $fields[$fieldName] = $moduleLang->$fieldName;
}
}
}
return $fields;
}
/**
* Save required fields.
*
* @param int $moduleName
* @access public
* @return void
*/
public function saveRequiredFields($moduleName)
{
if(isset($this->config->system->$moduleName)) unset($this->config->system->$moduleName);
if(isset($this->config->personal->$moduleName)) unset($this->config->personal->$moduleName);
$this->loadModel($moduleName);
$systemFields = $this->getRequiredFields($this->config->$moduleName);
$data = fixer::input('post')->get();
$requiredFields = array();
foreach($data->requiredFields as $method => $fields)
{
$method = strtolower($method);
$systemField = $this->config->$moduleName->$method->requiredFields;
$fields = join(',', $fields);
foreach(explode(',', $systemField) as $field)
{
$field = trim($field);
if(strpos(",$fields,", ",$field,") === false) $fields .= ",$field";
}
$requiredFields[$method]['requiredFields'] = $fields;
}
$this->loadModel('setting')->setItems("system.{$moduleName}", $requiredFields);
}
}
+2 -1
View File
@@ -32,9 +32,10 @@
<?php endif;?>
</div>
<div class='text-left'>
<?php if(common::hasPriv('custom', 'setPublic')) echo html::checkbox('setPublic', array(1 => $lang->custom->setPublic));?>
<button id='saveMenuBtn' type='button' class='btn btn-primary'><?php echo $lang->save ?></button> &nbsp;
<button id='closeModalBtn' type='button' class='btn'><?php echo $lang->close ?></button> &nbsp;
<?php echo html::a(inlink('ajaxRestoreMenu'), $lang->custom->restore, 'hiddenwin', "class='btn'")?>
<button id='resetMenuBtn' type='button' class='btn'><?php echo $lang->custom->restore ?></button> &nbsp;
<span class='text-danger'> &nbsp; <i class="icon icon-info-sign"></i> <?php echo $lang->custom->menuTip ?></span>
</div>
</div>
+7 -18
View File
@@ -10,24 +10,7 @@
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<div id='featurebar'>
<ul class='nav'>
<?php
foreach($lang->custom->object as $object => $name)
{
echo "<li id='{$object}Tab'>";
common::printLink('custom', 'set', "module=$object", $name);
echo '</li>';
}
echo "<li class='active'>";
common::printLink('custom', 'flow', "", $lang->custom->flow);
echo '</li><li>';
common::printLink('custom', 'working', '', $lang->custom->working);
echo '</li>';
?>
</ul>
</div>
<?php include 'header.html.php';?>
<div class='main'>
<form method='post' class='form-condensed' target='hiddenwin'>
<table class='table table-form'>
@@ -49,4 +32,10 @@
</table>
</form>
</div>
<script>
$(function()
{
$('#featurebar #flowTab').addClass('active');
})
</script>
<?php include '../../common/view/footer.html.php';?>
+20
View File
@@ -0,0 +1,20 @@
<?php include '../../common/view/header.html.php';?>
<div id='featurebar'>
<ul class='nav'>
<?php
foreach($lang->custom->object as $object => $name)
{
echo "<li id='{$object}Tab'>";
common::printLink('custom', 'set', "module=$object", $name);
echo '</li>';
}
echo "<li id='flowTab'>";
common::printLink('custom', 'flow', "", $lang->custom->flow);
echo "</li><li id='workingTab'>";
common::printLink('custom', 'working', '', $lang->custom->working);
echo "</li><li id='requiredTab'>";
common::printLink('custom', 'required', '', $lang->custom->required);
echo '</li>';
?>
</ul>
</div>
+69
View File
@@ -0,0 +1,69 @@
<?php
/**
* The required view file of custom module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Yidong Wang <yidong@cnezsoft.com>
* @package custom
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include 'header.html.php';?>
<div class='side'>
<div class='list-group'>
<?php
foreach($config->custom->requiredModules as $requiredModule)
{
echo "<li class='list-group-item' id='{$requiredModule}Tab'>" . html::a(inlink('required', "module=$requiredModule"), $lang->$requiredModule->common) . "</li>";
}
?>
</div>
</div>
<div class='main'>
<form method='post' class='form-condensed' target='hiddenwin'>
<div class='panel panel-sm'>
<div class='panel-heading'>
<strong><?php echo $lang->$moduleName->common?></strong>
</div>
<table class='table table-form mw-800px'>
<?php foreach($requiredFields as $method => $requiredField):?>
<tr>
<th class='w-100px'>
<?php
$fieldList = $fields;
if($moduleName == 'testsuite' and $method == 'createlib') $method = 'createLib';
if($moduleName == 'testsuite' and $method == 'createcase')
{
$fieldList = $caseFields;
$method = 'createCase';
}
echo $lang->$moduleName->$method;
?>
</th>
<td><?php echo html::select("requiredFields[{$method}][]", $fieldList, $requiredField, "class='form-control chosen' multiple");?></td>
<td></td>
</tr>
<?php endforeach;?>
<tr>
<td></td>
<td>
<?php
echo html::submitButton();
if(common::hasPriv('custom', 'resetRequired')) echo html::a(inlink('resetRequired', "module=$moduleName"), $lang->custom->restore, 'hiddenwin', "class='btn'");
?>
</td>
</tr>
</table>
</div>
</form>
</div>
<script>
$(function()
{
$('#featurebar #requiredTab').addClass('active');
$('.side #<?php echo $moduleName?>Tab').addClass('active');
})
</script>
<?php include '../../common/view/footer.html.php';?>
+1 -18
View File
@@ -10,7 +10,7 @@
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include 'header.html.php';?>
<?php
$itemRow = <<<EOT
<tr class='text-center'>
@@ -31,23 +31,6 @@ EOT;
<?php js::set('itemRow', $itemRow)?>
<?php js::set('module', $module)?>
<?php js::set('field', $field)?>
<div id='featurebar'>
<ul class='nav'>
<?php
foreach($lang->custom->object as $object => $name)
{
echo "<li id='{$object}Tab'>";
common::printLink('custom', 'set', "module=$object", $name);
echo '</li>';
}
echo '<li>';
common::printLink('custom', 'flow', "", $lang->custom->flow);
echo '</li><li>';
common::printLink('custom', 'working', '', $lang->custom->working);
echo '</li>';
?>
</ul>
</div>
<div class='side'>
<div class='list-group'>
<?php
+7 -18
View File
@@ -10,24 +10,7 @@
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<div id='featurebar'>
<ul class='nav'>
<?php
foreach($lang->custom->object as $object => $name)
{
echo "<li id='{$object}Tab'>";
common::printLink('custom', 'set', "module=$object", $name);
echo '</li>';
}
echo '<li>';
common::printLink('custom', 'flow', "", $lang->custom->flow);
echo "</li><li class='active'>";
common::printLink('custom', 'working', '', $lang->custom->working);
echo '</li>';
?>
</ul>
</div>
<?php include 'header.html.php';?>
<div class='main'>
<form method='post' class='form-condensed' target='hiddenwin'>
<table class='table table-form'>
@@ -39,4 +22,10 @@
</table>
</form>
</div>
<script>
$(function()
{
$('#featurebar #workingTab').addClass('active');
})
</script>
<?php include '../../common/view/footer.html.php';?>
+6 -5
View File
@@ -62,11 +62,12 @@ class datatable extends control
$this->loadModel('testcase');
$this->app->loadConfig('testtask');
$this->config->testcase->datatable->defaultField = $this->config->testtask->datatable->defaultField;
$this->config->testcase->datatable->fieldList['assignedTo']['title'] = 'assignedTo';
$this->config->testcase->datatable->fieldList['assignedTo']['fixed'] = 'no';
$this->config->testcase->datatable->fieldList['assignedTo']['width'] = '80';
$this->config->testcase->datatable->fieldList['assignedTo']['required'] = 'no';
$this->config->testcase->datatable->fieldList['actions']['width'] = '100';
$this->config->testcase->datatable->fieldList['actions']['width'] = '100';
}
if($module == 'testcase')
{
$this->loadModel('testcase');
unset($this->config->testcase->datatable->fieldList['assignedTo']);
}
$this->view->module = $module;
+7 -1
View File
@@ -72,6 +72,7 @@ class datatableModel extends model
$set->fixed = $fieldList[$id]['fixed'];
$set->title = $fieldList[$id]['title'];
$set->sort = isset($fieldList[$id]['sort']) ? $fieldList[$id]['sort'] : 'yes';
$set->name = isset($fieldList[$id]['name']) ? $fieldList[$id]['name'] : '';
$setting[$key] = $set;
}
}
@@ -123,7 +124,12 @@ class datatableModel extends model
$id = $col->id;
if($col->show)
{
echo "<th data-flex='" . ($col->fixed == 'no' ? 'true': 'false') . "' data-width='{$col->width}' style='width:" . (is_numeric($col->width) ? "{$col->width}px" : $col->width) . "' class='w-$id'>";
$fixed = $col->fixed == 'no' ? 'true': 'false';
$width = is_numeric($col->width) ? "{$col->width}px" : $col->width;
$sorter = (isset($col->sort) and $col->sort == 'no') ? '' : '{sorter:false}';
$title = isset($col->name) ? "title='$col->name'" : '';
echo "<th data-flex='$fixed' data-width='$width' style='width:$width' class='w-$id $sorter' $title>";
if($id == 'actions')
{
echo $this->lang->actions;
+4 -2
View File
@@ -62,7 +62,8 @@
<div class='clearfix col<?php echo ($required ? ' require' : '') . (' fixed-' . $fixed) ?>' data-key='<?php echo $key?>' data-fixed='<?php echo $fixed?>' data-width='<?php echo $col['width']?>'>
<i class='icon-ok'></i> &nbsp;<span class='title'><span class='title-bar'><strong><?php echo $col['title']?></strong><i class='icon-move'></i></span></span> <?php if($required) echo "<span class='text-muted'>({$lang->datatable->required})</span>"?>
<div class='actions pull-right'>
<span><span class='text-muted'><?php echo $lang->datatable->width?></span> <input type='text' class='form-control' value='<?php echo $col['width']?>'><?php echo $autoWidth ? '&nbsp;' : 'px' ?></span>
<?php if(isset($col['name'])) echo html::hidden('name', $col['name'])?>
<span><span class='text-muted'><?php echo $lang->datatable->width?></span> <input type='text' id='width' class='form-control' value='<?php echo $col['width']?>'><?php echo $autoWidth ? '&nbsp;' : 'px' ?></span>
<button type='button' class='btn btn-link show-hide<?php echo $required ? ' disabled' : '' ?>'><span class='label-show'><?php echo $lang->datatable->show?></span><span class='text-muted'>/</span><span class='label-hide'><?php echo $lang->datatable->hide?></span></button>
</div>
</div>
@@ -179,8 +180,9 @@ $(function()
var setting = $('.col').map(function(index)
{
var $col = $(this);
var sets = {id: $col.data('key'), order: index + 1, show: !$col.hasClass('disabled'), width: $col.find('input').val(), fixed: $col.data('fixed')};
var sets = {id: $col.data('key'), order: index + 1, show: !$col.hasClass('disabled'), width: $col.find('input#width').val(), fixed: $col.data('fixed')};
if(sets.width !== 'auto') sets.width += 'px';
if($col.find('#name').size() > 0) sets.name = $col.find('#name').val();
return sets;
}).get();
View File
View File
View File
View File
View File
View File
View File
View File

Some files were not shown because too many files have changed in this diff Show More