* fix for undelete project.
This commit is contained in:
@@ -1027,7 +1027,7 @@ class actionModel extends model
|
||||
if($action->objectType == 'product')
|
||||
{
|
||||
$product = $this->dao->select('id,name,code,acl')->from(TABLE_PRODUCT)->where('id')->eq($action->objectID)->fetch();
|
||||
$count = $this->dao->select('COUNT(*) AS count')->from(TABLE_PRODUCT)->where('deleted')->eq('0')->andWhere("(`name`='{$product->name}' OR `code`='{$product->code}')")->fetch('count');
|
||||
$count = $this->dao->select('COUNT(*) AS count')->from(TABLE_PRODUCT)->where('deleted')->eq('0')->andWhere("(`name`='{$product->name}'" . ($product->code ? " OR `code`='{$product->code}'" : '') . ")")->fetch('count');
|
||||
if($count > 0)
|
||||
{
|
||||
echo js::alert(sprintf($this->lang->action->needEdit, $this->lang->action->objectTypes['product']));
|
||||
@@ -1038,7 +1038,7 @@ class actionModel extends model
|
||||
elseif($action->objectType == 'project')
|
||||
{
|
||||
$project = $this->dao->select('id,name,code,acl')->from(TABLE_PROJECT)->where('id')->eq($action->objectID)->fetch();
|
||||
$count = $this->dao->select('COUNT(*) AS count')->from(TABLE_PROJECT)->where('deleted')->eq('0')->andWhere("(`name`='{$project->name}' OR `code`='{$project->code}')")->fetch('count');
|
||||
$count = $this->dao->select('COUNT(*) AS count')->from(TABLE_PROJECT)->where('deleted')->eq('0')->andWhere("(`name`='{$project->name}'" . ($project->code ? " OR `code`='{$project->code}'" : '') . ")")->fetch('count');
|
||||
if($count > 0)
|
||||
{
|
||||
echo js::alert(sprintf($this->lang->action->needEdit, $this->lang->action->objectTypes['project']));
|
||||
|
||||
+1
-1
@@ -819,7 +819,7 @@ function adjustMenuWidth()
|
||||
delta = (headingWidth + navbarWidth + toolbarWidth) - mainHeaderWidth;
|
||||
delta = Math.ceil(delta / $navbar.children('li').length / 2);
|
||||
|
||||
aTagPadding = $navbar.find('a:first').css('padding-left').replace('px', '');
|
||||
aTagPadding = $navbar.find('a:first').css('padding-left').replace('px', '');
|
||||
dividerMargin = $navbar.find('.divider').css('margin-left').replace('px', '');
|
||||
|
||||
newPadding = aTagPadding - delta;
|
||||
|
||||
Reference in New Issue
Block a user