Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into cyy_fixbug

This commit is contained in:
caoyanyi
2023-04-14 08:35:40 +08:00
53 changed files with 9464 additions and 9499 deletions
+5 -6
View File
@@ -87,8 +87,7 @@ $filter->bug->export = new stdclass();
$filter->caselib->create = new stdclass();
$filter->doc->create = new stdclass();
$filter->doc->browse = new stdclass();
$filter->doc->alllibs = new stdclass();
$filter->doc->objectlibs = new stdclass();
$filter->doc->view = new stdclass();
$filter->doc->tablecontents = new stdclass();
$filter->doc->productspace = new stdclass();
$filter->doc->projectspace = new stdclass();
@@ -219,12 +218,12 @@ $filter->caselib->create->cookie['lastLibCaseModule'] = 'int';
$filter->doc->create->cookie['lastDocModule'] = 'int';
$filter->doc->browse->cookie['browseType'] = 'reg::browseType';
$filter->doc->alllibs->cookie['browseType'] = 'reg::browseType';
$filter->doc->objectlibs->cookie['browseType'] = 'reg::browseType';
$filter->doc->objectlibs->cookie['preProductID'] = 'int';
$filter->doc->objectlibs->cookie['preBranch'] = 'reg::word';
$filter->doc->view->cookie['browseType'] = 'reg::browseType';
$filter->doc->view->cookie['preBranch'] = 'reg::word';
$filter->doc->default->cookie['from'] = 'code';
$filter->doc->default->cookie['product'] = 'int';
$filter->doc->default->cookie['preProductID'] = 'int';
$filter->doc->default->cookie['lastProject'] = 'int';
$filter->doc->showfiles->cookie['docFilesViewType'] = 'code';
$filter->doc->tablecontents->cookie['preProductID'] = 'int';
$filter->doc->tablecontents->cookie['preBranch'] = 'reg::word';
+26 -12
View File
File diff suppressed because one or more lines are too long
+9213 -9313
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -740,7 +740,7 @@ class baseHelper
session_write_close();
session_id($sessionID);
if(ini_get('session.save_handler') == 'files' and isset($_GET['tid']))
if(ini_get('session.save_handler') == 'user' and isset($_GET['tid']))
{
$ztSessionHandler = new ztSessionHandler($_GET['tid']);
session_set_save_handler(
+2
View File
@@ -298,6 +298,8 @@ class dm extends dao
*/
public function exec($sql = '')
{
if(!empty(dao::$errors)) return new PDOStatement(); // If any error, return an empty statement object to make sure the remain method to execute.
if($sql)
{
$this->sqlobj = new sql();
+6
View File
@@ -280,6 +280,12 @@ class dbh
if(stripos($sql, 'CREATE OR REPLACE VIEW ') === 0) return '';
if(stripos($sql, 'CREATE VIEW') === 0) return '';
if(stripos($sql, 'CREATE FUNCTION') === 0) return '';
if(stripos($sql, 'CREATE UNIQUE INDEX') === 0)
{
preg_match('/ON\ +[0-9a-zA-Z\_\.]+\`([0-9a-zA-Z\_]+)\`/', $sql, $matches);
$tableName = explode('_', $matches[1]);
$sql = preg_replace('/INDEX\ +\`/', 'INDEX `' . strtolower($tableName[1]) . '_', $sql);
}
case 'ALTER':
$sql = $this->formatField($sql);
$sql = $this->formatAttr($sql);
+1 -1
View File
@@ -754,7 +754,7 @@ $lang->action->label->testtask = 'Testaufgaben|testtask|view|caseID=%s';
$lang->action->label->testsuite = 'Test Suite|testsuite|view|suiteID=%s';
$lang->action->label->caselib = 'Fallbibliothek|testsuite|libview|libID=%s';
$lang->action->label->todo = 'Todo|todo|view|todoID=%s';
$lang->action->label->doclib = 'Dok Bibliothek|doc|browse|libID=%s';
$lang->action->label->doclib = 'Dok Bibliothek|doc|teamspace|objectID=%s&libID=%s';
$lang->action->label->doc = 'Dok|doc|view|docID=%s';
$lang->action->label->user = 'Benutzer|user|view|account=%s';
$lang->action->label->testreport = 'Berichte|testreport|view|report=%s';
+1 -1
View File
@@ -754,7 +754,7 @@ $lang->action->label->testtask = 'Request|testtask|view|caseID=%s';
$lang->action->label->testsuite = 'Test Suite|testsuite|view|suiteID=%s';
$lang->action->label->caselib = 'Case Library|caselib|view|libID=%s';
$lang->action->label->todo = 'Todo|todo|view|todoID=%s';
$lang->action->label->doclib = 'Doc Library|doc|objectLibs|type=%s&objectID=%s&libID=%s';
$lang->action->label->doclib = 'Doc Library|doc|teamspace|objectID=%s&libID=%s';
$lang->action->label->doc = 'Doc|doc|view|docID=%s';
$lang->action->label->user = 'User|user|view|account=%s';
$lang->action->label->testreport = 'Report|testreport|view|report=%s';
+1 -1
View File
@@ -754,7 +754,7 @@ $lang->action->label->testtask = 'Recette|testtask|view|caseID=%s';
$lang->action->label->testsuite = 'Cahier Recette|testsuite|view|suiteID=%s';
$lang->action->label->caselib = 'Library Recette|testsuite|libview|libID=%s';
$lang->action->label->todo = 'Agenda|todo|view|todoID=%s';
$lang->action->label->doclib = 'Bibliothèque|doc|browse|libID=%s';
$lang->action->label->doclib = 'Bibliothèque|doc|teamspace|objectID=%s&libID=%s';
$lang->action->label->doc = 'Document|doc|view|docID=%s';
$lang->action->label->user = 'Utilisateur|user|view|account=%s';
$lang->action->label->testreport = 'Rapport|testreport|view|report=%s';
+1 -1
View File
@@ -754,7 +754,7 @@ $lang->action->label->testtask = '测试单|testtask|view|caseID=%s';
$lang->action->label->testsuite = '测试套件|testsuite|view|suiteID=%s';
$lang->action->label->caselib = '用例库|caselib|view|libID=%s';
$lang->action->label->todo = '待办|todo|view|todoID=%s';
$lang->action->label->doclib = '文档库|doc|tablecontents|type=%s&objectID=%s&libID=%s';
$lang->action->label->doclib = '文档库|doc|teamspace|objectID=%s&libID=%s';
$lang->action->label->doc = '文档|doc|view|docID=%s';
$lang->action->label->user = '用户|user|view|account=%s';
$lang->action->label->testreport = '报告|testreport|view|report=%s';
-1
View File
@@ -1694,7 +1694,6 @@ class actionModel extends model
$method = 'tablecontents';
if(isset($this->config->doc->spaceMethod[$docLib->type])) $method = $this->config->doc->spaceMethod[$docLib->type];
if($method == 'myspace') $params = "type=mine&libID={$action->objectID}";
if($method == 'tablecontents') $params = sprintf($vars, $docLib->type, $docLib->objectID, $action->objectID, $appendLib);
if(!in_array($method, array('myspace', 'tablecontents'))) $params = "objectID={$docLib->objectID}&libID={$action->objectID}";
$action->objectLink = helper::createLink('doc', $method, $params);
}
+2 -1
View File
@@ -12,6 +12,7 @@
$lang->api->common = 'API';
$lang->api->getModel = 'Super Model API';
$lang->api->sql = 'SQL Query API';
$lang->api->manage = 'API management';
$lang->api->index = 'API Space';
$lang->api->editLib = 'Edit';
@@ -108,7 +109,7 @@ $lang->api->structAddedBy = 'CreatedBy';
$lang->api->structAddedDate = 'Created';
$lang->api->name = 'API Library Name';
$lang->api->baseUrl = 'Base URL';
$lang->api->baseUrlDesc = 'Site or path, e.g., api.zentao.com or /v1.';
$lang->api->baseUrlDesc = 'Site or path, e.g., http://api.zentao.com or /v1.';
$lang->api->desc = 'Beschreibung';
$lang->api->control = 'Access Control';
$lang->api->noLib = 'No API library yet.';
+2 -1
View File
@@ -12,6 +12,7 @@
$lang->api->common = 'API';
$lang->api->getModel = 'Super Model API';
$lang->api->sql = 'SQL Query API';
$lang->api->manage = 'API management';
$lang->api->index = 'API Space';
$lang->api->editLib = 'Edit';
@@ -108,7 +109,7 @@ $lang->api->structAddedBy = 'CreatedBy';
$lang->api->structAddedDate = 'Created';
$lang->api->name = 'API Library Name';
$lang->api->baseUrl = 'Base URL';
$lang->api->baseUrlDesc = 'Site or path, e.g., api.zentao.com or /v1.';
$lang->api->baseUrlDesc = 'Site or path, e.g., http://api.zentao.com or /v1.';
$lang->api->desc = 'Description';
$lang->api->control = 'Access Control';
$lang->api->noLib = 'No API library yet.';
+2 -1
View File
@@ -12,6 +12,7 @@
$lang->api->common = 'API';
$lang->api->getModel = 'Super Model API';
$lang->api->sql = 'SQL Query API';
$lang->api->manage = 'API management';
$lang->api->index = 'API Space';
$lang->api->editLib = 'Edit';
@@ -108,7 +109,7 @@ $lang->api->structAddedBy = 'CreatedBy';
$lang->api->structAddedDate = 'Created';
$lang->api->name = 'API Library Name';
$lang->api->baseUrl = 'Base URL';
$lang->api->baseUrlDesc = 'Site or path, e.g., api.zentao.com or /v1.';
$lang->api->baseUrlDesc = 'Site or path, e.g., http://api.zentao.com or /v1.';
$lang->api->desc = 'Description';
$lang->api->control = 'Access Control';
$lang->api->noLib = 'No API library yet.';
+2 -1
View File
@@ -12,6 +12,7 @@
$lang->api->common = 'API接口';
$lang->api->getModel = '超级model调用接口';
$lang->api->sql = 'SQL查询接口';
$lang->api->manage = '接口管理';
$lang->api->index = '接口空间';
$lang->api->editLib = '编辑库';
@@ -108,7 +109,7 @@ $lang->api->structAddedBy = '创建人';
$lang->api->structAddedDate = '创建时间';
$lang->api->name = '库名称';
$lang->api->baseUrl = '请求基础路径';
$lang->api->baseUrlDesc = '网址或者路径,比如 test.zentao.net 或者 /v1';
$lang->api->baseUrlDesc = '网址或者路径,比如 http://test.zentao.net 或者 /v1';
$lang->api->desc = '描述';
$lang->api->control = '访问控制';
$lang->api->noLib = '暂时没有库。';
+4 -4
View File
@@ -986,13 +986,13 @@ class apiModel extends model
$normalObjects = $closedObjects = array();
$libs = $this->loadModel('doc')->getApiLibs();
$products = $this->dao->select('t1.id, t1.name, t1.status')->from(TABLE_PRODUCT)->alias('t1')
$products = $this->dao->select('t1.id, t1.order, t1.name, t1.status')->from(TABLE_PRODUCT)->alias('t1')
->leftjoin(TABLE_DOCLIB)->alias('t2')->on('t2.product=t1.id')
->where('t2.id')->gt(0)
->andWhere('t1.vision')->eq($this->config->vision)
->andWhere('t1.deleted')->eq(0)
->andWhere('t2.id')->in(array_keys($libs))
->orderBy('id_desc')
->orderBy('order_asc')
->fetchAll('id');
foreach($products as $id => $product)
@@ -1007,14 +1007,14 @@ class apiModel extends model
}
}
$projects = $this->dao->select('t1.id, t1.name, t1.status')->from(TABLE_PROJECT)->alias('t1')
$projects = $this->dao->select('t1.id, t1.order, t1.name, t1.status')->from(TABLE_PROJECT)->alias('t1')
->leftjoin(TABLE_DOCLIB)->alias('t2')->on('t2.project=t1.id')
->where('t2.id')->gt(0)
->andWhere('t1.vision')->eq($this->config->vision)
->andWhere('t1.deleted')->eq(0)
->beginIF(!$this->app->user->admin)->andWhere('t1.id')->in($this->app->user->view->projects)->fi()
->andWhere('t2.id')->in(array_keys($libs))
->orderBy('t1.hasProduct_asc, id_desc')
->orderBy('t1.hasProduct_asc, order_asc')
->fetchAll('id');
foreach($projects as $id => $project)
+2 -2
View File
@@ -341,11 +341,11 @@ $lang->block->default['doc']['2']['title'] = 'Dynamic';
$lang->block->default['doc']['2']['block'] = 'docdynamic';
$lang->block->default['doc']['2']['grid'] = 4;
$lang->block->default['doc']['3']['title'] = 'My Collection';
$lang->block->default['doc']['3']['title'] = 'My Collection Document';
$lang->block->default['doc']['3']['block'] = 'docmycollection';
$lang->block->default['doc']['3']['grid'] = 8;
$lang->block->default['doc']['4']['title'] = 'Recently update';
$lang->block->default['doc']['4']['title'] = 'Recently Update Document';
$lang->block->default['doc']['4']['block'] = 'docrecentupdate';
$lang->block->default['doc']['4']['grid'] = 8;
+2 -2
View File
@@ -341,11 +341,11 @@ $lang->block->default['doc']['2']['title'] = 'Dynamic';
$lang->block->default['doc']['2']['block'] = 'docdynamic';
$lang->block->default['doc']['2']['grid'] = 4;
$lang->block->default['doc']['3']['title'] = 'My Collection';
$lang->block->default['doc']['3']['title'] = 'My Collection Document';
$lang->block->default['doc']['3']['block'] = 'docmycollection';
$lang->block->default['doc']['3']['grid'] = 8;
$lang->block->default['doc']['4']['title'] = 'Recently update';
$lang->block->default['doc']['4']['title'] = 'Recently Update Document';
$lang->block->default['doc']['4']['block'] = 'docrecentupdate';
$lang->block->default['doc']['4']['grid'] = 8;
+2 -2
View File
@@ -341,11 +341,11 @@ $lang->block->default['doc']['2']['title'] = 'Dynamic';
$lang->block->default['doc']['2']['block'] = 'docdynamic';
$lang->block->default['doc']['2']['grid'] = 4;
$lang->block->default['doc']['3']['title'] = 'My Collection';
$lang->block->default['doc']['3']['title'] = 'My Collection Document';
$lang->block->default['doc']['3']['block'] = 'docmycollection';
$lang->block->default['doc']['3']['grid'] = 8;
$lang->block->default['doc']['4']['title'] = 'Recently update';
$lang->block->default['doc']['4']['title'] = 'Recently Update Document';
$lang->block->default['doc']['4']['block'] = 'docrecentupdate';
$lang->block->default['doc']['4']['grid'] = 8;
+2 -2
View File
@@ -341,11 +341,11 @@ $lang->block->default['doc']['2']['title'] = '文档动态';
$lang->block->default['doc']['2']['block'] = 'docdynamic';
$lang->block->default['doc']['2']['grid'] = 4;
$lang->block->default['doc']['3']['title'] = '我的收藏';
$lang->block->default['doc']['3']['title'] = '我收藏的文档';
$lang->block->default['doc']['3']['block'] = 'docmycollection';
$lang->block->default['doc']['3']['grid'] = 8;
$lang->block->default['doc']['4']['title'] = '最近更新';
$lang->block->default['doc']['4']['title'] = '最近更新的文档';
$lang->block->default['doc']['4']['block'] = 'docrecentupdate';
$lang->block->default['doc']['4']['grid'] = 8;
@@ -13,12 +13,12 @@
<style>
.block-docmycollection .panel-body {padding: 0px 10px 20px;}
.block-docmycollection .doc-list {display: flex; flex-wrap: wrap; padding: 0 4px 0 0;}
.block-docmycollection .doc-list > .doc-box {border: unset; flex: 0 1 50%; padding: 8px;}
.block-docmycollection .doc-list > .doc-box > button.btn {padding: 5px 10px; height: 100%; width: 100%; cursor: pointer; white-space: unset; text-align: unset; border: 1px solid rgba(227, 228, 233, 0.6)}
.block-docmycollection .doc-list > .doc-box {border: unset; flex: 0 1 50%; padding: 8px; width: 0;}
.block-docmycollection .doc-list > .doc-box > button.btn {padding: 5px 10px; height: 100%; width: 100%; cursor: pointer; white-space: nowrap; text-align: unset; border: 1px solid rgba(227, 228, 233, 0.6)}
.block-docmycollection .doc-list > .doc-box > .btn:hover {background: unset;}
.block-docmycollection .doc-list > .doc-box > .btn.no-priv {cursor: not-allowed; pointer-events: unset;}
.block-docmycollection .doc-list > .doc-box > .btn.no-priv p {pointer-events: none;}
.block-docmycollection .doc-list > .doc-box .date-interval {float: right; padding: 8px 0px;}
.block-docmycollection .doc-list > .doc-box .date-interval {float: right; padding: 8px 0 8px 12px;}
.block-docmycollection .doc-list > .doc-box > .btn > h4 {padding-right: 5px;}
.block-docmycollection .doc-list > .doc-box .file-icon {margin-right: 2px; width: 14px;}
.block-docmycollection .doc-list > .doc-box .plug-title {height: 16px; overflow: hidden;}
@@ -13,12 +13,12 @@
<style>
.block-docrecentupdate .panel-body {padding: 0px 10px 20px;}
.block-docrecentupdate .doc-list {display: flex; flex-wrap: wrap; padding: 0 4px 0 0;}
.block-docrecentupdate .doc-list > .doc-box {border: unset; flex: 0 1 33%; padding: 8px;}
.block-docrecentupdate .doc-list > .doc-box > button.btn {padding: 5px 10px; height: 100%; width: 100%; cursor: pointer; white-space: unset; text-align: unset; border: 1px solid rgba(227, 228, 233, 0.6)}
.block-docrecentupdate .doc-list > .doc-box {border: unset; flex: 0 1 33%; padding: 8px; width: 0;}
.block-docrecentupdate .doc-list > .doc-box > button.btn {padding: 5px 10px; height: 100%; width: 100%; cursor: pointer; white-space: nowrap; text-align: unset; border: 1px solid rgba(227, 228, 233, 0.6)}
.block-docrecentupdate .doc-list > .doc-box > .btn:hover {background: unset;}
.block-docrecentupdate .doc-list > .doc-box > .btn.no-priv {cursor: not-allowed; pointer-events: unset;}
.block-docrecentupdate .doc-list > .doc-box > .btn.no-priv p {pointer-events: none;}
.block-docrecentupdate .doc-list > .doc-box .date-interval {float: right; padding: 8px 0px;}
.block-docrecentupdate .doc-list > .doc-box .date-interval {float: right; padding: 8px 0 8px 12px;}
.block-docrecentupdate .doc-list > .doc-box > .btn > h4 {padding-right: 5px;}
.block-docrecentupdate .doc-list > .doc-box .file-icon {margin-right: 2px; width: 14px;}
.block-docrecentupdate .doc-list > .doc-box .plug-title {height: 16px; overflow: hidden;}
+13 -1
View File
@@ -44,7 +44,19 @@ function resizeChart()
*/
function initPicker($row, pickerName = 'picker-select')
{
$row.find('.' + pickerName).picker({'maxDropHeight': pickerHeight});
$row.find('.' + pickerName).picker(
{
maxDropHeight: pickerHeight,
onReady: function()
{
if(!$row.find('.picker')) return;
if(window.getComputedStyle($row.find('.picker').find('.picker-selections')[0]).getPropertyValue('width') !== 'auto')
{
var pickerWidth = $row.find('.picker')[0].getBoundingClientRect().width;
$row.find('.picker').find('.picker-selections').css('width', pickerWidth);
}
}
});
$row.find("." + pickerName).each(function(index)
{
if($(this).hasClass('required')) $(this).siblings("div .picker").addClass('required');
+2 -2
View File
@@ -340,7 +340,7 @@ $lang->execution->menu->storyGroup = array('link' => "{$lang->common->story}|exe
$lang->execution->menu->story = array('link' => "$lang->SRCommon|execution|story|executionID=%s", 'subModule' => 'story', 'alias' => 'storykanban,linkstory');
$lang->execution->menu->qa = array('link' => "{$lang->qa->common}|execution|bug|executionID=%s", 'subModule' => 'bug,testcase,testtask,testreport', 'alias' => 'qa,bug,testcase,testtask,testreport');
$lang->execution->menu->devops = array('link' => "{$lang->repo->common}|repo|browse|repoID=0&branchID=&objectID=%s", 'subModule' => 'repo');
$lang->execution->menu->doc = array('link' => "{$lang->doc->common}|doc|tableContents|type=execution&objectID=%s", 'subModule' => 'doc');
$lang->execution->menu->doc = array('link' => "{$lang->doc->common}|execution|doc|objectID=%s", 'subModule' => 'doc');
$lang->execution->menu->build = array('link' => "{$lang->build->common}|execution|build|executionID=%s", 'subModule' => 'build');
$lang->execution->menu->action = array('link' => "$lang->dynamic|execution|dynamic|executionID=%s");
$lang->execution->menu->settings = array('link' => "$lang->settings|execution|view|executionID=%s", 'subModule' => 'personnel', 'alias' => 'edit,manageproducts,team,whitelist,addwhitelist,managemembers', 'class' => 'dropdown dropdown-hover');
@@ -503,7 +503,7 @@ $lang->doc->menu->my = array('link' => "{$lang->doc->mySpace}|doc|mySpace
$lang->doc->menu->product = array('link' => "{$lang->doc->productSpace}|doc|productSpace|", 'alias' => 'productspace');
$lang->doc->menu->project = array('link' => "{$lang->doc->projectSpace}|doc|projectSpace|", 'alias' => 'projectspace');
$lang->doc->menu->api = array('link' => "{$lang->doc->apiSpace}|api|index", 'alias' => 'api');
$lang->doc->menu->custom = array('link' => "{$lang->doc->teamSpace}|doc|tableContents|type=custom", 'alias' => 'tablecontents');
$lang->doc->menu->custom = array('link' => "{$lang->doc->teamSpace}|doc|teamSpace|", 'alias' => 'teamspace');
$lang->doc->dividerMenu = ',product,';
-1
View File
@@ -605,7 +605,6 @@ class commonModel extends model
if(strpos('|bug|execution|kanbanspace|', "|$objectType|") !== false) $needPrintDivider = true;
$hasPriv = common::hasPriv($module, $createMethod);
if($hasPriv and $objectType == 'doc' and !common::hasPriv('doc', 'tableContents')) $hasPriv = false;
if(!$hasPriv and $objectType == 'doc' and common::hasPriv('api', 'create')) $hasPriv = true;
if(!$hasPriv) continue;
+1 -1
View File
@@ -48,7 +48,7 @@ $config->doc->spaceMethod['mine'] = 'myspace';
$config->doc->spaceMethod['product'] = 'productspace';
$config->doc->spaceMethod['project'] = 'projectspace';
$config->doc->spaceMethod['execution'] = 'projectspace';
$config->doc->spaceMethod['custom'] = 'tablecontents';
$config->doc->spaceMethod['custom'] = 'teamspace';
$config->doc->search['module'] = 'doc';
$config->doc->search['fields']['title'] = $lang->doc->title;
+43 -16
View File
@@ -655,7 +655,7 @@ class doc extends control
if($from == 'lib')
{
$method = 'tableContents';
$method = 'teamSpace';
$objectID = 0;
if($objectType == 'product')
{
@@ -672,7 +672,6 @@ class doc extends control
$objectID = $doc->execution;
}
$params = "objectID={$objectID}&libID={$doc->lib}";
if($method == 'tableContents') $params = "type=$objectType&" . $params;
$response['locate'] = $this->createLink('doc', $method, $params);
}
}
@@ -1198,20 +1197,22 @@ class doc extends control
$doc = $docID ? $doc : '';
/* Crumbs links array. */
$methodName = in_array($type, array('product', 'project')) ? $objectType . 'Space' : 'tableContents';
$moduleName = 'doc';
$methodName = in_array($type, array('product', 'project')) ? $objectType . 'Space' : 'teamSpace';
$linkParams = "objectID={$objectID}&libID={$lib->id}";
if($this->app->tab == 'execution' or $objectType == 'custom')
if($this->app->tab == 'execution')
{
$linkParams = "objectType=$objectType&$linkParams";
$methodName = 'tableContents';
$moduleName = 'execution';
$methodName = 'doc';
$linkParams = "executionID=$objectID";
}
if($type == 'mine')
elseif($type == 'mine')
{
$linkParams = "type=mine&libID={$lib->id}";
$methodName = 'mySpace';
}
$crumbs[] = html::a(inLink($methodName, $linkParams), html::image("static/svg/wiki-file-lib.svg") . $lib->name, '', 'title =' . $lib -> name);
$crumbs[] = html::a($this->createLink($moduleName, $methodName, $linkParams), html::image("static/svg/wiki-file-lib.svg") . $lib->name, '', 'title =' . $lib -> name);
$moduleList = $this->loadModel('tree')->getParents($doc->module);
foreach($moduleList as $module)
@@ -1282,7 +1283,7 @@ class doc extends control
$queryID = $browseType == 'bySearch' ? (int)$param : 0;
$params = "objectID=$objectID&libID=$libID&moduleID=0&browseType=bySearch&orderBy=$orderBy&param=myQueryID";
if($this->app->rawMethod == 'tablecontents') $params = "type=$type&" . $params;
$actionURL = $this->createLink('doc', $this->app->rawMethod, $params);
$actionURL = $this->createLink($this->app->rawModule, $this->app->rawMethod, $params);
if($libType == 'api')
{
$this->loadModel('api')->buildSearchForm($lib, $queryID, $actionURL, $libs, $type);
@@ -1361,6 +1362,9 @@ class doc extends control
*/
public function productSpace($objectID = 0, $libID = 0, $moduleID = 0, $browseType = 'all', $orderBy = 'status,id_desc', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$products = $this->product->getPairs('nocode', 0, '', 'all');
$objectID = $this->product->saveState($objectID, $products);
echo $this->fetch('doc', 'tableContents', "type=product&objectID=$objectID&libID=$libID&moduleID=$moduleID&browseType=$browseType&orderBy=$orderBy&param=$param&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
}
@@ -1381,9 +1385,32 @@ class doc extends control
*/
public function projectSpace($objectID = 0, $libID = 0, $moduleID = 0, $browseType = 'all', $orderBy = 'status,id_desc', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$projects = $this->project->getPairsByProgram();
$objectID = $this->project->saveState($objectID, $projects);
echo $this->fetch('doc', 'tableContents', "type=project&objectID=$objectID&libID=$libID&moduleID=$moduleID&browseType=$browseType&orderBy=$orderBy&param=$param&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
}
/**
* Show team space.
*
* @param int $objectID
* @param int $libID
* @param int $moduleID
* @param string $browseType all|draft|bysearch
* @param string $orderBy
* @param int $param
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @access public
* @return void
*/
public function teamSpace($objectID = 0, $libID = 0, $moduleID = 0, $browseType = 'all', $orderBy = 'status,id_desc', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
echo $this->fetch('doc', 'tableContents', "type=custom&objectID=$objectID&libID=$libID&moduleID=$moduleID&browseType=$browseType&orderBy=$orderBy&param=$param&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
}
/**
* Select lib type.
*
@@ -1412,13 +1439,13 @@ class doc extends control
$spaceList = $this->lang->doc->spaceList;
$typeList = $this->lang->doc->types;
if(!common::hasPriv('doc', 'create')) unset($spaceList['mine'], $spaceList['custom'], $typeList['doc']);
if(!common::hasPriv('doc', 'mySpace')) unset($spaceList['mine']);
if(!common::hasPriv('doc', 'productSpace')) unset($spaceList['product']);
if(!common::hasPriv('doc', 'projectSpace')) unset($spaceList['project']);
if(!common::hasPriv('doc', 'tableContents')) unset($spaceList['custom']);
if(!common::hasPriv('api', 'index')) unset($spaceList['api']);
if(!common::hasPriv('api', 'create')) unset($spaceList['api'], $typeList['api']);
if(!common::hasPriv('doc', 'create')) unset($spaceList['mine'], $spaceList['custom'], $typeList['doc']);
if(!common::hasPriv('doc', 'mySpace')) unset($spaceList['mine']);
if(!common::hasPriv('doc', 'productSpace')) unset($spaceList['product']);
if(!common::hasPriv('doc', 'projectSpace')) unset($spaceList['project']);
if(!common::hasPriv('doc', 'teamSpace')) unset($spaceList['custom']);
if(!common::hasPriv('api', 'index')) unset($spaceList['api']);
if(!common::hasPriv('api', 'create')) unset($spaceList['api'], $typeList['api']);
$products = $this->loadModel('product')->getPairs();
$projects = $this->project->getPairsByProgram('', 'all', false, 'order_asc', 'kanban');
+2
View File
@@ -90,7 +90,9 @@ ol, ul {margin-bottom: 0}
.tree li > a {white-space: nowrap; text-overflow: ellipsis; overflow: hidden;}
.side-col .menu-actions {position: absolute; top: 0; right: 0; padding: 7px 8px;}
.menu-actions i {font-size: 15px; color: #8c8c8c;}
#whiteListBox .input-group:last-child {margin-top: 10px;}
#whiteListBox .chosen-container .chosen-results {max-height: 180px;}
#whiteListBox .chosen-container-active .chosen-single {border-color: #2e7fff !important;}
.c-product, .c-execution, .c-lib {width: 80px !important;}
-1
View File
@@ -39,5 +39,4 @@ body {overflow: hidden;}
.aclBox .radio-inline{display:block; padding-bottom:5px;}
.aclBox .radio-inline+.radio-inline {margin-left: 0px !important;}
#whiteListBox .input-group:last-child {margin-top: 10px;}
.fullscreen-save, .markdown-fullscreen-save {position: fixed; top: 10px; right: 30px; z-index: 999999;}
+1
View File
@@ -1,3 +1,4 @@
#lib_chosen.chosen-container .chosen-results {max-height: 100px;}
.radio-inline+.radio-inline { margin-top: 0; margin-left: 0px;}
.radio-inline {margin-right: 10px;}
#mainContent{height:310px;}
+1 -1
View File
@@ -49,7 +49,7 @@ li.drag-shadow ul {display: none!important;}
.table .c-name > .doc-title {display: inline-block; max-width: calc(100% - 80px); overflow: hidden; background: transparent; padding-right:0px;}
.table .c-name > span.doc-title {line-height: 0; vertical-align: inherit;}
.table .c-name > .draft {background-color:rgba(129, 102, 238, 0.12); color:#8166EE;}
.table .c-name > .ajaxCollect {float: right; position: relative; right: 10px; top: 0px;}
.table .c-name > .ajaxCollect {float: right; position: relative; right: 10px; top: 0px; padding: 0 6px;}
table.table > thead > tr {height: 32px;}
#bysearchTab::before {display: none;}
+3 -4
View File
@@ -32,7 +32,7 @@ function loadExecutions(projectID)
$('#executionBox').load(link, function()
{
var $extension = $('#executionBox').find('select');
$extension.attr('data-placeholder', holders.execution).attr('onchange', "loadObjectModules('execution', this.value)").picker();
$extension.attr('onchange', "loadObjectModules('execution', this.value)").picker();
if($extension.hasClass('disabled')) $('#executionBox').find('.picker').addClass('disabled');
});
loadObjectModules('project', projectID);
@@ -332,12 +332,11 @@ $(document).ready(function()
*/
function locateNewLib(type, objectID, libID)
{
var method = 'tableContents';
var params = 'type=' + type + '&objectID=' + objectID + '&libID=' + libID;
var method = 'teamSpace';
var params = 'objectID=' + objectID + '&libID=' + libID;
if(type == 'product' || type == 'project')
{
method = type + 'Space';
params = 'objectID=' + objectID + '&libID=' + libID;
}
else if(type == 'mine')
{
+1
View File
@@ -125,6 +125,7 @@ $lang->doc->defaultSave = 'Default Save: ';
$lang->doc->position = 'Position';
$lang->doc->person = 'Person';
$lang->doc->team = 'Team';
$lang->doc->manage = 'Document Management';
$lang->doc->moduleDoc = 'Nach Modulen';
$lang->doc->searchDoc = 'Suche';
+1
View File
@@ -125,6 +125,7 @@ $lang->doc->defaultSave = 'Default Save: ';
$lang->doc->position = 'Position';
$lang->doc->person = 'Person';
$lang->doc->team = 'Team';
$lang->doc->manage = 'Document Management';
$lang->doc->moduleDoc = 'By Module';
$lang->doc->searchDoc = 'Search';
+1
View File
@@ -125,6 +125,7 @@ $lang->doc->defaultSave = 'Default Save: ';
$lang->doc->position = 'Position';
$lang->doc->person = 'Person';
$lang->doc->team = 'Team';
$lang->doc->manage = 'Document Management';
$lang->doc->moduleDoc = 'Par Module';
$lang->doc->searchDoc = 'Rechercher';
+2 -1
View File
@@ -125,6 +125,7 @@ $lang->doc->defaultSave = '默认存入:';
$lang->doc->position = '所在位置';
$lang->doc->person = '个人';
$lang->doc->team = '团队';
$lang->doc->manage = '文档管理';
$lang->doc->moduleDoc = '按模块浏览';
$lang->doc->searchDoc = '搜索';
@@ -341,7 +342,7 @@ $lang->doc->noticeAcl['doc']['private'] = '只有创建者自己可以访问。'
$lang->doc->placeholder = new stdclass();
$lang->doc->placeholder->url = '相应的链接地址';
$lang->doc->placeholder->execution = '执行为空时,创建文件在项目库下';
$lang->doc->placeholder->execution = '执行为空时,创建文档在项目库下';
$lang->doc->summary = "本页共 <strong>%s</strong> 个附件,共计 <strong>%s</strong>,其中<strong>%s</strong>。";
$lang->doc->ge = '个';
+41 -59
View File
@@ -386,11 +386,6 @@ class docModel extends model
$allLibIDList = array_keys($allLibs);
$hasPrivDocIdList = $this->getPrivDocs(0, $moduleID);
$files = $this->dao->select('*')->from(TABLE_FILE)
->where('objectType')->eq('doc')
->andWhere('objectID')->in($hasPrivDocIdList)
->fetchGroup('objectID');
if($browseType == "all")
{
$docs = $this->getDocs(0, 0, $browseType, $sort, $pager);
@@ -422,13 +417,14 @@ class docModel extends model
->andWhere('actor')->eq($this->app->user->account)
->andWhere('action')->eq('edited')
->fetchAll('objectID');
$docs = $this->dao->select('*')->from(TABLE_DOC)
->where('deleted')->eq(0)
$docs = $this->dao->select('t1.*, t2.name as libName, t2.type as objectType')->from(TABLE_DOC)->alias('t1')
->leftJoin(TABLE_DOCLIB)->alias('t2')->on("t1.lib=t2.id")
->where('t1.deleted')->eq(0)
->andWhere($query)
->andWhere('lib')->in($allLibIDList)
->beginIF($this->config->doc->notArticleType)->andWhere('type')->notIN($this->config->doc->notArticleType)->fi()
->andWhere('addedBy', 1)->eq($this->app->user->account)
->orWhere('id')->in(array_keys($docIDList))
->andWhere('t1.lib')->in($allLibIDList)
->beginIF($this->config->doc->notArticleType)->andWhere('t1.type')->notIN($this->config->doc->notArticleType)->fi()
->andWhere('t1.addedBy', 1)->eq($this->app->user->account)
->orWhere('t1.id')->in(array_keys($docIDList))
->markRight(1)
->orderBy($sort)
->page($pager)
@@ -436,12 +432,13 @@ class docModel extends model
}
elseif($browseType == "openedbyme")
{
$docs = $this->dao->select('*')->from(TABLE_DOC)
->where('deleted')->eq(0)
->andWhere('lib')->in($allLibIDList)
->andWhere('id')->in($hasPrivDocIdList)
->beginIF($this->config->doc->notArticleType)->andWhere('type')->notIN($this->config->doc->notArticleType)->fi()
->andWhere('addedBy')->eq($this->app->user->account)
$docs = $this->dao->select('t1.*, t2.name as libName, t2.type as objectType')->from(TABLE_DOC)->alias('t1')
->leftJoin(TABLE_DOCLIB)->alias('t2')->on("t1.lib=t2.id")
->where('t1.deleted')->eq(0)
->andWhere('t1.lib')->in($allLibIDList)
->andWhere('t1.id')->in($hasPrivDocIdList)
->beginIF($this->config->doc->notArticleType)->andWhere('t1.type')->notIN($this->config->doc->notArticleType)->fi()
->andWhere('t1.addedBy')->eq($this->app->user->account)
->orderBy($sort)
->page($pager)
->fetchAll('id');
@@ -454,11 +451,13 @@ class docModel extends model
->andWhere('objectID')->in($hasPrivDocIdList)
->andWhere('action')->eq('edited')
->fetchAll('objectID');
$docs = $this->dao->select('*')->from(TABLE_DOC)
->where('deleted')->eq(0)
->andWhere('id')->in(array_keys($docIDList))
->andWhere('lib')->in($allLibIDList)
->beginIF($this->config->doc->notArticleType)->andWhere('type')->notIN($this->config->doc->notArticleType)->fi()
$docs = $this->dao->select('t1.*, t2.name as libName, t2.type as objectType')->from(TABLE_DOC)->alias('t1')
->leftJoin(TABLE_DOCLIB)->alias('t2')->on("t1.lib=t2.id")
->where('t1.deleted')->eq(0)
->andWhere('t1.id')->in(array_keys($docIDList))
->andWhere('t1.lib')->in($allLibIDList)
->beginIF($this->config->doc->notArticleType)->andWhere('t1.type')->notIN($this->config->doc->notArticleType)->fi()
->orderBy($sort)
->page($pager)
->fetchAll('id');
@@ -490,44 +489,27 @@ class docModel extends model
if(empty($docs)) return array();
/* Get projects, executions and products by docIdList. */
$docContents = $this->dao->select('*')->from(TABLE_DOCCONTENT)->where('doc')->in(array_keys($docs))->orderBy('version,doc')->fetchAll('doc');
foreach($docs as $index => $doc)
if(in_array($browseType, array('bySearch', 'openedbyme', 'editedbyme')))
{
$docs[$index]->fileSize = 0;
if(isset($files[$index]))
$objects = array();
list($objects['project'], $objects['execution'], $objects['product']) = $this->getObjectsByDoc(array_keys($docs));
foreach($docs as $docID => $doc)
{
$docContent = $docContents[$index];
$fileSize = 0;
foreach($files[$index] as $file)
$doc->objectID = zget($doc, $doc->objectType, 0);
$doc->objectName = '';
if(isset($objects[$doc->objectType]))
{
if(strpos(",{$docContent->files},", ",{$file->id},") === false) continue;
$fileSize += $file->size;
}
if($fileSize < 1024)
{
$fileSize .= 'B';
}
elseif($fileSize < 1024 * 1024)
{
$fileSize = round($fileSize / 1024, 2) . 'KB';
}
elseif($fileSize < 1024 * 1024 * 1024)
{
$fileSize = round($fileSize / 1024 / 1024, 2) . 'MB';
$doc->objectName = $objects[$doc->objectType][$doc->objectID];
}
else
{
$fileSize = round($fileSize / 1024 / 1024 / 1024, 2) . 'G';
if($doc->objectType == 'mine') $doc->objectName = $this->lang->doc->person;
if($doc->objectType == 'custom') $doc->objectName = $this->lang->doc->team;
}
$docs[$index]->fileSize = $fileSize;
}
}
$docs = $this->processCollector($docs);
return $docs;
return $this->processCollector($docs);
}
/**
@@ -666,7 +648,7 @@ class docModel extends model
->andWhere('t2.actor')->eq($this->app->user->account)
->beginIF(!common::hasPriv('doc', 'productSpace'))->andWhere('t3.type')->ne('product')->fi()
->beginIF(!common::hasPriv('doc', 'projectSpace'))->andWhere('t3.type')->notIN('project,execution')->fi()
->beginIF(!common::hasPriv('doc', 'tableContents'))->andWhere('t3.type')->ne('custom')->fi()
->beginIF(!common::hasPriv('doc', 'teamSpace'))->andWhere('t3.type')->ne('custom')->fi()
->beginIF($browseType == 'all' or $browseType == 'bysearch')->andWhere("(t1.status = 'normal' or (t1.status = 'draft' and t1.addedBy='{$this->app->user->account}'))")->fi()
->beginIF($browseType == 'draft')->andWhere('t1.status')->eq('draft')->andWhere('t1.addedBy')->eq($this->app->user->account)->fi()
->beginIF($browseType == 'bysearch')->andWhere($query)->fi()
@@ -686,7 +668,7 @@ class docModel extends model
->andWhere('t1.addedBy')->eq($this->app->user->account)
->beginIF(!common::hasPriv('doc', 'productSpace'))->andWhere('t2.type')->ne('product')->fi()
->beginIF(!common::hasPriv('doc', 'projectSpace'))->andWhere('t2.type')->notIN('project,execution')->fi()
->beginIF(!common::hasPriv('doc', 'tableContents'))->andWhere('t2.type')->ne('custom')->fi()
->beginIF(!common::hasPriv('doc', 'teamSpace'))->andWhere('t2.type')->ne('custom')->fi()
->beginIF($browseType == 'draft')->andWhere('t1.status')->eq('draft')->andWhere('t1.addedBy')->eq($this->app->user->account)->fi()
->beginIF($browseType == 'bysearch')->andWhere($query)->fi()
->orderBy($orderBy)
@@ -1093,7 +1075,7 @@ class docModel extends model
$products = $this->product->getPairs();
$this->config->doc->search['params']['project']['values'] = array('' => '') + $this->loadModel('project')->getPairsByProgram('', 'all', false, 'order_asc', 'kanban') + array('all' => $this->lang->doc->allProjects);
$this->config->doc->search['params']['execution']['values'] = array('' => '') + $this->loadModel('execution')->getPairs(0, 'sprint,stage', 'multiple,leaf,noprefix') + array('all' => $this->lang->doc->allExecutions);
$this->config->doc->search['params']['execution']['values'] = array('' => '') + $this->loadModel('execution')->getPairs(0, 'sprint,stage', 'multiple,leaf,noprefix,withobject') + array('all' => $this->lang->doc->allExecutions);
$this->config->doc->search['params']['lib']['values'] = array('' => '') + $this->loadModel('doc')->getLibs('all', 'withObject') + array('all' => $this->lang->doclib->all);
$this->config->doc->search['params']['product']['values'] = array('' => '') + $products + array('all' => $this->lang->doc->allProduct);
@@ -2519,12 +2501,12 @@ class docModel extends model
foreach($moduleDocs[0] as $doc)
{
if(!$docID and $currentMethod != 'tablecontents') $docID = $doc->id;
if(!$docID and $currentMethod != 'teamspace') $docID = $doc->id;
$class = common::hasPriv('doc', 'updateOrder') ? ' sortDoc' : '';
$treeMenu[0] .= '<li' . " class='" . ($doc->id == $docID ? 'active' : 'doc') . "$class'" . " data-id=$doc->id>";
if($currentMethod == 'tablecontents')
if($currentMethod == 'teamspace')
{
$treeMenu[0] .= '<div class="tree-group"><span class="tail-info">' . zget($users, $doc->editedBy) . ' &nbsp;' . $doc->editedDate . '</span>';
}
@@ -2596,11 +2578,11 @@ class docModel extends model
}
else
{
if(!$docID and $currentMethod != 'tablecontents') $docID = $doc->id;
if(!$docID and $currentMethod != 'teamspace') $docID = $doc->id;
$class = common::hasPriv('doc', 'updateOrder') ? ' sortDoc' : '';
$treeMenu[$module->id] .= '<li' . " class='" . ($doc->id == $docID ? 'active' : 'doc') . "$class'" . " data-id=$doc->id>";
if($currentMethod == 'tablecontents')
if($currentMethod == 'teamspace')
{
$treeMenu[$module->id] .= '<div class="tree-group"><span class="tail-info">' . zget($users, $doc->editedBy) . ' &nbsp;' . $doc->editedDate . '</span>';
}
@@ -2618,7 +2600,7 @@ class docModel extends model
}
$treeMenu[$module->id] .= '</div>';
}
elseif($currentMethod == 'tablecontents')
elseif($currentMethod == 'teamspace')
{
$class = common::hasPriv('doc', 'updateOrder') ? 'sortDoc' : '';
$treeMenu[$module->id] .= html::a(inlink('view', "docID={$doc->id}"), "<i class='icon icon-file-text text-muted'></i> &nbsp;" . $doc->title, '', "data-app='{$this->app->tab}' class='doc-title $class' title='{$doc->title}'");
@@ -2642,7 +2624,7 @@ class docModel extends model
{
$moduleClass = common::hasPriv('tree', 'updateOrder') ? 'sort-module' : '';
$li = "<div class='tree-group'><span class='module-name'><a class='$moduleClass' title='{$module->name}'>" . $module->name . '</a></span>';
if($currentMethod != 'tablecontents')
if($currentMethod != 'teamspace')
{
if(common::hasPriv('tree', 'edit') or common::hasPriv('tree', 'browse') or common::hasPriv('tree', 'browse') or common::hasPriv('tree', 'updateOrder'))
{
+1 -2
View File
@@ -71,7 +71,7 @@
<td class='required'><?php echo html::select('project', $objects, isset($execution) ? $execution->project : $objectID, "class='form-control picker-select' onchange=loadExecutions(this.value)");?></td>
<?php if($this->app->tab == 'doc' and $config->vision == 'rnd'):?>
<th><?php echo $lang->doc->execution?></th>
<td id='executionBox'><?php echo html::select('execution', $executions, isset($execution) ? $objectID : '', "class='form-control chosen' data-placeholder='{$lang->doc->placeholder->execution}' onchange='loadObjectModules(\"execution\", this.value)'")?></td>
<td id='executionBox'><?php echo html::select('execution', $executions, isset($execution) ? $objectID : '', "class='form-control chosen' onchange='loadObjectModules(\"execution\", this.value)'")?></td>
<td class='pl-0px'><i class='icon icon-help' title='<?php echo $lang->doc->placeholder->execution;?>'></i></td>
<?php endif;?>
</tr>
@@ -150,7 +150,6 @@
<?php js::set('textType', $config->doc->textTypes);?>
<?php js::set('docType', $docType);?>
<?php js::set('objectType', $objectType);?>
<?php js::set('holders', $lang->doc->placeholder);?>
<?php js::set('type', 'doc');?>
<?php js::set('requiredFields', ',' . $config->doc->create->requiredFields . ',');?>
<?php js::set('libNotEmpty', sprintf($lang->error->notempty, $lang->doc->lib));?>
+1 -2
View File
@@ -20,7 +20,7 @@ body {margin-bottom: 25px;}
#docListForm .checkbox-primary > label {height: 16px; line-height: 16px; padding-left: 16px;}
#docListForm .checkbox-primary > label:before {left: -1px; font-size: 10px;}
#docListForm .checkbox-primary > label:after {width: 12px; height: 12px;}
.table-files .btn {padding: 0 2px;}
.table-files .btn {padding: 2px;}
</style>
<?php if(common::checkNotCN()):?>
<style>
@@ -42,7 +42,6 @@ body {margin-bottom: 25px;}
</div>
<?php else:?>
<?php $vars = "objectID=$objectID&$libID=$libID&moduleID=$moduleID&browseType=$browseType&orderBy=%s&param=$param&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
<?php if($app->rawMethod == 'tablecontents') $vars = "type=$type&" . $vars;?>
<div>
<form class='main-table' method='post' id='docListForm'>
<table class="table table-files has-sort-head">
-1
View File
@@ -148,7 +148,6 @@ $(function()
<?php js::set('confirmUpdateContent', $lang->doc->confirmUpdateContent);?>
<?php js::set('docID', $doc->id);?>
<?php js::set('draft', $doc->draft);?>
<?php js::set('holders', $lang->doc->placeholder);?>
<?php js::set('type', 'doc');?>
<?php js::set('defaultSave', $lang->doc->defaultSave);?>
<?php js::set('titleNotEmpty', sprintf($lang->error->notempty, $lang->doc->title));?>
+8 -6
View File
@@ -24,8 +24,8 @@
.tree-icon {position: absolute; right: 0;}
.tree li.has-input {overflow: hidden;}
.tree li.has-input > input.input-bro {margin-left: 15px;}
.img-lib {flex: 0 0 14px; height: 14px; margin-right: 5px; margin-bottom: 5px;}
.file-icon {width: 14px;}
.img-lib {flex: 0 0 14px; height: 14px; margin-right: 5px; margin-bottom: 2px;}
.file-icon {width: 14px; margin-bottom: 4px;}
.tree-icon {position: absolute; right: 0;}
.tree li > a {max-width: 100%; padding: 2px;}
.file-tree a.show-icon > div,
@@ -543,7 +543,8 @@ $(function()
$rootDom.after($input);
$li.addClass('open in has-list');
}
$rootDom.parent().find('input').focus();
$input = $rootDom.parent().find('input');
$input.focus();
break;
case 'addCataBro' :
moduleData.createType = 'same';
@@ -551,7 +552,8 @@ $(function()
var $rootDom = $('#fileTree li[data-id=' + item.id + ']');
$rootDom.after($input);
$rootDom.closest('ul').find('.has-input').css('padding-left', '0');
$('#fileTree').find('input').addClass('input-bro').focus();
$input = $('#fileTree').find('input').addClass('input-bro');
$input.focus();
break;
case 'addCataChild' :
moduleData.parentID = item.id;
@@ -569,9 +571,9 @@ $(function()
moduleData.isUpdate = true;
$rootDom.addClass('open in has-list');
}
$rootDom.append($input);
$rootDom.find('input').focus();
$input = $rootDom.find('input');
$input.focus();
break;
}
}).on('click', '#versionSwitcher a', function()
+1 -1
View File
@@ -19,7 +19,7 @@ body {margin-bottom: 25px;}
#docListForm .table .c-name > .doc-title {display: inline-block; max-width: calc(100% - 80px); overflow: hidden; background: transparent; padding-right:0px;}
#docListForm .table .c-name > span.doc-title {line-height: 0; vertical-align: inherit;}
#docListForm .table .c-name > .draft {background-color:rgba(129, 102, 238, 0.12); color:#8166EE;}
#docListForm .table .c-name > .ajaxCollect {float: right; position: relative; right: 10px; top: 0px;}
#docListForm .table .c-name > .ajaxCollect {float: right; position: relative; right: 10px; top: 0px; padding: 0 6px;}
#docListForm table.table > thead > tr {height: 32px;}
#docListForm .checkbox-primary {line-height: 16px;}
#docListForm table .checkbox-primary {top: -2px;}
+2 -2
View File
@@ -36,7 +36,7 @@
<th><?php echo $lang->doc->project;?></th>
<td class='required'><?php echo html::select('project', $projects, key($projects), "class='form-control picker-select'");?></td>
<th class='executionTH'><?php echo $lang->doc->execution?></th>
<td id='executionBox'><?php echo html::select('execution', array(), '', "class='form-control picker-select' data-placeholder='{$lang->doc->placeholder->execution}' onchange='loadObjectModules(\"execution\", this.value)'")?></td>
<td id='executionBox'><?php echo html::select('execution', array(), '', "class='form-control picker-select' onchange='loadObjectModules(\"execution\", this.value)'")?></td>
<td class='executionHelp pl-0px'><i class='icon icon-help' title='<?php echo $lang->doc->placeholder->execution;?>'></i></td>
</tr>
<tr class='productTR hidden'>
@@ -53,7 +53,6 @@
</table>
</form>
</div>
<?php js::set('holders', $lang->doc->placeholder);?>
<script>
$(function(){changeSpace()});
@@ -73,6 +72,7 @@ function changeSpace()
$('#typeapi').toggleClass('hidden', space == 'mine' || space == 'custom');
$('#typedoc').closest('.radio-inline').toggleClass('hidden', space == 'api');
$('#typeapi').closest('.radio-inline').toggleClass('hidden', space == 'mine' || space == 'custom');
$('#docType').toggleClass('hidden', $('#docType [name=type]:not(.hidden)').length == 1);
var docType = $('[name=type]:not(.hidden):checked').val();
if(space == 'project' && docType) $('#project').change();
+1 -1
View File
@@ -22,7 +22,7 @@
<?php if($libType != 'api'):?>
<?php foreach($lang->doc->featureBar['tableContents'] as $barType => $barName):?>
<?php $active = $barType == $browseType ? 'btn-active-text' : '';?>
<?php $linkParams = $app->rawMethod == 'tablecontents' ? "type=$type&objectID=$objectID&libID=$libID&moduleID=$moduleID&browseType=$barType": "objectID=$objectID&libID=$libID&moduleID=$moduleID&browseType=$barType";?>
<?php $linkParams = "objectID=$objectID&libID=$libID&moduleID=$moduleID&browseType=$barType";?>
<?php echo html::a($this->createLink('doc', $app->rawMethod, $linkParams), "<span class='text'>{$barName}</span>" . ($active ? " <span class='label label-light label-badge'>{$pager->recTotal}</span>" : ''), '', "class='btn btn-link $active' id='{$barType}Tab'");?>
<?php endforeach;?>
<?php endif;?>
+3 -3
View File
@@ -1829,7 +1829,7 @@ class execution extends control
if($this->app->tab == 'doc')
{
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('doc', 'objectLibs', "type=execution")));
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('doc', 'projectSpace', "objectID=$executionID")));
}
if(!empty($projectID) and strpos(',kanban,agileplus,waterfallplus,', ",$project->model,") !== false)
@@ -4181,9 +4181,9 @@ class execution extends control
* @access public
* @return void
*/
public function doc($executionID)
public function doc($executionID, $libID = 0, $moduleID = 0, $browseType = 'all', $orderBy = 'status,id_desc', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$this->locate($this->createLink('doc', 'objectLibs', "type=execution&objectID=$executionID&from=execution"));
echo $this->fetch('doc', 'tableContents', "type=execution&objectID=$executionID&libID=$libID&moduleID=$moduleID&browseType=$browseType&orderBy=$orderBy&param=$param&recTotal=$recTotal&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
}
/**
-4
View File
@@ -2212,10 +2212,6 @@ class executionModel extends model
{
$link = helper::createLink('doc', $method, "type=execution&objectID=%s&from=execution");
}
elseif($module == 'api')
{
$link = helper::createLink('doc', 'tableContents', "type=execution&objectID=%s&from=execution");
}
elseif(in_array($module, array('issue', 'risk', 'opportunity', 'pssp', 'auditplan', 'nc', 'meeting')))
{
$link = helper::createLink($module, 'browse', "executionID=%s&from=execution");
+4 -4
View File
@@ -128,15 +128,15 @@
<div class="panel block-docs" style="height: 240px">
<div class="panel-heading">
<div class="panel-title"><?php echo $lang->execution->doclib;?></div>
<?php if(common::hasPriv('doc', 'objectLibs')):?>
<?php if(common::hasPriv('execution', 'doc')):?>
<nav class="panel-actions nav nav-default">
<li><?php common::printLink('doc', 'objectLibs', "type=execution&executionID=$execution->id&from=execution", strtoupper($lang->more), '', "title=$lang->more");?></li>
<li><?php common::printLink('execution', 'doc', "executionID=$execution->id", strtoupper($lang->more), '', "title=$lang->more");?></li>
</nav>
<?php endif;?>
</div>
<div class="panel-body">
<div class="row row-grid">
<?php if(common::hasPriv('doc', 'objectLibs')):?>
<?php if(common::hasPriv('execution', 'doc')):?>
<?php $i = 0;?>
<?php foreach($docLibs as $libID => $docLib):?>
<?php if($i > 8) break;?>
@@ -144,7 +144,7 @@
<?php if($libID == 'files'):?>
<?php echo html::a($this->createLink('doc', 'showFiles', "type=execution&objectID=$execution->id"), "<i class='icon icon-folder text-yellow'></i> " . $docLib->name);?>
<?php else:?>
<?php echo html::a($this->createLink('doc', 'objectLibs', "type=execution&objectID={$execution->id}&libID=$libID"), "<i class='icon icon-folder text-yellow'></i> " . $docLib->name, '', "data-app='execution' title='$docLib->name'");?>
<?php echo html::a($this->createLink('execution', 'doc', "objectID={$execution->id}&libID=$libID"), "<i class='icon icon-folder text-yellow'></i> " . $docLib->name, '', "data-app='execution' title='$docLib->name'");?>
<?php endif;?>
</div>
<?php $i++;?>
+2 -2
View File
@@ -1387,7 +1387,7 @@ $lang->resource->doc->deleteFile = 'deleteFile';
$lang->resource->doc->collect = 'collectAction';
$lang->resource->doc->productSpace = 'productSpace';
$lang->resource->doc->projectSpace = 'projectSpace';
$lang->resource->doc->tableContents = 'teamSpace';
$lang->resource->doc->teamSpace = 'teamSpace';
$lang->resource->doc->showFiles = 'showFiles';
$lang->resource->doc->addCatalog = 'addCatalog';
$lang->resource->doc->editCatalog = 'editCatalog';
@@ -1410,7 +1410,7 @@ $lang->doc->methodOrder[65] = 'deleteFile';
$lang->doc->methodOrder[70] = 'collect';
$lang->doc->methodOrder[75] = 'productSpace';
$lang->doc->methodOrder[80] = 'projectSpace';
$lang->doc->methodOrder[85] = 'tableContents';
$lang->doc->methodOrder[85] = 'teamSpace';
$lang->doc->methodOrder[90] = 'showFiles';
$lang->doc->methodOrder[95] = 'addCatalog';
$lang->doc->methodOrder[100] = 'editCatalog';
+3 -1
View File
@@ -108,7 +108,9 @@
<th class='text-middle text-right thWidth'>
<div class="checkbox-primary checkbox-inline checkbox-right check-all">
<input type='checkbox' id='allChecker<?php echo $moduleName;?>'>
<label class='text-right' for='allChecker<?php echo $moduleName;?>'><?php echo $lang->$moduleName->common;?></label>
<?php $moduleTitle = $lang->$moduleName->common;?>
<?php if(in_array($moduleName, array('doc', 'api'))) $moduleTitle = $lang->$moduleName->manage;?>
<label class='text-right' for='allChecker<?php echo $moduleName;?>'><?php echo $moduleTitle;?></label>
</div>
</th>
<?php if(isset($lang->$moduleName->menus)):?>
+11
View File
@@ -1,2 +1,13 @@
body {margin-bottom: 25px;}
.fullscreen-close {top: 8px !important;}
#docList.table .c-name > .ajaxCollect {float: right; position: relative; right: 10px; top: 0px;}
#docList th.c-id {width: 72px;}
#docList th.c-user {width: 80px;}
#docList th.c-actions {width: 84px; padding-left: 15px;}
#docList .c-object {width: 120px; overflow: hidden; white-space: nowrap; text-overflow: clip;}
#docList.table .c-name > .doc-title {display: inline-block; max-width: calc(100% - 80px); overflow: hidden; background: transparent; padding-right:0px;}
#docList.table .c-name > span.doc-title {line-height: 0; vertical-align: inherit;}
#docList.table .c-name > .draft {background-color:rgba(129, 102, 238, 0.12); color:#8166EE;}
#docList .btn {padding: 0 2px;}
.btn.ajaxCollect {width: 20px; padding: 0 6px;}
.btn.ajaxCollect > img {width: 20px;}
+29 -21
View File
@@ -34,23 +34,22 @@
</div>
<?php else:?>
<div class="cell<?php if($type == 'bySearch') echo ' show';?>" id="queryBox" data-module=<?php echo 'contributeDoc';?>></div>
<form id='projectForm' class="main-table" method='post' data-ride='table' data-checkable='false'>
<form id='docForm' class="main-table" method='post' data-ride='table'>
<table class='table table-fixed' id='docList'>
<thead>
<tr>
<th class="c-id"><?php echo $lang->doc->id;?></th>
<th class="c-name"><?php echo $lang->doc->title;?></th>
<th class="c-name c-object"><?php echo $lang->doc->object;?></th>
<th class="c-num"><?php echo $lang->doc->size;?></th>
<th class="c-object"><?php echo $lang->doc->object;?></th>
<?php if($type != 'openedbyme'):?>
<th class="c-user"><?php echo $lang->doc->addedByAB;?></th>
<?php endif;?>
<th class="c-datetime"><?php echo $lang->doc->addedDate;?></th>
<th class="c-date"><?php echo $lang->doc->addedDate;?></th>
<?php if($type == 'openedbyme'):?>
<th class="c-user"><?php echo $lang->doc->lastEditedBy;?></th>
<th class="c-user"><?php echo $lang->doc->editedBy;?></th>
<?php endif;?>
<th class="c-datetime"><?php echo $lang->doc->editedDate;?></th>
<th class="c-actions-3 text-center"><?php echo $lang->actions;?></th>
<th class="c-date"><?php echo $lang->doc->editedDate;?></th>
<th class="c-actions"><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody id='docTableList'>
@@ -59,29 +58,38 @@
<?php $collectTitle = strpos($doc->collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
<tr>
<td class="c-id"><?php echo $doc->id;?></td>
<td class="c-name"><?php echo html::a($this->createLink('doc', 'view', "docID=$doc->id&version=0&from={$lang->navGroup->doc}", '', true), "<i class='icon icon-file-text text-muted'></i> &nbsp;" . $doc->title, '', "title='{$doc->title}' class='iframe' data-width='90%'");?></td>
<td class='c-name'>
<?php if(!empty($doc->objectType)):?>
<?php echo $lang->{$doc->objectType}->common . ' : ';?>
<a title='<?php echo $doc->objectName;?>' href='<?php echo $this->createLink($doc->objectType, 'view', "objectID=$doc->objectID");?>' data-app="<?php echo $doc->objectType;?>">
<?php echo $doc->objectName;?>
</a>
<?php endif;?>
<td class="c-name" title='<?php echo $doc->title;?>'>
<?php
$docType = $doc->type == 'text' ? 'wiki-file' : $doc->type;
$icon = html::image("static/svg/{$docType}.svg", "class='file-icon'");
if(common::hasPriv('doc', 'view'))
{
echo html::a($this->createLink('doc', 'view', "docID=$doc->id"), $icon . $doc->title, '', "title='{$doc->title}' class='doc-title' data-app='doc'");
}
else
{
echo "<span class='doc-title'>$icon {$doc->title}</span>";
}
?>
<?php if($doc->status == 'draft') echo "<span class='label label-badge draft'>{$lang->doc->draft}</span>";?>
<?php if(common::canBeChanged('doc', $doc) and common::hasPriv('doc', 'collect')):?>
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$doc->id&objectType=doc");?>" title="<?php echo $collectTitle;?>" class='btn btn-link ajaxCollect'><?php echo html::image("static/svg/{$star}.svg", "class='$star'");?></a>
<?php endif;?>
</td>
<td class="c-object" title='<?php echo $doc->objectName;?>'>
<?php $objectIcon = zget($config->doc->objectIconList, $doc->objectType);?>
<?php echo "<i class='icon $objectIcon'></i> " . $doc->objectName;?>
</td>
<td class="c-num"><?php echo $doc->fileSize ? $doc->fileSize : '-';?></td>
<?php if($type != 'openedbyme'):?>
<td class="c-user"><?php echo zget($users, $doc->addedBy);?></td>
<?php endif;?>
<td class="c-datetime"><?php echo formatTime($doc->addedDate, 'y-m-d');?></td>
<td class="c-date"><?php echo formatTime($doc->addedDate, 'Y-m-d');?></td>
<?php if($type == 'openedbyme'):?>
<td class="c-user"><?php echo zget($users, $doc->editedBy);?></td>
<?php endif;?>
<td class="c-datetime"><?php echo formatTime($doc->editedDate, 'y-m-d');?></td>
<td class="c-date"><?php echo formatTime($doc->editedDate, 'Y-m-d');?></td>
<td class="c-actions">
<?php if(common::canBeChanged('doc', $doc)):?>
<?php if(common::hasPriv('doc', 'collect')):?>
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$doc->id&objectType=doc");?>" title="<?php echo $collectTitle;?>" class='btn btn-link ajaxCollect'><?php echo html::image("static/svg/{$star}.svg");?></a>
<?php endif;?>
<?php common::printLink('doc', 'edit', "docID=$doc->id&comment=false&from={$lang->navGroup->doc}", "<i class='icon icon-edit'></i>", '', "title='{$lang->edit}' class='btn btn-link' data-app='doc'", true, false)?>
<?php common::printLink('doc', 'delete', "docID=$doc->id&confirm=no&from={$lang->navGroup->doc}", "<i class='icon icon-trash'></i>", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?>
<?php endif;?>
+1 -1
View File
@@ -415,7 +415,7 @@ class product extends control
$methodName = $tab == 'program'? 'product' : 'browse';
$param = $tab == 'program' ? "programID=$programID" : "productID=$productID";
$locate = isonlybody() ? 'parent' : $this->createLink($moduleName, $methodName, $param);
if($tab == 'doc') $locate = $this->createLink('doc', 'objectLibs', 'type=product');
if($tab == 'doc') $locate = $this->createLink('doc', 'productSpace', "objectID=$productID");
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locate));
}
+2 -2
View File
@@ -197,7 +197,7 @@ $config->project->noSprintPriv['story'] = array('create', 'batchCreate', 'e
$config->project->noSprintPriv['bug'] = array('create', 'confirmBug', 'view', 'edit', 'assignTo', 'batchAssignTo', 'resolve', 'activate', 'close', 'export', 'confirmStoryChange', 'delete', 'linkBugs', 'import', 'showImport', 'exportTemplate');
$config->project->noSprintPriv['testcase'] = array('groupCase', 'create', 'batchCreate', 'createBug', 'view', 'edit', 'delete', 'export', 'confirmChange', 'confirmStoryChange', 'batchEdit', 'batchDelete', 'linkCases', 'bugs', 'review', 'batchReview', 'batchConfirmStoryChange', 'importFromLib', 'batchCaseTypeChange', 'exportTemplate', 'import', 'showImport', 'confirmLibcaseChange', 'ignoreLibcaseChange', 'submit');
$config->project->noSprintPriv['testtask'] = array('create', 'cases', 'groupCase', 'edit', 'delete', 'batchAssign', 'linkcase', 'unlinkcase', 'runcase', 'results', 'batchUnlinkCases', 'report', 'browseUnits', 'unitCases', 'importUnitResult', 'batchRun', 'runDeployCase', 'deployCaseResults');
$config->project->noSprintPriv['doc'] = array('createLib', 'editLib', 'deleteLib', 'create', 'edit', 'delete', 'deleteFile', 'allLibs', 'objectLibs', 'collect', 'tableContents', 'showFiles', 'diff', 'manageBook', 'importToPracticeLib', 'importToComponentLib');
$config->project->includedPriv['doc'] = array('createLib', 'editLib', 'deleteLib', 'create', 'edit', 'view', 'delete', 'deleteFile', 'collect', 'projectSpace', 'showFiles', 'addCatalog', 'editCatalog', 'deleteCatalog', 'displaySetting', 'diff', 'importToPracticeLib', 'importToComponentLib');
$config->project->noSprintPriv['repo'] = array('create', 'showSyncCommit', 'browse', 'view', 'diff', 'log', 'revision', 'blame', 'download', 'apiGetRepoByUrl', 'review', 'addBug', 'editBug', 'deleteBug', 'addComment', 'editComment', 'deleteComment');
$config->project->noSprintPriv['testreport'] = array('create', 'view', 'delete', 'edit', 'export');
$config->project->noSprintPriv['auditplan'] = array('browse', 'create', 'edit', 'batchCreate', 'batchCheck', 'check', 'nc', 'result', 'assignTo');
@@ -209,7 +209,7 @@ $config->project->includedPriv['story'] = array('create', 'batchCreate', 'e
$config->project->includedPriv['bug'] = array('create', 'confirmBug', 'view', 'edit', 'assignTo', 'batchAssignTo', 'resolve', 'activate', 'close', 'export', 'confirmStoryChange', 'delete', 'linkBugs', 'import', 'showImport', 'exportTemplate');
$config->project->includedPriv['testcase'] = array('groupCase', 'create', 'batchCreate', 'createBug', 'view', 'edit', 'delete', 'export', 'confirmChange', 'confirmStoryChange', 'batchEdit', 'batchDelete', 'linkCases', 'bugs', 'review', 'batchReview', 'batchConfirmStoryChange', 'importFromLib', 'batchCaseTypeChange', 'exportTemplate', 'import', 'showImport', 'confirmLibcaseChange', 'ignoreLibcaseChange', 'submit');
$config->project->includedPriv['testtask'] = array('create', 'cases', 'groupCase', 'edit', 'delete', 'batchAssign', 'linkcase', 'unlinkcase', 'runcase', 'results', 'batchUnlinkCases', 'report', 'browseUnits', 'unitCases', 'importUnitResult', 'batchRun', 'runDeployCase', 'deployCaseResults');
$config->project->includedPriv['doc'] = array('createLib', 'editLib', 'deleteLib', 'create', 'edit', 'delete', 'deleteFile', 'allLibs', 'objectLibs', 'collect', 'tableContents', 'showFiles', 'diff', 'manageBook', 'importToPracticeLib', 'importToComponentLib');
$config->project->includedPriv['doc'] = array('createLib', 'editLib', 'deleteLib', 'create', 'edit', 'view', 'delete', 'deleteFile', 'collect', 'projectSpace', 'showFiles', 'addCatalog', 'editCatalog', 'deleteCatalog', 'displaySetting', 'diff', 'importToPracticeLib', 'importToComponentLib');
$config->project->includedPriv['repo'] = array('create', 'showSyncCommit', 'browse', 'view', 'diff', 'log', 'revision', 'blame', 'download', 'apiGetRepoByUrl', 'review', 'addBug', 'deleteBug', 'addComment', 'editComment', 'deleteComment');
$config->project->includedPriv['testreport'] = array('create', 'view', 'delete', 'edit', 'export');
$config->project->includedPriv['auditplan'] = array('browse', 'create', 'edit', 'batchCreate', 'batchCheck', 'check', 'nc', 'result', 'assignTo');