This commit is contained in:
王怡栋
2022-03-08 10:54:08 +08:00
12 changed files with 63 additions and 21 deletions
@@ -1,4 +1,4 @@
<script>
$("a[href^='#affectedBugs']").parent().remove();
$("a[href^='#affectedCases']").parent().remove();
$("#mainContent").find("#verify").closest("tr").addClass("hide");
$("#mainContent").find("#affectedProjects").closest("tr").addClass("hide");
</script>
+7 -7
View File
@@ -782,12 +782,9 @@ class baseControl
*/
$file2Included = $moduleControlFile;
$commonActionExtFile = $actionExtPath['custom'] . strtolower($methodName) . '.php';
if(file_exists($commonActionExtFile)) $file2Included = $commonActionExtFile;
if(!empty($actionExtPath['vision']))
if(!empty($actionExtPath['common']))
{
$commonActionExtFile = $actionExtPath['vision'] . strtolower($methodName) . '.php';
$commonActionExtFile = $actionExtPath['common'] . strtolower($methodName) . '.php';
if(file_exists($commonActionExtFile)) $file2Included = $commonActionExtFile;
}
@@ -797,12 +794,15 @@ class baseControl
if(file_exists($commonActionExtFile)) $file2Included = $commonActionExtFile;
}
if(!empty($actionExtPath['common']))
if(!empty($actionExtPath['vision']))
{
$commonActionExtFile = $actionExtPath['common'] . strtolower($methodName) . '.php';
$commonActionExtFile = $actionExtPath['vision'] . strtolower($methodName) . '.php';
if(file_exists($commonActionExtFile)) $file2Included = $commonActionExtFile;
}
$commonActionExtFile = $actionExtPath['custom'] . strtolower($methodName) . '.php';
if(file_exists($commonActionExtFile)) $file2Included = $commonActionExtFile;
if(!empty($actionExtPath['site']))
{
/**
+1 -2
View File
@@ -383,8 +383,7 @@ class deptModel extends model
->beginIF($browseType == 'inside')->andWhere('type')->eq('inside')->fi()
->beginIF($browseType == 'outside')->andWhere('type')->eq('outside')->fi()
->beginIF($deptID)->andWhere('dept')->in($deptID)->fi()
->beginIF($this->config->vision == 'lite')->andWhere('visions')->eq('lite')->fi()
->beginIF($this->config->vision != 'lite')->andWhere('visions')->ne('lite')->fi()
->beginIF($this->config->vision)->andWhere("CONCAT(',', visions, ',')")->like("%,{$this->config->vision},%")->fi()
->orderBy($orderBy)
->page($pager)
->fetchAll();
+1
View File
@@ -184,6 +184,7 @@ class programplan extends control
public function edit($planID = 0, $projectID = 0)
{
$this->app->loadLang('project');
$this->app->loadLang('execution');
$plan = $this->programplan->getByID($planID);
if($_POST)
{
+1 -1
View File
@@ -55,7 +55,7 @@
<tr>
<th><?php echo $lang->project->acl;?> </th>
<?php $class = $plan->grade == 2 ? "disabled='disabled'" : '';?>
<td colspan='2'><?php echo html::select('acl', $lang->project->aclList, $plan->acl, "class='form-control' $class");?></td>
<td colspan='2'><?php echo html::select('acl', $lang->execution->aclList, $plan->acl, "class='form-control' $class");?></td>
</tr>
<tr>
<th><?php echo $lang->programplan->planDateRange;?> </th>
+2
View File
@@ -18,3 +18,5 @@ th.c-name {min-width: 240px;}
th.c-name {width: auto;}
}
[lang^='en'] .project-name > .label-warning {width: 55px !important;}
.table-responsive {overflow: auto !important;}
+13
View File
@@ -13,8 +13,21 @@ $(function()
$.cookie('projectType', projectType, {expires:config.cookieLife, path:config.webRoot});
window.location.reload();
});
if(!useDatatable) resetNameWidth();
});
function resetNameWidth()
{
$name = $('#projectForm thead th.c-name');
if($name.width() < 350) $name.width(350);
}
$('#mainContent .sidebar-toggle').click(function()
{
if(!useDatatable) setTimeout("resetNameWidth()", 100);
})
/**
* Change program.
*
+1
View File
@@ -21,6 +21,7 @@ js::set('orderBy', $orderBy);
js::set('recTotal', $recTotal);
js::set('recPerPage', $recPerPage);
js::set('pageID', $pageID);
js::set('useDatatable', false);
?>
<?php
if($projectType == 'bycard')
@@ -138,3 +138,4 @@
<?php endif;?>
</div>
</div>
<?php js::set('useDatatable', isset($useDatatable) ? $useDatatable : false);?>
+1
View File
@@ -391,6 +391,7 @@ class reportModel extends model
$workload[$user]['total']['manhour'] = isset($workload[$user]['total']['manhour']) ? $workload[$user]['total']['manhour'] + $task->left : $task->left;
}
if(empty($project)) continue;
$workload[$user]['task']['project'] = $project;
}
}
+32 -8
View File
@@ -67,7 +67,8 @@ class upgradeModel extends model
}
/* If the 'current openVersion' is not equal the 'from openVersion', must update structure. */
$updateStructure = $openVersion != $this->config->upgrade->{$this->config->edition . 'Version'}[$this->config->version];
$currentVersion = str_replace('.', '_', $this->config->version);
$updateStructure = $openVersion != $this->config->upgrade->{$this->config->edition . 'Version'}[$currentVersion];
/* Execute. */
foreach($versions as $openVersion => $chargedVersions)
@@ -106,7 +107,7 @@ class upgradeModel extends model
}
/* Means open source upgrade to biz or max. */
if($fromEdtion == 'open' and $this->config->edition != 'open')
if($fromEdition == 'open' and $this->config->edition != 'open')
{
$this->loadModel('effort')->convertEstToEffort();
$this->importBuildinModules();
@@ -5839,6 +5840,27 @@ class upgradeModel extends model
return $pluginFiles;
}
/**
* Get custom modules.
*
* @param array $allModules
* @access public
* @return array
*/
public function getCustomModules($allModules)
{
$customModules = array();
$systemFiles = file_get_contents('systemfiles.txt');
$systemFiles = str_replace('/', DS, $systemFiles);
foreach($allModules as $modulePath)
{
$customFiles = array();
$module = basename($modulePath);
if(!in_array($module, $this->config->upgrade->openModules) and !preg_match("#$module(/[a-z]*)*(/[a-z]+.[a-z]+)+#", $systemFiles)) $customModules[$module] = $module;
}
return $customModules;
}
/**
* Move extension files.
*
@@ -5883,12 +5905,14 @@ class upgradeModel extends model
*/
public function removeEncryptedDir()
{
$allModules = glob($this->app->moduleRoot . '*');
$skipModules = $this->getEncryptedModules($allModules);
$zfile = $this->app->loadClass('zfile');
$response = array('result' => 'success');
$command = array();
foreach($skipModules as $module)
$allModules = glob($this->app->moduleRoot . '*');
$skipModules = $this->getEncryptedModules($allModules);
$customModules = $this->getCustomModules($allModules);
$modules = $skipModules + $customModules;
$zfile = $this->app->loadClass('zfile');
$response = array('result' => 'success');
$command = array();
foreach($modules as $module)
{
if(in_array($module, $this->config->upgrade->openModules)) continue;
+1 -1
View File
@@ -38,7 +38,7 @@ if(!isset($config->installed) or !$config->installed) die(header('location: inst
/* Check for need upgrade. */
$config->installedVersion = $app->getInstalledVersion();
if(((is_numeric($config->version[0]) and is_numeric($config->installedVersion[0])) or $config->version[0] == $config->installedVersion[0]) and version_compare($config->version, $config->installedVersion, '>')) die(header('location: upgrade.php'));
if($config->version != $config->installedVersion) die(header('location: upgrade.php'));
/* Run the app. */
$common = $app->loadCommon();