* Finish task#67260
This commit is contained in:
@@ -78,7 +78,8 @@ $(function()
|
||||
hiddenRequireFields();
|
||||
});
|
||||
|
||||
var maxAutoDropWidth = document.body.scrollWidth + (document.getElementById('resolutions1').offsetWidth / 2) - document.getElementById('resolutions1').getBoundingClientRect().right;
|
||||
var firstResolution = $('select[id^="resolutions"]').eq(0);
|
||||
var maxAutoDropWidth = document.body.scrollWidth + ($(firstResolution)[0].offsetWidth / 2) - $(firstResolution)[0].getBoundingClientRect().right;
|
||||
$('select[id^="duplicateBugs"]').picker(
|
||||
{
|
||||
disableEmptySearch : true,
|
||||
|
||||
@@ -152,7 +152,7 @@ class group extends control
|
||||
$this->view->title = $this->lang->company->common . $this->lang->colon . $group->name . $this->lang->colon . $this->lang->group->manageView;
|
||||
|
||||
$this->view->group = $group;
|
||||
$this->view->programs = $this->loadModel('program')->getPairs(true, 'order_desc');
|
||||
$this->view->programs = $this->loadModel('program')->getParentPairs('', '', false);
|
||||
$this->view->projects = $this->loadModel('project')->getPairsByProgram('', 'all', true, 'order_desc');
|
||||
$this->view->executions = $this->loadModel('execution')->getPairs(0, 'all', 'all');
|
||||
$this->view->products = $this->loadModel('product')->getPairs();
|
||||
|
||||
@@ -243,6 +243,7 @@ class groupModel extends model
|
||||
{
|
||||
$objects = $this->dao->select('id, name, path, type, project, grade, parent')->from(TABLE_PROJECT)
|
||||
->where('vision')->eq($this->config->vision)
|
||||
->andWhere('type')->ne('program')
|
||||
->andWhere('deleted')->eq(0)
|
||||
->fetchAll('id');
|
||||
|
||||
@@ -251,7 +252,8 @@ class groupModel extends model
|
||||
->andWhere('deleted')->eq(0)
|
||||
->fetchAll('id');
|
||||
|
||||
$programs = array();
|
||||
$programs = $this->loadModel('program')->getParentPairs('', '', false);
|
||||
|
||||
$projects = array();
|
||||
$executions = array();
|
||||
$products = array();
|
||||
@@ -261,12 +263,7 @@ class groupModel extends model
|
||||
$path = explode(',', trim($object->path, ','));
|
||||
$topID = $path[0];
|
||||
|
||||
if($type == 'program')
|
||||
{
|
||||
if($topID != $object->id) $object->name = isset($objects[$topID]) ? $objects[$topID]->name . '/' . $object->name : $object->name;
|
||||
$programs[$object->id] = $object->name;
|
||||
}
|
||||
elseif($type == 'project')
|
||||
if($type == 'project')
|
||||
{
|
||||
if($topID != $object->id) $object->name = isset($objects[$topID]) ? $objects[$topID]->name . '/' . $object->name : $object->name;
|
||||
$projects[$object->id] = $object->name;
|
||||
|
||||
@@ -1201,10 +1201,12 @@ class programModel extends model
|
||||
* Get program parent pairs
|
||||
*
|
||||
* @param string $model
|
||||
* @param string $mode
|
||||
* @param bool $showRoot
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getParentPairs($model = '', $mode = 'noclosed')
|
||||
public function getParentPairs($model = '', $mode = 'noclosed', $showRoot = true)
|
||||
{
|
||||
$modules = $this->dao->select('id,name,parent,path,grade')->from(TABLE_PROGRAM)
|
||||
->where('type')->eq('program')
|
||||
@@ -1219,7 +1221,7 @@ class programModel extends model
|
||||
{
|
||||
if(strpos(",{$this->app->user->view->programs},", ",{$module->id},") === false and (!$this->app->user->admin)) continue;
|
||||
|
||||
$moduleName = '/';
|
||||
$moduleName = $showRoot ? '/' : '';
|
||||
$parentModules = explode(',', $module->path);
|
||||
foreach($parentModules as $parentModuleID)
|
||||
{
|
||||
@@ -1240,7 +1242,7 @@ class programModel extends model
|
||||
$topMenu = array_shift($treeMenu);
|
||||
$topMenu = empty($topMenu) ? '' : $topMenu;
|
||||
$topMenu = explode("\n", trim($topMenu));
|
||||
$lastMenu[] = '/';
|
||||
$showRoot ? $lastMenu[] = '/' : $lastMenu = array();
|
||||
foreach($topMenu as $menu)
|
||||
{
|
||||
if(strpos($menu, '|') === false) continue;
|
||||
|
||||
Reference in New Issue
Block a user