* Modify view style.
This commit is contained in:
+4
-11
@@ -45,6 +45,7 @@ class api extends control
|
||||
{
|
||||
$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);
|
||||
@@ -185,16 +186,8 @@ 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)
|
||||
{
|
||||
$linkParams .= "&moduleID=$module->id";
|
||||
$crumbs[] = html::a(inLink($methodName, $linkParams), $module->name);
|
||||
}
|
||||
|
||||
$objectID = $this->objectID;
|
||||
if(strpos($this->server->http_referer, 'space'))
|
||||
if($this->cookie->docSpaceParam)
|
||||
{
|
||||
$docParam = json_decode($this->cookie->docSpaceParam);
|
||||
$type = $docParam->type;
|
||||
@@ -218,9 +211,9 @@ class api extends control
|
||||
$this->view->release = $release;
|
||||
$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->libTree = $libTree;
|
||||
@@ -680,7 +673,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'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php js::set('confirmDelete', $lang->api->confirmDelete);?>
|
||||
<?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">
|
||||
|
||||
@@ -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'>";
|
||||
|
||||
@@ -247,15 +247,16 @@ $(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'
|
||||
};
|
||||
console.log(treeData)
|
||||
|
||||
ele.tree(
|
||||
{
|
||||
@@ -443,6 +444,8 @@ $(function()
|
||||
}
|
||||
else
|
||||
{
|
||||
config.currentModule = 'doc';
|
||||
config.currentMethod = 'projectspace';
|
||||
initTree($('#projectTree'), treeData.project);
|
||||
initTree($('#annexTree'), treeData.annex);
|
||||
if(treeData.execution&& treeData.execution.length)
|
||||
|
||||
Reference in New Issue
Block a user