diff --git a/module/bug/control.php b/module/bug/control.php
index a889a5bec9..aa59553fc7 100644
--- a/module/bug/control.php
+++ b/module/bug/control.php
@@ -66,7 +66,7 @@ class bug extends control
$this->view->products = $this->products = $products;
$openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa';
- if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=bug&objectID=$objectID")));
+ if(empty($this->products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=bug&objectID=$objectID")));
}
/**
diff --git a/module/doc/control.php b/module/doc/control.php
index 0696dacc5e..58695a06d2 100644
--- a/module/doc/control.php
+++ b/module/doc/control.php
@@ -221,7 +221,12 @@ class doc extends control
$objectType = 'project';
$objectID = $execution->project;
}
+ if($objectType == 'project' and $this->post->project) $objectID = $this->post->project;
+ if($objectType == 'product' and $this->post->product) $objectID = $this->post->product;
+ if($objectType == 'custom' or $objectType == 'book') $objectID = 0;
+
$this->action->create('docLib', $libID, 'Created');
+
die(js::locate($this->createLink('doc', 'objectLibs', "type=$objectType&objectID=$objectID&libID=$libID"), 'parent.parent'));
}
else
@@ -491,8 +496,22 @@ class doc extends control
else
{
$this->app->rawMethod = $objectType;
+
+ /* High light menu. */
+ if($objectType)
+ {
+ $menu = $this->lang->doc->menu->$objectType;
+ $menu['alias'] .= ',edit';
+ $menu['subModule'] = 'doc';
+ $this->lang->doc->menu->$objectType = $menu;
+ }
}
+ $objects = $this->doc->getOrderedObjects($objectType);
+ $libs = $this->doc->getLibsByObject($objectType, $objectID);
+ $this->lang->modulePageNav = $this->doc->select($objectType, $objects, $objectID, $libs, $libID);
+ $this->lang->TRActions = common::hasPriv('doc', 'create') ? $this->doc->buildCreateButton4Doc($objectType, $objectID, $libID) : '';
+
$this->view->title = $lib->name . $this->lang->colon . $this->lang->doc->edit;
$this->view->position[] = html::a($this->createLink('doc', 'browse', "libID=$libID"), $lib->name);
$this->view->position[] = $this->lang->doc->edit;
diff --git a/module/doc/js/createlib.js b/module/doc/js/createlib.js
index 8e756e199d..1af8868b9f 100644
--- a/module/doc/js/createlib.js
+++ b/module/doc/js/createlib.js
@@ -9,34 +9,65 @@ $(function()
toggleAcl($('form [name=acl]:checked').val(), 'lib');
});
+/**
+ * Change form by lib type.
+ *
+ * @param string libType
+ * @access public
+ * @return void
+ */
function changeByLibType(libType)
{
if(libType == 'product')
{
$('table tr.product').removeClass('hidden');
+ $('#product').attr('disabled', false);
+
$('table tr.project').addClass('hidden');
+ $('#project').attr('disabled', true);
+
$('table tr.execution').addClass('hidden');
+ $('#execution').attr('disabled', true);
+
changeDoclibAcl(libType);
}
else if(libType == 'project')
{
- $('table tr.product').addClass('hidden');
$('table tr.project').removeClass('hidden');
+ $('#project').attr('disabled', false);
+
+ $('table tr.product').addClass('hidden');
+ $('#product').attr('disabled', true);
+
$('table tr.execution').addClass('hidden');
+ $('#execution').attr('disabled', true);
+
changeDoclibAcl(libType);
}
else if(libType == 'execution')
{
- $('table tr.product').addClass('hidden');
- $('table tr.project').addClass('hidden');
$('table tr.execution').removeClass('hidden');
+ $('#execution').attr('disabled', false);
+
+ $('table tr.product').addClass('hidden');
+ $('#product').attr('disabled', true);
+
+ $('table tr.project').addClass('hidden');
+ $('#project').attr('disabled', true);
+
changeDoclibAcl(libType);
}
else
{
$('table tr.product').addClass('hidden');
+ $('#product').attr('disabled', true);
+
$('table tr.project').addClass('hidden');
+ $('#project').attr('disabled', true);
+
$('table tr.execution').addClass('hidden');
+ $('#execution').attr('disabled', true);
+
changeDoclibAcl(libType);
}
diff --git a/module/doc/view/edit.html.php b/module/doc/view/edit.html.php
index 8e5e663c3f..e9ce3e1968 100644
--- a/module/doc/view/edit.html.php
+++ b/module/doc/view/edit.html.php
@@ -10,7 +10,6 @@
* @link http://www.zentao.net
*/
?>
-doc->appendNavCSS();?>
contentType == 'html') include '../../common/view/kindeditor.html.php';?>
contentType == 'markdown') include '../../common/view/markdown.html.php';?>
diff --git a/module/doc/view/side.html.php b/module/doc/view/side.html.php
index f20cfdebe4..7c34571ec3 100644
--- a/module/doc/view/side.html.php
+++ b/module/doc/view/side.html.php
@@ -33,7 +33,7 @@ $sideWidth = common::checkNotCN() ? '270' : '238';
if($type == 'book')
{
common::printLink('doc', 'editLib', "rootID=$libID", $lang->doc->editBook, '', "class='btn btn-info btn-wide iframe'", '', true);
- common::printLink('doc', 'manageBook', "bookID=$libID", $lang->doc->manageBook, '', "class='btn btn-info btn-wide iframe'", '', true);
+ common::printLink('doc', 'manageBook', "bookID=$libID", $lang->doc->manageBook, '', "class='btn btn-info btn-wide'");
}
else
{
diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php
index 4f3d659ee6..dca697c217 100644
--- a/module/execution/view/all.html.php
+++ b/module/execution/view/all.html.php
@@ -68,11 +68,11 @@
systemMode == 'new')) ? $lang->execution->execName : $lang->execution->name);?> |
execution->owner);?> |
- execution->end);?> |
- execution->execStatus : $lang->execution->status);?> |
- execution->totalEstimate;?> |
- execution->totalConsumed;?> |
- execution->totalLeft;?> |
+ execution->end);?> |
+ execution->execStatus : $lang->execution->status);?> |
+ execution->totalEstimate;?> |
+ execution->totalConsumed;?> |
+ execution->totalLeft;?> |
execution->progress;?> |
execution->burn;?> |
@@ -101,7 +101,7 @@
PM);?> |
end;?> |
processStatus('execution', $execution);?>
-
+ |
|
lang->execution->workHour;?>'>hours->totalEstimate . $this->lang->execution->workHourUnit;?> |
diff --git a/module/product/control.php b/module/product/control.php
index 7e5d6ff973..6e0820de8d 100644
--- a/module/product/control.php
+++ b/module/product/control.php
@@ -994,10 +994,11 @@ class product extends control
$this->lang->project->menuOrder = $this->lang->{$project->model}->menuOrder;
$this->app->rawModule = $activeMenu;
- if($activeMenu == 'bug') $this->lang->{$project->model}->menu->qa['subMenu']->bug['subModule'] = 'product';
- if($activeMenu == 'testcase') $this->lang->{$project->model}->menu->qa['subMenu']->testcase['subModule'] = 'product';
- if($activeMenu == 'testtask') $this->lang->{$project->model}->menu->qa['subMenu']->testtask['subModule'] = 'product';
- if($activeMenu == 'testreport') $this->lang->{$project->model}->menu->qa['subMenu']->testreport['subModule'] = 'product';
+ if($activeMenu == 'bug') $this->lang->{$project->model}->menu->qa['subMenu']->bug['subModule'] = 'product';
+ if($activeMenu == 'testcase') $this->lang->{$project->model}->menu->qa['subMenu']->testcase['subModule'] = 'product';
+ if($activeMenu == 'testtask') $this->lang->{$project->model}->menu->qa['subMenu']->testtask['subModule'] = 'product';
+ if($activeMenu == 'testreport') $this->lang->{$project->model}->menu->qa['subMenu']->testreport['subModule'] = 'product';
+ if($activeMenu == 'projectrelease') $this->lang->{$project->model}->menu->release['subModule'] = 'projectrelease';
}
elseif($moduleName == 'qa')
{
diff --git a/module/projectrelease/control.php b/module/projectrelease/control.php
index 8b44e19510..1484e77770 100644
--- a/module/projectrelease/control.php
+++ b/module/projectrelease/control.php
@@ -29,7 +29,7 @@ class projectrelease extends control
$this->loadModel('release');
$this->loadModel('project');
$this->view->products = $this->products = $this->product->getProductPairsByProject($this->session->project);
- if(empty($this->view->products)) $this->locate($this->createLink('product', 'create'));
+ if(empty($this->products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', 'moduleName=project&activeMenu=projectrelease&projectID=' . $this->session->project)));
}
/**
diff --git a/module/story/view/view.html.php b/module/story/view/view.html.php
index 9ca55b1b54..86b8a59025 100644
--- a/module/story/view/view.html.php
+++ b/module/story/view/view.html.php
@@ -49,7 +49,7 @@
app->rawModule == 'projectstory')
{
@@ -57,7 +57,7 @@
$openGroup = 'project';
}
?>
- product}&branch={$story->branch}&moduleID={$story->module}&$otherParam", "" . $lang->story->create, '', "class='btn btn-primary' data-app='$openApp'"); ?>
+ product}&branch={$story->branch}&moduleID={$story->module}&$otherParam&bugID=0&planID=0&todoID=0&extra=&type=$story->type", "" . $lang->story->create, '', "class='btn btn-primary' data-app='$openApp'"); ?>
diff --git a/module/task/config.php b/module/task/config.php
index b46d5ad4bf..5db5eb88ae 100644
--- a/module/task/config.php
+++ b/module/task/config.php
@@ -72,7 +72,7 @@ $config->task->datatable->fieldList['type']['required'] = 'no';
$config->task->datatable->fieldList['status']['title'] = 'statusAB';
$config->task->datatable->fieldList['status']['fixed'] = 'no';
-$config->task->datatable->fieldList['status']['width'] = '80';
+$config->task->datatable->fieldList['status']['width'] = '60';
$config->task->datatable->fieldList['status']['required'] = 'no';
$config->task->datatable->fieldList['estimate']['title'] = 'estimateAB';
@@ -99,7 +99,7 @@ $config->task->datatable->fieldList['progress']['name'] = $lang->task->progr
$config->task->datatable->fieldList['deadline']['title'] = 'deadlineAB';
$config->task->datatable->fieldList['deadline']['fixed'] = 'no';
-$config->task->datatable->fieldList['deadline']['width'] = '100';
+$config->task->datatable->fieldList['deadline']['width'] = '60';
$config->task->datatable->fieldList['deadline']['required'] = 'no';
$config->task->datatable->fieldList['openedBy']['title'] = 'openedByAB';
diff --git a/module/task/css/create.css b/module/task/css/create.css
index 445a66d20e..b9fc9218b2 100644
--- a/module/task/css/create.css
+++ b/module/task/css/create.css
@@ -1,4 +1,4 @@
-#copyButton {width: 56px; background-color: #f1f1f1; opacity: 1;} /* Adjust for task #4151; */
+#copyButton {width: 80px; background-color: #f1f1f1; opacity: 1;} /* Adjust for task #4151; */
.title-group.required:after {display: none;}
.title-group.required > .required:after {display: block; right: 29px; top: 5px;}
diff --git a/module/task/js/create.js b/module/task/js/create.js
index 505d281817..99177327f3 100644
--- a/module/task/js/create.js
+++ b/module/task/js/create.js
@@ -191,7 +191,8 @@ function setPreview()
$('#preview a').attr('href', storyLink);
$('#copyButton').removeClass('hidden');
$('.title-group.required > div').attr('id', 'copyStory-input').removeClass('.required');
- $('div.colorpicker').css('right', '57px');//Adjust for task #4151;
+ $('div.colorpicker').css('right', '80px');//Adjust for task #4151;
+ $('#copyButton').css('width', '80px');
}
setAfter();
diff --git a/module/testcase/control.php b/module/testcase/control.php
index 836ce48fd6..33e38996d9 100644
--- a/module/testcase/control.php
+++ b/module/testcase/control.php
@@ -60,7 +60,7 @@ class testcase extends control
$this->view->products = $this->products = $products;
$openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa';
- if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testcase&objectID=$objectID")));
+ if(empty($this->products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testcase&objectID=$objectID")));
}
/**
diff --git a/module/testreport/control.php b/module/testreport/control.php
index 6adc70427a..c76ccc0e8f 100644
--- a/module/testreport/control.php
+++ b/module/testreport/control.php
@@ -63,7 +63,7 @@ class testreport extends control
$this->view->products = $this->products = $products;
$openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa';
- if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testreport&objectID=$objectID")));
+ if(empty($this->products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testreport&objectID=$objectID")));
}
/**
diff --git a/module/testsuite/control.php b/module/testsuite/control.php
index a2b287ddf2..4607ed21aa 100644
--- a/module/testsuite/control.php
+++ b/module/testsuite/control.php
@@ -32,7 +32,7 @@ class testsuite extends control
parent::__construct($moduleName, $methodName);
$this->view->products = $this->products = $this->loadModel('product')->getPairs();
- if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=qa&activeMenu=testsuite")));
+ if(empty($this->products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=qa&activeMenu=testsuite")));
}
/**
diff --git a/module/testtask/control.php b/module/testtask/control.php
index 433f11315d..69c1a8d79f 100644
--- a/module/testtask/control.php
+++ b/module/testtask/control.php
@@ -58,7 +58,7 @@ class testtask extends control
$this->view->products = $this->products = $products;
$openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa';
- if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testtask&objectID=$objectID")));
+ if(empty($this->products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testtask&objectID=$objectID")));
}
/**