Merge branch '15.0.beta3' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3

This commit is contained in:
wangyidong
2021-03-31 08:58:00 +08:00
6 changed files with 52 additions and 32 deletions
+1
View File
@@ -2,6 +2,7 @@ body {padding-left: 96px;}
#menu {position: fixed; left: 0; top: 0; bottom: 0; background-color: #3C495C; width: 96px; z-index: 1015;}
#menuNav {position: absolute; top: 5px; bottom: 80px; width: 100%;}
.menu-hide #menuNav {bottom: 40px;}
#menu .nav > li {float: none; padding: 2px 8px;}
#menu .nav > li > a {color: #fff; line-height: 20px; padding: 8px 6px; border-radius: 2px; white-space: nowrap;}
#menu .nav > li > a > .icon {display: inline-block; font-size: 16px;}
+28 -17
View File
@@ -47,16 +47,16 @@
appsMap['search'] =
{
active: false,
code: "search",
group: "search",
icon: "icon-search",
methodName: "index",
moduleName: "search",
text: searchCommon,
title: "<i class='icon icon-search'></i> " + searchCommon,
url: "/index.php?m=search&f=index",
vars: ""
active: false,
code: 'search',
group: 'search',
icon: 'icon-search',
methodName: 'index',
moduleName: 'search',
text: searchCommon,
title: '<i class="icon icon-search"></i> ' + searchCommon,
url: '/index.php?m=search&f=index',
vars: ''
};
}
@@ -169,7 +169,7 @@
if(appsMap[url])
{
appCode = url;
url = '';
url = '';
}
else
{
@@ -182,7 +182,7 @@
$.cookie('openApp', appCode, {expires: config.cookieLife, path: config.webRoot});
/* Highlight at main menu */
var $menuMainNav = $('#menuMainNav');
var $menuMainNav = $('#menuMainNav,#menuMoreNav');
var $lastActiveNav = $menuMainNav.find('li.active');
if($lastActiveNav.data('app') !== appCode)
{
@@ -223,7 +223,7 @@
/* Update task bar */
var $bars = $('#bars');
var $bar = $('#appBar-' + appCode);
var $bar = $('#appBar-' + appCode);
if(!$bar.length)
{
var $link= $('<a data-pos="bar"></a>')
@@ -413,7 +413,7 @@
getAppCode: getAppCodeFromUrl,
getLastApp: getLastApp,
openedApps: openedApps,
appsMap: appsMap
appsMap: appsMap
};
/**
@@ -458,8 +458,20 @@
$item.removeClass('hidden');
}
});
/* The magic number "111" is the space between dropdown trigger
btn and the bottom of screen */
$list.css('top', moreMenuHeight > 111 ? 111 - moreMenuHeight : '');
$menuNav.toggleClass('show-more-nav', showMoreMenu);
if(showMoreMenu && !$list.data('listened-click'))
{
$list.data('listened-click', true).on('click', function()
{
$list.addClass('hidden');
setTimeout(function(){$list.removeClass('hidden')}, 200);
});
}
}
/* Init after current page load */
@@ -583,7 +595,7 @@ $.extend(
}
else
{
var types = objectType.split('-');
var types = objectType.split('-');
var searchModule = types[0];
var searchMethod = typeof(types[1]) == 'undefined' ? 'view' : types[1];
var searchLink = createLink(searchModule, searchMethod, "id=" + objectValue);
@@ -599,12 +611,11 @@ $.extend(
/* Initialize global search. */
$(function()
{
var reg = /[^0-9]/;
var reg = /[^0-9]/;
var $searchbox = $('#searchbox');
var $typeSelector = $searchbox.find('.input-group-btn');
var $dropmenu = $typeSelector.children('.dropdown-menu');
var $searchQuery = $('#globalSearchInput');
var searchType = $('#searchType').val();
var toggleMenu = function(show)
{
+6 -3
View File
@@ -420,10 +420,13 @@ class product extends control
{
$changes = $this->product->update($productID);
/* Change the projects set of the program. */
if(($_POST['program'] != $product->program) and $singleLinkProjects or $multipleLinkProjects)
if($this->config->systemMode == 'new')
{
$this->product->updateProjects($productID, $singleLinkProjects, $multipleLinkProjects);
/* Change the projects set of the program. */
if(($_POST['program'] != $product->program) and $singleLinkProjects or $multipleLinkProjects)
{
$this->product->updateProjects($productID, $singleLinkProjects, $multipleLinkProjects);
}
}
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
+14 -11
View File
@@ -534,19 +534,22 @@ class productModel extends model
->remove('uid,changeProjects')
->get();
if($product->program != $oldProduct->program)
if($this->config->systemMode == 'new')
{
/* Link the projects stories under this product. */
$unmodifiableProjects = $this->dao->select('t1.*')->from(TABLE_PROJECTSTORY)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
->where('t1.product')->eq($productID)
->andWhere('t2.type')->eq('project')
->andWhere('t2.deleted')->eq('0')
->fetchPairs('project', 'product');
if(!empty($unmodifiableProjects))
if($product->program != $oldProduct->program)
{
dao::$errors[] = $this->lang->product->changeProgramError;
return false;
/* Link the projects stories under this product. */
$unmodifiableProjects = $this->dao->select('t1.*')->from(TABLE_PROJECTSTORY)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
->where('t1.product')->eq($productID)
->andWhere('t2.type')->eq('project')
->andWhere('t2.deleted')->eq('0')
->fetchPairs('project', 'product');
if(!empty($unmodifiableProjects))
{
dao::$errors[] = $this->lang->product->changeProgramError;
return false;
}
}
}
+3
View File
@@ -265,6 +265,9 @@ class upgrade extends control
list($programID, $projectID, $lineID) = $this->upgrade->createProgram($linkedProducts, $linkedSprints);
if(dao::isError()) die(js::error(dao::getError()));
/* Process productline. */
$this->dao->delete()->from(TABLE_MODULE)->where('`root`')->eq(0)->andWhere('`type`')->eq('line')->exec();
/* Process merged products and projects. */
$this->upgrade->processMergedData($programID, $projectID, $lineID, $linkedProducts, $linkedSprints);
}
-1
View File
@@ -4135,7 +4135,6 @@ class upgradeModel extends model
$lineID = $this->dao->lastInsertID();
$path = ",$lineID,";
$this->dao->update(TABLE_MODULE)->set('path')->eq($path)->where('id')->eq($lineID)->exec();
$this->dao->delete()->from(TABLE_MODULE)->where('`root`')->eq(0)->andWhere('`type`')->eq('line')->exec();
if(dao::isError()) return false;
}