Merge branch 'cyy_fixbug' into 'master'
Cyy fixbug See merge request easycorp/zentaopms!7482
This commit is contained in:
+14
-12
@@ -224,24 +224,26 @@ $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->default->cookie['docSpaceParam'] = 'string';
|
||||
$filter->doc->showfiles->cookie['docFilesViewType'] = 'code';
|
||||
$filter->doc->tablecontents->cookie['preProductID'] = 'int';
|
||||
$filter->doc->tablecontents->cookie['preBranch'] = 'reg::word';
|
||||
$filter->doc->productspace->cookie['pagerDocTablecontents'] = 'int';
|
||||
$filter->doc->projectspace->cookie['pagerDocTablecontents'] = 'int';
|
||||
|
||||
$filter->api->default->cookie['objectType'] = 'string';
|
||||
$filter->api->default->cookie['objectID'] = 'int';
|
||||
$filter->api->index->get['libID'] = 'int';
|
||||
$filter->api->index->get['module'] = 'int';
|
||||
$filter->api->index->get['apiID'] = 'int';
|
||||
$filter->api->index->get['version'] = 'int';
|
||||
$filter->api->create->get['libID'] = 'int';
|
||||
$filter->api->create->get['module'] = 'int';
|
||||
$filter->api->create->get['apiID'] = 'int';
|
||||
$filter->api->edit->get['libID'] = 'int';
|
||||
$filter->api->edit->get['module'] = 'int';
|
||||
$filter->api->edit->get['apiID'] = 'int';
|
||||
$filter->api->default->cookie['objectType'] = 'string';
|
||||
$filter->api->default->cookie['objectID'] = 'int';
|
||||
$filter->api->default->cookie['docSpaceParam'] = 'string';
|
||||
$filter->api->index->get['libID'] = 'int';
|
||||
$filter->api->index->get['module'] = 'int';
|
||||
$filter->api->index->get['apiID'] = 'int';
|
||||
$filter->api->index->get['version'] = 'int';
|
||||
$filter->api->create->get['libID'] = 'int';
|
||||
$filter->api->create->get['module'] = 'int';
|
||||
$filter->api->create->get['apiID'] = 'int';
|
||||
$filter->api->edit->get['libID'] = 'int';
|
||||
$filter->api->edit->get['module'] = 'int';
|
||||
$filter->api->edit->get['apiID'] = 'int';
|
||||
|
||||
$filter->file->download->cookie[$config->sessionVar] = 'code';
|
||||
|
||||
|
||||
@@ -769,7 +769,7 @@ $lang->action->label->risk = 'Risk|risk|view|riskID=%s';
|
||||
$lang->action->label->issue = 'Issue|issue|view|issueID=%s';
|
||||
$lang->action->label->design = 'Design|design|view|designID=%s';
|
||||
$lang->action->label->stakeholder = 'Stakeholder|stakeholder|view|userID=%s';
|
||||
$lang->action->label->api = 'Interface|api|index|libID=%s&moduleID=%s&apiID=%s';
|
||||
$lang->action->label->api = 'Interface|api|view|libID=%s&apiID=%s&moduleID=%s';
|
||||
$lang->action->label->kanbanspace = 'Kanban Space|kanban|space|browseType=%s';
|
||||
$lang->action->label->kanbanregion = 'Kanban Region|kanban|view|kanbanID=%s';
|
||||
$lang->action->label->kanban = 'Kanban|kanban|view|kanbanID=%s';
|
||||
|
||||
@@ -769,7 +769,7 @@ $lang->action->label->risk = 'Risk|risk|view|riskID=%s';
|
||||
$lang->action->label->issue = 'Issue|issue|view|issueID=%s';
|
||||
$lang->action->label->design = 'Design|design|view|designID=%s';
|
||||
$lang->action->label->stakeholder = 'Stakeholder|stakeholder|view|userID=%s';
|
||||
$lang->action->label->api = 'Interface|api|index|libID=%s&moduleID=%s&apiID=%s';
|
||||
$lang->action->label->api = 'Interface|api|view|libID=%s&apiID=%s&moduleID=%s';
|
||||
$lang->action->label->kanbanspace = 'Kanban Space|kanban|space|browseType=%s';
|
||||
$lang->action->label->kanbanregion = 'Kanban Region|kanban|view|kanbanID=%s';
|
||||
$lang->action->label->kanban = 'Kanban|kanban|view|kanbanID=%s';
|
||||
|
||||
@@ -769,7 +769,7 @@ $lang->action->label->risk = 'Risk|risk|view|riskID=%s';
|
||||
$lang->action->label->issue = 'Issue|issue|view|issueID=%s';
|
||||
$lang->action->label->design = 'Design|design|view|designID=%s';
|
||||
$lang->action->label->stakeholder = 'Stakeholder|stakeholder|view|userID=%s';
|
||||
$lang->action->label->api = 'Interface|api|index|libID=%s&moduleID=%s&apiID=%s';
|
||||
$lang->action->label->api = 'Interface|api|view|libID=%s&apiID=%s&moduleID=%s';
|
||||
$lang->action->label->kanbanspace = 'Kanban Space|kanban|space|browseType=%s';
|
||||
$lang->action->label->kanbanregion = 'Kanban Region|kanban|view|kanbanID=%s';
|
||||
$lang->action->label->kanban = 'Kanban|kanban|view|kanbanID=%s';
|
||||
|
||||
@@ -770,7 +770,7 @@ $lang->action->label->risk = '风险|risk|view|riskID=%s';
|
||||
$lang->action->label->issue = '问题|issue|view|issueID=%s';
|
||||
$lang->action->label->design = '设计|design|view|designID=%s';
|
||||
$lang->action->label->stakeholder = '干系人|stakeholder|view|userID=%s';
|
||||
$lang->action->label->api = '接口|api|index|libID=%s&moduleID=%s&apiID=%s';
|
||||
$lang->action->label->api = '接口|api|view|libID=%s&apiID=%s&moduleID=%s';
|
||||
$lang->action->label->kanbanspace = '看板空间|kanban|space|browseType=%s';
|
||||
$lang->action->label->kanbanregion = '看板区域|kanban|view|kanbanID=%s';
|
||||
$lang->action->label->kanban = '看板|kanban|view|kanbanID=%s';
|
||||
|
||||
@@ -1621,7 +1621,7 @@ class actionModel extends model
|
||||
elseif($action->objectType == 'api')
|
||||
{
|
||||
$api = $this->dao->select('id,lib,module')->from(TABLE_API)->where('id')->eq($action->objectID)->fetch();
|
||||
$params = sprintf($vars, $api->lib, $api->module, $api->id);
|
||||
$params = sprintf($vars, $api->lib, $api->id, $api->module);
|
||||
}
|
||||
elseif($action->objectType == 'branch')
|
||||
{
|
||||
|
||||
@@ -24,6 +24,7 @@ $config->api->editor->createlib = array('id' => 'desc', 'tools' => 'simpleTo
|
||||
$config->api->editor->editlib = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->api->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->api->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->api->editor->view = array('id' => 'comment,lastComment', 'tools' => 'simple');
|
||||
$config->api->editor->createRelease = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->api->editor->createstruct = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->api->editor->editstruct = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
|
||||
+38
-16
@@ -41,8 +41,12 @@ class api extends control
|
||||
*/
|
||||
public function index($libID = 0, $moduleID = 0, $apiID = 0, $version = 0, $release = 0, $appendLib = 0, $browseType = '', $param = 0)
|
||||
{
|
||||
$this->session->set('spaceType', 'api', 'doc');
|
||||
$this->session->set('structList', $this->app->getURI(true), 'doc');
|
||||
if(!$apiID)
|
||||
{
|
||||
$this->session->set('spaceType', 'api', 'doc');
|
||||
$this->session->set('structList', inLink('index', "libID=$libID&moduleID=$moduleID"), 'doc');
|
||||
setCookie("docSpaceParam", '', $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
}
|
||||
|
||||
$this->setMenu($libID);
|
||||
$objectType = $this->objectType;
|
||||
@@ -144,14 +148,14 @@ class api extends control
|
||||
* @param int $libID
|
||||
* @param int $apiID
|
||||
* @param int $moduleID
|
||||
* @param int $release
|
||||
* @param int $version
|
||||
* @param int $release
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function view($libID, $apiID, $moduleID = 0, $release = 0, $version = 0)
|
||||
public function view($libID, $apiID, $moduleID = 0, $version = 0, $release = 0)
|
||||
{
|
||||
$this->setMenu($libID);
|
||||
if(!strpos($this->server->http_referer, 'space') and !strpos($this->server->http_referer, 'api')) setCookie("docSpaceParam", '', $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
|
||||
/* Get all api doc libraries. */
|
||||
$libs = $this->doc->getApiLibs($libID);
|
||||
@@ -180,24 +184,39 @@ class api extends control
|
||||
$linkParams = "libID=$lib->id";
|
||||
if($methodName != 'index') $linkParams = "objectID=$linkObject&$linkParams";
|
||||
|
||||
$crumbs[] = html::a(inLink($methodName, $linkParams), html::image("static/svg/interface.svg") . $lib->name);
|
||||
$moduleList = $this->loadModel('tree')->getParents($api->module);
|
||||
foreach($moduleList as $module)
|
||||
$objectID = $this->objectID;
|
||||
if($this->cookie->docSpaceParam)
|
||||
{
|
||||
$linkParams .= "&moduleID=$module->id";
|
||||
$crumbs[] = html::a(inLink($methodName, $linkParams), $module->name);
|
||||
}
|
||||
$docParam = json_decode($this->cookie->docSpaceParam);
|
||||
$type = $docParam->type;
|
||||
$objectID = $docParam->objectID;
|
||||
$libID = $docParam->libID;
|
||||
$moduleID = $docParam->moduleID;
|
||||
$browseType = $docParam->browseType;
|
||||
$param = $docParam->param;
|
||||
list($libs, $libID, $object, $objectID, $objectDropdown) = $this->doc->setMenuByType($type, $objectID, $libID);
|
||||
|
||||
$libTree = $this->doc->getLibTree($libID, $libs, $type, $moduleID, $objectID, $browseType, $param);
|
||||
}
|
||||
else
|
||||
{
|
||||
$objectDropdown = $this->generateLibsDropMenu($libs[$libID], $release);
|
||||
$libTree = $this->doc->getLibTree($libID, $libs, 'api', $moduleID);
|
||||
}
|
||||
$this->view->title = $this->lang->api->pageTitle;
|
||||
$this->view->libs = $libs;
|
||||
$this->view->isRelease = $release > 0;
|
||||
$this->view->release = $release;
|
||||
$this->view->version = $version;
|
||||
$this->view->libID = $libID;
|
||||
$this->view->apiID = $apiID;
|
||||
$this->view->crumbs = $crumbs;
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->objectType = $type;
|
||||
$this->view->type = $type;
|
||||
$this->view->objectID = $objectID;
|
||||
$this->view->users = $this->user->getPairs('noclosed,noletter');
|
||||
$this->view->moduleTree = $this->doc->getApiModuleTree($libID, $apiID, $release, $moduleID);
|
||||
$this->view->objectDropdown = $this->generateLibsDropMenu($libs[$libID], $release);
|
||||
$this->view->libTree = $libTree;
|
||||
$this->view->objectDropdown = $objectDropdown;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -653,7 +672,7 @@ class api extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
return print(js::locate(inlink('index', "libID=$api->lib&module=$api->module"), 'parent'));
|
||||
return print(js::locate($this->session->structList ? $this->session->structList : inlink('index', "libID=$api->lib&module=$api->module"), 'parent'));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -752,7 +771,10 @@ class api extends control
|
||||
$this->lang->doc->menu->api['exclude'] = 'api-' . $this->app->rawMethod;
|
||||
$this->lang->doc->menu->{$this->session->spaceType}['subModule'] = 'api';
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$this->lang->doc->menu->{$this->session->spaceType}['alias'] .= ',' . $this->app->rawMethod;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -163,3 +163,23 @@ form .table-data, #content .table-data {border: 1px solid #e2e2e3;}
|
||||
.info .version, .info .crumbs {float: left;}
|
||||
.info .crumbs {font-size: 13px; margin-top: 5px; font-weight: normal;}
|
||||
.info .crumbs img {margin-right: 3px;}
|
||||
|
||||
.lib {width: unset; margin-bottom: unset;}
|
||||
.flex {display: flex;}
|
||||
.flex-none {flex: none;}
|
||||
.flex-auto {flex: auto;}
|
||||
.flex-full > .panel {box-shadow: none;}
|
||||
.float-r {float: right;}
|
||||
.h-full {height: 100%;}
|
||||
.w-full {width: 100%;}
|
||||
.overflow-x-auto {overflow-x: auto;}
|
||||
.overflow-auto {overflow: auto;}
|
||||
.overflow-visible {overflow: visible;}
|
||||
.overflow-hidden {overflow: hidden;}
|
||||
.img-lib {width: 14px; height: 14px; margin-bottom: 2px; flex: 0 0 14px;}
|
||||
#mainContent {padding-top: 0; padding-bottom: 0;}
|
||||
#mainContent #createDropdown {display: inline-block;}
|
||||
#mainContent #createDropdown ul {position: absolute;}
|
||||
#pageNav .dropdown-menu {max-height: inherit;}
|
||||
#mainContent > .panel {margin-bottom: 0; height: calc(100vh - 125px); overflow-y: auto;}
|
||||
#mainContent > .main-col {padding-left: 0;}
|
||||
|
||||
@@ -1,24 +1,4 @@
|
||||
.lib {width: unset; margin-bottom: unset;}
|
||||
.flex {display: flex;}
|
||||
.flex-none {flex: none;}
|
||||
.flex-auto {flex: auto;}
|
||||
.flex-full > .panel {box-shadow: none;}
|
||||
.float-r {float: right;}
|
||||
.h-full {height: 100%;}
|
||||
.w-full {width: 100%;}
|
||||
.overflow-x-auto {overflow-x: auto;}
|
||||
.overflow-auto {overflow: auto;}
|
||||
.overflow-visible {overflow: visible;}
|
||||
.overflow-hidden {overflow: hidden;}
|
||||
.img-lib {width: 14px; height: 14px; margin-bottom: 2px; flex: 0 0 14px;}
|
||||
.cell {padding: 0;}
|
||||
#mainContent {padding-top: 0; padding-bottom: 0;}
|
||||
#mainContent #createDropdown {display: inline-block;}
|
||||
#mainContent #createDropdown ul {position: absolute;}
|
||||
#pageNav .dropdown-menu {max-height: inherit;}
|
||||
#mainContent > .panel {margin-bottom: 0; height: calc(100vh - 125px); overflow-y: auto;}
|
||||
#mainContent > .main-col {padding-left: 0;}
|
||||
|
||||
.no-content {width: 100px; height: 100px; margin: 0 auto;}
|
||||
.notice {text-align: center; padding-left: 15px; padding-top: 20px;}
|
||||
.no-content-button {text-align: center; padding-top: 20px;}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
.flex-content #content {flex: auto; overflow-y: auto; height: calc(100vh - 125px);}
|
||||
.flex-content #history {flex: 0 0 302px; position: relative; overflow: auto;}
|
||||
.flex-content #history > #closeBtn {position: absolute; right: 10px; top: 10px;}
|
||||
|
||||
#content .detail-content.article-content::-webkit-scrollbar,
|
||||
#outlineMenu::-webkit-scrollbar,
|
||||
#history::-webkit-scrollbar {height: 0px; width: 0px; background: transparent;}
|
||||
#content .detail-content.article-content::-moz-scrollbar,
|
||||
#outlineMenu::-moz-scrollbar,
|
||||
#hostory::-moz-scrollbar {height: 0px; width: 0px; background: transparent;}
|
||||
.main-col iframe {min-height: unset;}
|
||||
.bottom-btn-tree {display: none;}
|
||||
+39
-1
@@ -104,7 +104,7 @@ $(function()
|
||||
$('.menu-actions > a').blur(function() {$(this).css('background', 'none');})
|
||||
|
||||
/* Update doc content silently on switch doc version, story #40503 */
|
||||
$(document).on('click', '.api-version-menu a, #mainActions .container a', function(event)
|
||||
$('body').on('click', '.api-version-menu a, #mainActions .container a', function(event)
|
||||
{
|
||||
var $tmpDiv = $('<div>');
|
||||
$tmpDiv.load($(this).data('url') + ' #mainContent', function()
|
||||
@@ -117,5 +117,43 @@ $(function()
|
||||
$('#outline li.has-list').addClass('open in');
|
||||
$('#outline li.has-list>i+ul').prev('i').remove();
|
||||
});
|
||||
}).on('click', '.comment-edit-form .btn-hide-form', function()
|
||||
{
|
||||
$('.comment-edit-form #submit').attr('disabled', false);
|
||||
}).on('click', '#docVersionMenu.diff > .drop-body > li', function(e)
|
||||
{
|
||||
e.stopPropagation();
|
||||
}).on('click', '#docVersionMenu #changeBtn', function(e)
|
||||
{
|
||||
$('#docVersionMenu').addClass('diff');
|
||||
e.stopPropagation();
|
||||
}).on('click', '#hisTrigger', function()
|
||||
{
|
||||
var $history = $('#history');
|
||||
var $icon = $(this);
|
||||
if($history.hasClass('hidden'))
|
||||
{
|
||||
$history.removeClass('hidden');
|
||||
$icon.addClass('text-primary');
|
||||
}
|
||||
else
|
||||
{
|
||||
$history.addClass('hidden');
|
||||
$icon.removeClass('text-primary');
|
||||
}
|
||||
}).on('click', '#closeBtn', function()
|
||||
{
|
||||
$('#history').addClass('hidden');
|
||||
$('#hisTrigger').removeClass('text-primary');
|
||||
});
|
||||
|
||||
$('#history').append('<a id="closeBtn" href="###" class="btn btn-link"><i class="icon icon-close"></i></a>');
|
||||
|
||||
$('#history').find('.btn.pull-right').removeClass('pull-right');
|
||||
|
||||
$('.comment-edit-form').ajaxForm({
|
||||
success: function(data) {
|
||||
location.reload();
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="main-col" data-min-width="500">
|
||||
<div id="mainContent" class="main-row in">
|
||||
<div id="mainContent" class="main-row in flex-content">
|
||||
<div class="main-col col-8">
|
||||
<div class="cell" id="content">
|
||||
<div class="no-padding">
|
||||
@@ -20,7 +20,6 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="crumbs"><?php echo implode(' > ', $crumbs);?></div>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<?php echo html::a("javascript:fullScreen()", '<span class="icon-fullscreen"></span>', '', "title='{$lang->fullscreen}' class='btn btn-link fullscreen-btn'");?>
|
||||
@@ -31,6 +30,7 @@
|
||||
if(common::hasPriv('api', 'delete')) echo html::a($this->createLink('api', 'delete', "apiID=$api->id"), '<i class="icon-trash"></i>', '', "title='{$lang->api->delete}' class='btn btn-link' target='hiddenwin'");
|
||||
}
|
||||
?>
|
||||
<a id="hisTrigger" href="###" class="btn btn-link" title=<?php echo $lang->history?>><span class="icon icon-clock"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -146,53 +146,12 @@
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 历史记录 -->
|
||||
<div class='cell'>
|
||||
<?php
|
||||
$canBeChanged = common::canBeChanged('api', $api);
|
||||
if($canBeChanged) $actionFormLink = $this->createLink('action', 'comment', "objectType=api&objectID=$api->id");?>
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="side-col col-2" id="sidebar">
|
||||
<div class="sidebar-toggle">
|
||||
<i class="icon icon-angle-right"></i>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<details class="detail" open>
|
||||
<summary class="detail-title"><?php echo $lang->api->basicInfo;?></summary>
|
||||
<div class="detail-content">
|
||||
<table class="table table-data">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class='c-lib'><?php echo $lang->api->lib;?></th>
|
||||
<td><?php echo $api->libName;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->module;?></th>
|
||||
<td><?php echo $api->moduleName ? $api->moduleName : '/';?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->addedDate;?></th>
|
||||
<td><?php echo $api->addedDate;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->api->owner;?></th>
|
||||
<td><?php echo zget($users, $api->owner, '');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->editedBy;?></th>
|
||||
<td><?php echo zget($users, $api->editedBy, '');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->editedDate;?></th>
|
||||
<td><?php echo $api->editedDate;?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
<div id="history" class='panel hidden' style="margin-left: 2px;">
|
||||
<?php
|
||||
$canBeChanged = common::canBeChanged('api', $api);
|
||||
if($canBeChanged) $actionFormLink = $this->createLink('action', 'comment', "objectType=api&objectID=$api->id");?>
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<div class="sidebar-toggle flex-center"><i class="icon icon-angle-left"></i></div>
|
||||
<div class="main-col flex-full overflow-visible flex-auto overflow-visible" data-min-width="500">
|
||||
<div class="cell<?php if($browseType == 'bySearch') echo ' show';?>" style="min-width: 400px" id="queryBox" data-module='api'></div>
|
||||
<?php include 'apilist.html.php';?>
|
||||
<?php include 'apilist.html.php';?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
|
||||
@@ -11,48 +11,37 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php js::set('confirmDelete', $lang->api->confirmDelete);?>
|
||||
<div class="cell<?php if($browseType == 'bySearch') echo ' show';?>" id="queryBox" data-module=<?php echo 'api';?>></div>
|
||||
<div class="fade main-row split-row" id="mainRow">
|
||||
<?php if($libID):?>
|
||||
<?php $sideWidth = common::checkNotCN() ? '270' : '238';?>
|
||||
<div class="side-col" style="width:<?php echo $sideWidth;?>px" data-min-width="<?php echo $sideWidth;?>">
|
||||
<div class="cell" style="min-height: 286px; overflow: visible;">
|
||||
<div id='title'>
|
||||
<li class='menu-title'>
|
||||
<div class="title"><?php echo $this->lang->api->module;?></div>
|
||||
</li>
|
||||
<?php
|
||||
$canTreeBrowse = common::hasPriv('tree', 'browse');
|
||||
$canViewReleases = common::hasPriv('api', 'releases');
|
||||
$canEditLib = common::hasPriv('api', 'editLib');
|
||||
$canDeleteLib = common::hasPriv('api', 'deleteLib');
|
||||
$haveMoreButton = ($canTreeBrowse or $canViewReleases or $canEditLib or $canDeleteLib);
|
||||
|
||||
if(!$isRelease and $haveMoreButton)
|
||||
{
|
||||
echo "<div class='menu-actions'>";
|
||||
echo html::a('javascript:;', "<i class='icon icon-ellipsis-v'></i>", '', "data-toggle='dropdown' class='btn btn-link'");
|
||||
echo "<ul class='dropdown-menu pull-right'>";
|
||||
if($canTreeBrowse) echo '<li>' . html::a($this->createLink('tree', 'browse', "rootID=$libID&view=api", '', true), '<i class="icon-cog-outline"></i> ' . $this->lang->api->manageType, '', "class='iframe' data-width='1200px'") . '</li>';
|
||||
if($canViewReleases) echo '<li>' . html::a($this->createLink('api', 'releases', "libID=$libID", '', true), '<i class="icon-version"></i> ' . $this->lang->api->managePublish, '', "class='iframe'") . '</li>';
|
||||
echo "<li class='divider'></li>";
|
||||
if($canEditLib) echo '<li>' . html::a($this->createLink('api', 'editLib', "rootID=$libID"), '<i class="icon-edit"></i> ' . $lang->api->editLib, '', "class='iframe'") . '</li>';
|
||||
if($canDeleteLib) echo '<li>' . html::a($this->createLink('api', 'deleteLib', "rootID=$libID"), '<i class="icon-trash"></i> ' . $lang->api->deleteLib, 'hiddenwin') . '</li>';
|
||||
echo '</ul></div>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php if(!$moduleTree):?>
|
||||
<hr class="space">
|
||||
<?php if(!$isRelease):?>
|
||||
<div class="text-center text-muted tips"><?php echo $lang->api->noModule;?></div>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
<?php echo $moduleTree;?>
|
||||
</div>
|
||||
<?php js::set('treeData', $libTree);?>
|
||||
<?php js::set('apiID', $apiID);?>
|
||||
<style>.panel-body{min-height: 180px}</style>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div id="leftBar" class="btn-toolbar pull-left">
|
||||
<?php echo $objectDropdown;?>
|
||||
<?php $gobackLink = $this->session->structList ? $this->session->structList : inlink('index', "libID=$libID&moduleID=$moduleID");?>
|
||||
<?php echo html::a($gobackLink, "<i class='icon-back'></i> " . $lang->goback, '', "class='btn btn-link'");?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php
|
||||
if($libTree and common::hasPriv('api', 'struct')) echo html::a($this->createLink('api', 'struct', "libID=$libID"), "<i class='icon-treemap muted'> </i>" . $lang->api->struct, '', "class='btn btn-link'");
|
||||
if($libTree and common::hasPriv('api', 'releases')) echo html::a($this->createLink('api', 'releases', "libID=$libID", 'html', true), "<i class='icon-version muted'> </i>" . $lang->api->releases, '', "class='btn btn-link iframe' data-width='800px'");
|
||||
if($libTree and common::hasPriv('api', 'createRelease')) echo html::a($this->createLink('api', 'createRelease', "libID=$libID"), "<i class='icon-publish muted'> </i>" . $lang->api->createRelease, '', "class='btn btn-link iframe' data-width='800px'");
|
||||
if($libTree and common::hasPriv('api', 'export') and $config->edition != 'open') echo html::a($this->createLink('api', 'export', "libID=$libID&version=$version&release=$release&moduleID=$moduleID", 'html', true), "<i class='icon-export muted'> </i>" . $lang->export, '', "class='btn btn-link export' data-width='480px' id='export'");
|
||||
if($objectType == 'api' and common::hasPriv('api', 'createLib')) echo html::a($this->createLink('api', 'createLib', "type=" . ($objectType ? $objectType : 'nolink') . "&objectID=$objectID"), '<i class="icon icon-plus"></i> ' . $lang->api->createLib, '', 'class="btn btn-secondary iframe" data-width="800px"');
|
||||
if($objectType != 'api' and common::hasPriv('doc', 'createLib')) echo html::a($this->createLink('doc', 'createLib', "type=" . ($objectType ? $objectType : 'nolink') . "&objectID=$objectID"), '<i class="icon icon-plus"></i> ' . $lang->api->createLib, '', 'class="btn btn-secondary iframe" data-width="800px"');
|
||||
if($libTree and common::hasPriv('api', 'create')) echo html::a($this->createLink('api', 'create', "libID=$libID&moduleID=$moduleID"), '<i class="icon icon-plus"></i> ' . $lang->api->createApi, '', 'class="btn btn-primary"');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div id='mainContent' class="fade flex">
|
||||
<div id='sideBar' class="panel side side-col col overflow-auto" data-min-width="150">
|
||||
<?php include '../../doc/view/lefttree.html.php';?>
|
||||
</div>
|
||||
<div class="sidebar-toggle flex-center"><i class="icon icon-angle-left"></i></div>
|
||||
<div class="main-col flex-full overflow-visible flex-auto overflow-visible" data-min-width="500">
|
||||
<div class="cell<?php if($browseType == 'bySearch') echo ' show';?>" style="min-width: 400px" id="queryBox" data-module='api'></div>
|
||||
<?php include 'apilist.html.php';?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php include 'apilist.html.php';?>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
.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 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 .file-icon {margin-right: 2px; margin-bottom: 2px;}
|
||||
.block-docmycollection .doc-list > .doc-box .plug-title {height: 16px; overflow: hidden;}
|
||||
|
||||
.block-docmycollection.block-sm .doc-list > .doc-box {flex: 0 1 100%;}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
.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 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 .file-icon {margin-right: 2px; margin-bottom: 2px;}
|
||||
.block-docrecentupdate .doc-list > .doc-box .plug-title {height: 16px; overflow: hidden;}
|
||||
|
||||
.block-docrecentupdate.block-sm .doc-list > .doc-box {flex: 0 1 100%;}
|
||||
|
||||
@@ -502,7 +502,7 @@ $lang->doc->menu->dashboard = array('link' => "{$lang->dashboard}|doc|index");
|
||||
$lang->doc->menu->my = array('link' => "{$lang->doc->mySpace}|doc|mySpace|type=mine", 'alias' => '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->api = array('link' => "{$lang->doc->apiSpace}|api|index", 'alias' => '', 'exclude' => 'index');
|
||||
$lang->doc->menu->custom = array('link' => "{$lang->doc->teamSpace}|doc|teamSpace|", 'alias' => 'teamspace');
|
||||
|
||||
$lang->doc->dividerMenu = ',product,';
|
||||
|
||||
@@ -1182,7 +1182,7 @@ class commonModel extends model
|
||||
if(isset($menuItem->link['module'])) $module = $menuItem->link['module'];
|
||||
if(isset($menuItem->link['method'])) $method = $menuItem->link['method'];
|
||||
}
|
||||
if($module == $currentModule and ($method == $currentMethod or strpos(",$alias,", ",$currentMethod,") !== false) and strpos(",$exclude,", ",$currentMethod,") === false)
|
||||
if($module == $currentModule and ($method == $currentMethod or strpos(",$alias,", ",$currentMethod,") !== false) and strpos(",$exclude,", ",$currentModule-$currentMethod,") === false)
|
||||
{
|
||||
$activeMenu = $menuItem->name;
|
||||
$active = 'active';
|
||||
|
||||
@@ -1273,6 +1273,15 @@ class doc extends control
|
||||
$this->session->set('spaceType', $type, 'doc');
|
||||
$this->session->set('docList', $uri, 'doc');
|
||||
|
||||
$docSpaceParam = new stdclass();
|
||||
$docSpaceParam->type = $type;
|
||||
$docSpaceParam->objectID = $objectID;
|
||||
$docSpaceParam->libID = $libID;
|
||||
$docSpaceParam->moduleID = $moduleID;
|
||||
$docSpaceParam->browseType = $browseType;
|
||||
$docSpaceParam->param = $param;
|
||||
setCookie("docSpaceParam", json_encode($docSpaceParam), $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
|
||||
if($moduleID) $libID = $this->tree->getById($moduleID)->root;
|
||||
$isFirstLoad = $libID == 0 ? true : false;
|
||||
if(empty($browseType)) $browseType = 'all';
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
.main-col .doc-title .version .dropdown-menu a:hover {color: #ffffff;}
|
||||
.main-col .doc-title .actions a + a {margin-left: 0px;}
|
||||
.main-col .doc-title .actions i {font-size: 15px; color: #8c8c8c;}
|
||||
.main-col .doc-title .actions a > span {color: #9EA3B0;}
|
||||
#content .title {max-width: 54%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
|
||||
#mainContent .scrollbar-hover {max-height: 2000px; overflow: scroll;}
|
||||
#content .editor-preview {background: #fff}
|
||||
|
||||
@@ -2391,6 +2391,11 @@ class docModel extends model
|
||||
|
||||
$currentModule = $this->app->rawModule;
|
||||
$currentMethod = $this->app->rawMethod;
|
||||
if($currentModule == 'api' and $currentMethod == 'index')
|
||||
{
|
||||
$currentModule = 'doc';
|
||||
$currentMethod = $type . 'Space';
|
||||
}
|
||||
|
||||
$dropMenuLink = helper::createLink('doc', 'ajaxGetDropMenu', "objectType=$type&objectID=$objectID&module=$currentModule&method=$currentMethod");
|
||||
$output = "<div class='btn-group selectBox' id='swapper'><button data-toggle='dropdown' type='button' class='btn' id='currentItem' title='{$objectTitle}'><span class='text'>{$objectTitle}</span> <span class='caret' style='margin-bottom: -1px'></span></button><div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList' data-url='$dropMenuLink'>";
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<tbody>
|
||||
<tr id='headerBox'>
|
||||
<td width='90px'><?php echo html::backButton("<i class='icon icon-back icon-sm'></i> " . $lang->goback, "id='backBtn'", 'btn btn-secondary');?></td>
|
||||
<td class="doc-title" colspan='3'><?php echo html::input('title', '', "placeholder='{$lang->doc->titlePlaceholder}' id='editorTitle' class='form-control' required");?></td>
|
||||
<td class="doc-title" colspan='3'><?php echo html::input('title', '', "placeholder='{$lang->doc->titlePlaceholder}' id='editorTitle' class='form-control' required maxlength='100'");?></td>
|
||||
<td class="text-right btn-tools">
|
||||
<?php echo html::commonButton($lang->doc->saveDraft, "id='saveDraft' data-placement='bottom'", "btn btn-secondary");?>
|
||||
<?php echo html::a('#modalBasicInfo', $lang->release->common, '', "data-toggle='modal' id='basicInfoLink' class='btn btn-primary'");?>
|
||||
|
||||
@@ -247,14 +247,14 @@ $(function()
|
||||
function initTree(ele, treeData)
|
||||
{
|
||||
var imgObj = {
|
||||
'annex': 'annex',
|
||||
'api': 'interface',
|
||||
'lib': 'wiki',
|
||||
'execution': 'wiki-file-lib',
|
||||
'text': 'wiki-file',
|
||||
'word': 'word',
|
||||
'ppt': 'ppt',
|
||||
'excel': 'excel'
|
||||
'annex' : 'annex',
|
||||
'api' : 'interface',
|
||||
'lib' : 'wiki',
|
||||
'execution' : 'wiki-file-lib',
|
||||
'text' : 'wiki-file',
|
||||
'word' : 'word',
|
||||
'ppt' : 'ppt',
|
||||
'excel' : 'excel'
|
||||
};
|
||||
|
||||
ele.tree(
|
||||
@@ -269,7 +269,7 @@ $(function()
|
||||
if(typeof docID != 'undefined' && item.id == docID) item.active = 1;
|
||||
if(['text', 'word', 'ppt', 'excel'].indexOf(item.type) !== -1) item.hasAction = false;
|
||||
|
||||
var objectType = config.currentModule == 'api' ? item.objectType : item.type;
|
||||
var objectType = config.currentModule == 'api' && ['project', 'product', 'execution'].indexOf(item.objectType) === false ? item.objectType : item.type;
|
||||
var libClass = ['lib', 'annex', 'api', 'execution'].indexOf(objectType) !== -1 ? 'lib' : '';
|
||||
var moduleClass = item.type == 'doc' || item.type == 'apiDoc' ? 'catalog' : '';
|
||||
var sortClass = '';
|
||||
@@ -312,7 +312,7 @@ $(function()
|
||||
if(isFirstLoad) ele.data('zui.tree').collapse();
|
||||
|
||||
var $leaf = ele.find('li.active > a');
|
||||
if($leaf.length && $('#fileTree').height() >= $('#sideBar').height()) $('#sideBar')[0].scrollTop = $($leaf[$leaf.length - 1]).offset().top - 100;
|
||||
if($leaf.length && $('#fileTree').height() >= $('#sideBar').height() && $($leaf[$leaf.length - 1]).offset().top > $('#sideBar').height()) $('#sideBar')[0].scrollTop = $($leaf[$leaf.length - 1]).offset().top - 200;
|
||||
|
||||
ele.on('click', '.icon-drop', function(e)
|
||||
{
|
||||
@@ -443,6 +443,8 @@ $(function()
|
||||
}
|
||||
else
|
||||
{
|
||||
config.currentModule = 'doc';
|
||||
config.currentMethod = 'projectspace';
|
||||
initTree($('#projectTree'), treeData.project);
|
||||
initTree($('#annexTree'), treeData.annex);
|
||||
if(treeData.execution&& treeData.execution.length)
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
<?php endif;?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div id="leftBar" class="btn-toolbar pull-left">
|
||||
<?php echo $objectDropdown;?>
|
||||
<?php $gobackLink = $this->session->docList ? $this->session->docList : inlink('teamSpace', "objectID=0&libID=$libID");?>
|
||||
<?php echo html::a($gobackLink, "<i class='icon-back'></i> " . $lang->goback, '', "class='btn btn-link'");?>
|
||||
<?php echo $objectDropdown;?>
|
||||
<?php $gobackLink = $this->session->docList ? $this->session->docList : inlink('teamSpace', "objectID=0&libID=$libID");?>
|
||||
<?php echo html::a($gobackLink, "<i class='icon-back'></i> " . $lang->goback, '', "class='btn btn-link'");?>
|
||||
</div>
|
||||
<?php if(empty($object->deleted)):?>
|
||||
<div class="btn-toolbar pull-right">
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.0915 4.30365L7.13335 2L6.17521 4.30365C5.8872 4.99612 5.23598 5.46926 4.4884 5.52919L2.00141 5.72857L3.89623 7.35169C4.46581 7.83959 4.71455 8.60515 4.54054 9.33466L3.96164 11.7615L6.09085 10.461C6.73088 10.0701 7.53583 10.0701 8.17586 10.461L10.3051 11.7615L9.72617 9.33465C9.55215 8.60514 9.8009 7.83959 10.3705 7.35169L12.2653 5.72857L9.77831 5.52919C9.03073 5.46926 8.37951 4.99612 8.0915 4.30365ZM8.05667 1.61597C7.71508 0.794676 6.55163 0.794678 6.21003 1.61597L5.25189 3.91962C5.10788 4.26585 4.78227 4.50242 4.40848 4.53239L1.9215 4.73177C1.03485 4.80285 0.675322 5.90936 1.35086 6.48803L3.24568 8.11114C3.53047 8.3551 3.65484 8.73787 3.56783 9.10263L2.98893 11.5295C2.78254 12.3947 3.7238 13.0786 4.4829 12.6149L6.6121 11.3144C6.93212 11.119 7.33459 11.119 7.65461 11.3144L9.78381 12.6149C10.5429 13.0786 11.4842 12.3947 11.2778 11.5295L10.6989 9.10263C10.6119 8.73787 10.7362 8.3551 11.021 8.11114L12.9159 6.48803C13.5914 5.90936 13.2319 4.80285 12.3452 4.73177L9.85822 4.53239C9.48443 4.50242 9.15882 4.26585 9.01482 3.91962L8.05667 1.61597Z" fill="#C4C4C4"/>
|
||||
<svg width="15" height="14" viewBox="0 0 15 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.18476 4.30365L7.22662 2L6.26847 4.30365C5.98046 4.99612 5.32924 5.46926 4.58166 5.52919L2.09468 5.72857L3.9895 7.35169C4.55907 7.83959 4.80782 8.60515 4.6338 9.33466L4.0549 11.7615L6.18411 10.461C6.82414 10.0701 7.62909 10.0701 8.26912 10.461L10.3983 11.7615L9.81943 9.33465C9.64542 8.60514 9.89416 7.83959 10.4637 7.35169L12.3586 5.72857L9.87157 5.52919C9.12399 5.46926 8.47277 4.99612 8.18476 4.30365ZM8.14994 1.61597C7.80834 0.794676 6.64489 0.794678 6.3033 1.61597L5.34515 3.91962C5.20115 4.26585 4.87554 4.50242 4.50175 4.53239L2.01476 4.73177C1.12811 4.80285 0.768584 5.90936 1.44412 6.48803L3.33894 8.11114C3.62373 8.3551 3.7481 8.73787 3.66109 9.10263L3.08219 11.5295C2.87581 12.3947 3.81706 13.0786 4.57616 12.6149L6.70536 11.3144C7.02538 11.119 7.42785 11.119 7.74787 11.3144L9.87708 12.6149C10.6362 13.0786 11.5774 12.3947 11.371 11.5295L10.7921 9.10263C10.7051 8.73787 10.8295 8.3551 11.1143 8.11114L13.0091 6.48803C13.6846 5.90936 13.3251 4.80285 12.4385 4.73177L9.95149 4.53239C9.5777 4.50242 9.25209 4.26585 9.10808 3.91962L8.14994 1.61597Z" fill="#9EA3B0"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Reference in New Issue
Block a user