Merge branch 'release/zentaopms_18.3' into 'master'

* Merge master.

See merge request easycorp/zentaopms!7322
This commit is contained in:
王怡栋
2023-04-07 00:45:31 +00:00
19 changed files with 167 additions and 101 deletions
+2
View File
@@ -151,6 +151,8 @@ SELECT t1.`group`, t1.`module`, 'editCatalog' FROM `zt_grouppriv` AS t1 WHERE t1
INSERT IGNORE INTO `zt_grouppriv` (`group`, `module`, `method`)
SELECT t1.`group`, t1.`module`, 'deleteCatalog' FROM `zt_grouppriv` AS t1 WHERE t1.`module` = 'doc' AND t1.`method` = 'catalog';
UPDATE `zt_grouppriv` SET `method` = 'mySpace' WHERE `module` = 'doc' AND `method` = 'browse';
ALTER TABLE `zt_account`
CHANGE `editedBy` `editedBy` varchar(30) NOT NULL DEFAULT '',
CHANGE `editedDate` `editedDate` datetime NULL;
+11 -11
View File
@@ -2203,7 +2203,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(1,'dev','editor'),
(1,'dev','translate'),
(1,'doc','allLibs'),
(1,'doc','browse'),
(1,'doc','mySpace'),
(1,'doc','myView'),
(1,'doc','myCollection'),
(1,'doc','myCreation'),
@@ -2794,7 +2794,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(2,'dev','api'),
(2,'dev','db'),
(2,'dev','editor'),
(2,'doc','browse'),
(2,'doc','mySpace'),
(2,'doc','myView'),
(2,'doc','myCollection'),
(2,'doc','myCreation'),
@@ -3104,7 +3104,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(3,'company','index'),
(3,'company','view'),
(3,'datatable','setGlobal'),
(3,'doc','browse'),
(3,'doc','mySpace'),
(3,'doc','myView'),
(3,'doc','myCollection'),
(3,'doc','myCreation'),
@@ -3442,7 +3442,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(4,'compile','browse'),
(4,'compile','logs'),
(4,'datatable','setGlobal'),
(4,'doc','browse'),
(4,'doc','mySpace'),
(4,'doc','myView'),
(4,'doc','myCollection'),
(4,'doc','myCreation'),
@@ -3961,7 +3961,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(5,'compile','browse'),
(5,'compile','logs'),
(5,'datatable','setGlobal'),
(5,'doc','browse'),
(5,'doc','mySpace'),
(5,'doc','myView'),
(5,'doc','myCollection'),
(5,'doc','myCreation'),
@@ -4433,7 +4433,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(6,'company','index'),
(6,'company','view'),
(6,'datatable','setGlobal'),
(6,'doc','browse'),
(6,'doc','mySpace'),
(6,'doc','myView'),
(6,'doc','myCollection'),
(6,'doc','myCreation'),
@@ -4827,7 +4827,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(7,'company','index'),
(7,'company','view'),
(7,'datatable','setGlobal'),
(7,'doc','browse'),
(7,'doc','mySpace'),
(7,'doc','myView'),
(7,'doc','myCollection'),
(7,'doc','myCreation'),
@@ -5250,7 +5250,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(8,'compile','logs'),
(8,'custom','index'),
(8,'datatable','setGlobal'),
(8,'doc','browse'),
(8,'doc','mySpace'),
(8,'doc','myView'),
(8,'doc','myCollection'),
(8,'doc','myCreation'),
@@ -5634,7 +5634,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(9,'dept','delete'),
(9,'dept','manageChild'),
(9,'dept','updateOrder'),
(9,'doc','browse'),
(9,'doc','mySpace'),
(9,'doc','myView'),
(9,'doc','myCollection'),
(9,'doc','myCreation'),
@@ -5967,7 +5967,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(10,'company','dynamic'),
(10,'company','index'),
(10,'company','view'),
(10,'doc','browse'),
(10,'doc','mySpace'),
(10,'doc','myView'),
(10,'doc','myCollection'),
(10,'doc','myCreation'),
@@ -6211,7 +6211,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(11,'company','dynamic'),
(11,'company','index'),
(11,'company','view'),
(11,'doc','browse'),
(11,'doc','mySpace'),
(11,'doc','myView'),
(11,'doc','myCollection'),
(11,'doc','myCreation'),
+1 -1
View File
@@ -499,7 +499,7 @@ $lang->kanban->menu = new stdclass();
/* Doc menu. */
$lang->doc->menu = new stdclass();
$lang->doc->menu->dashboard = array('link' => "{$lang->dashboard}|doc|index");
$lang->doc->menu->my = array('link' => "{$lang->doc->mySpace}|doc|browse|browseTyp=openedbyme", 'alias' => 'my');
$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');
+30 -37
View File
@@ -53,19 +53,21 @@ class doc extends control
}
/**
* Browse docs.
* My space.
*
* @param string|int $libID product|execution or the int id of custom library
* @param string $browseType
* @param int $param
* @param string $type mine
* @param int $libID
* @param int $moduleID
* @param string $browseType all|draft|bysearch
* @param int $param
* @param string $orderBy
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @access public
* @return void
*/
public function browse($browseType = 'all', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
public function mySpace($type = 'mine', $libID = 0, $moduleID = 0, $browseType = 'all', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Save session, load module. */
$uri = $this->app->getURI(true);
@@ -75,11 +77,16 @@ class doc extends control
$this->session->set('projectList', $uri, 'project');
$this->loadModel('search');
/* Set browseType.*/
list($libs, $libID, $object, $objectID, $objectDropdown) = $this->doc->setMenuByType('mine', 0, $libID);
/* Build the search form. */
$browseType = strtolower($browseType);
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
$moduleID = ($browseType == 'bymodule') ? (int)$param : 0;
$libID = ($browseType == 'bylib') ? (int)$param : 0;
$queryID = $browseType == 'bysearch' ? (int)$param : 0;
$params = "libID=$libID&moduleID=$moduleID&browseType=bySearch&param=myQueryID&orderBy=$orderBy";
if($this->app->rawMethod == 'mySpace') $param = "type=$type&" . $params;
$actionURL = $this->createLink('doc', $this->app->rawMethod, $params);
$this->doc->buildSearchForm($libID, $libs, $queryID, $actionURL, $type);
/* Set header and position. */
$this->view->title = $this->lang->doc->common;
@@ -91,22 +98,6 @@ class doc extends control
/* Append id for secend sort. */
$sort = common::appendOrder($orderBy);
if($browseType == 'collectedbyme')
{
$this->app->rawMethod = 'collect';
}
elseif($browseType == 'openedbyme')
{
$this->app->rawMethod = 'my';
}
elseif($browseType == 'byediteddate')
{
$this->app->rawMethod = 'recent';
}
$libs = $this->doc->getLibsByObject('mine', 0);
$libTree = $this->doc->getLibTree($libID, $libs, 'mine', 0);
$this->view->moduleID = $moduleID;
$this->view->docs = $this->doc->getDocsByBrowseType($browseType, $queryID, $moduleID, $sort, $pager);
$this->view->users = $this->user->getPairs('noletter');
@@ -114,12 +105,13 @@ class doc extends control
$this->view->browseType = $browseType;
$this->view->param = $param;
$this->view->libID = $libID;
$this->view->libTree = $libTree;
$this->view->lib = $this->doc->getLibById($libID);
$this->view->libTree = $this->doc->getLibTree($libID, $libs, 'mine', 0);
$this->view->pager = $pager;
$this->view->type = 'mine';
$this->view->type = $type;
$this->view->objectID = 0;
$this->view->canExport = 0;
$this->view->libType = 'mine';
$this->view->libType = 'lib';
$this->display();
}
@@ -140,7 +132,9 @@ class doc extends control
if(!dao::isError())
{
if($type == 'project' and $this->post->project) $objectID = $this->post->project;
if($type == 'product' and $this->post->product) $objectID = $this->post->product;
if($type == 'execution' and $this->post->execution) $objectID = $this->post->execution;
if($type == 'custom') $objectID = 0;
@@ -598,10 +592,7 @@ class doc extends control
$this->config->showMainMenu = strpos(',html,markdown,text,', ",{$doc->type},") === false;
$this->view->title = $lib->name . $this->lang->colon . $this->lang->doc->edit;
$this->view->position[] = html::a($this->createLink('doc', 'browse', "libID=$libID"), $lib->name);
$this->view->position[] = $this->lang->doc->edit;
$this->view->title = $lib->name . $this->lang->colon . $this->lang->doc->edit;
$this->view->doc = $doc;
$this->view->moduleOptionMenu = $moduleOptionMenu;
$this->view->type = $objectType;
@@ -1211,9 +1202,10 @@ class doc extends control
}
}
$doc = $docID ? $doc : '';
$doc = $docID ? $doc : '';
$spaceType = $objectType . 'Space';
$this->view->title = $type == 'custom' ? $this->lang->doc->customAB : $object->name;
$this->view->title = isset($this->lang->doc->{$spaceType}) ? $this->lang->doc->{$spaceType} : $this->lang->doc->common;
$this->view->docID = $docID;
$this->view->doc = $doc;
$this->view->version = $version;
@@ -1229,6 +1221,7 @@ class doc extends control
$this->view->users = $this->user->getPairs('noclosed,noletter');
$this->view->autoloadPage = $this->doc->checkAutoloadPage($doc);
$this->view->libTree = $this->doc->getLibTree($libID, $libs, $type, $doc->module, $objectID);
$this->view->preAndNext = $this->loadModel('common')->getPreAndNextObject('doc', $docID);
$this->display();
}
-3
View File
@@ -1,3 +0,0 @@
#mainContent .c-id > a {color: #0c60e1;}
.btn.ajaxCollect {width: 20px; padding: 0px;}
.btn.ajaxCollect > img {width: 20px;}
+1
View File
@@ -0,0 +1 @@
#mainContent .c-id > a {color: #0c60e1;}
+2
View File
@@ -31,6 +31,7 @@
.outline-content a {color: #838A9D;}
.outline-content li.text-ellipsis.active>a {font-weight: 700; color: #0c64eb;}
#outline li.has-list.open:before {content: unset;}
#fileTree {margin-bottom: 40px; max-height: calc(100vh - 180px); overflow: auto;}
.title {font-size: 20px !important;}
.article-content.comment {width: 100% !important;}
@@ -47,3 +48,4 @@
.overflow-visible {overflow: visible;}
.overflow-hidden {overflow: hidden;}
#mainContent > .panel {margin-bottom: 0; height: calc(100vh - 125px); overflow-y: auto;}
.detail-title .actions .ajaxCollect > img {width: 20px;}
+23 -1
View File
@@ -307,9 +307,31 @@ $(document).ready(function()
});
});
/**
* locateNewLib
*
* @param string $type product|project|execution|custom|mine
* @param int $objectID
* @param int $libID
* @access public
* @return void
*/
function locateNewLib(type, objectID, libID)
{
location.href = createLink('doc', 'tableContents', 'type=' + type + '&objectID=' + objectID + '&libID=' + libID);
var method = 'tableContents';
var params = 'type=' + type + '&objectID=' + objectID + '&libID=' + libID;
if(type == 'product' || type == 'project')
{
method = type + 'Space';
params = 'objectID=' + objectID + '&libID=' + libID;
}
else if(type == 'mine')
{
method = 'mySpace';
params = 'type=mine&libID=' + libID;
}
location.href = createLink('doc', method, params);
}
/**
+16 -4
View File
@@ -219,6 +219,18 @@ $lang->doc->statusList['draft'] = "Draft";
$lang->doc->aclList['open'] = "Öffentlich <span class='text-gray'>(Access with library permissions)</span>";
$lang->doc->aclList['private'] = "Privat <span class='text-gray'>(Only creators and whitelist users can access)</span>";
$lang->doc->space = 'Space';
$lang->doc->spaceList['mine'] = 'My Space';
$lang->doc->spaceList['product'] = $lang->productCommon . ' Space';
$lang->doc->spaceList['project'] = $lang->projectCommon . ' Space';
$lang->doc->spaceList['api'] = 'API Space';
$lang->doc->spaceList['custom'] = 'Team Space';
$lang->doc->apiType = 'API Type';
$lang->doc->apiTypeList['product'] = $lang->productCommon . ' API';
$lang->doc->apiTypeList['project'] = $lang->projectCommon . ' API';
$lang->doc->apiTypeList['nolink'] = 'No Link API';
$lang->doc->typeList['html'] = 'Html';
$lang->doc->typeList['markdown'] = 'Markdown';
$lang->doc->typeList['url'] = 'URL';
@@ -232,8 +244,8 @@ $lang->doc->createList['word'] = 'Word';
$lang->doc->createList['ppt'] = 'PPT';
$lang->doc->createList['excel'] = 'Excel';
$lang->doc->types['text'] = 'Text';
$lang->doc->types['url'] = 'URL';
$lang->doc->types['doc'] = 'WIKI';
$lang->doc->types['api'] = 'API';
$lang->doc->contentTypeList['html'] = 'HTML';
$lang->doc->contentTypeList['markdown'] = 'MarkDown';
@@ -255,8 +267,8 @@ $lang->doc->fastMenuIconList['collectedbyme'] = 'icon-folder-star';
$lang->doc->customObjectLibs['files'] = 'Dateibiblothek anzeigen';
$lang->doc->customObjectLibs['customFiles'] = 'Eigene Bibliothek anzeigen';
$lang->doc->orderLib = 'Rank Settings';
$lang->doc->customShowLibs = 'Display Settings';
$lang->doc->orderLib = 'Rank Settings';
$lang->doc->customShowLibs = 'Display Settings';
$lang->doc->customShowLibsList['zero'] = 'Display Empty Library';
$lang->doc->customShowLibsList['children'] = 'Display Child-category Documents';
$lang->doc->customShowLibsList['unclosed'] = "Display Active {$lang->executionCommon}s Only";
+16 -4
View File
@@ -219,6 +219,18 @@ $lang->doc->statusList['draft'] = "Draft";
$lang->doc->aclList['open'] = "Public <span class='text-gray'>(Access with library permissions)</span>";
$lang->doc->aclList['private'] = "Private <span class='text-gray'>(Only creators and whitelist users can access)</span>";
$lang->doc->space = 'Space';
$lang->doc->spaceList['mine'] = 'My Space';
$lang->doc->spaceList['product'] = $lang->productCommon . ' Space';
$lang->doc->spaceList['project'] = $lang->projectCommon . ' Space';
$lang->doc->spaceList['api'] = 'API Space';
$lang->doc->spaceList['custom'] = 'Team Space';
$lang->doc->apiType = 'API Type';
$lang->doc->apiTypeList['product'] = $lang->productCommon . ' API';
$lang->doc->apiTypeList['project'] = $lang->projectCommon . ' API';
$lang->doc->apiTypeList['nolink'] = 'No Link API';
$lang->doc->typeList['html'] = 'Html';
$lang->doc->typeList['markdown'] = 'Markdown';
$lang->doc->typeList['url'] = 'URL';
@@ -232,8 +244,8 @@ $lang->doc->createList['word'] = 'Word';
$lang->doc->createList['ppt'] = 'PPT';
$lang->doc->createList['excel'] = 'Excel';
$lang->doc->types['text'] = 'Text';
$lang->doc->types['url'] = 'URL';
$lang->doc->types['doc'] = 'WIKI';
$lang->doc->types['api'] = 'API';
$lang->doc->contentTypeList['html'] = 'HTML';
$lang->doc->contentTypeList['markdown'] = 'MarkDown';
@@ -255,8 +267,8 @@ $lang->doc->fastMenuIconList['collectedbyme'] = 'icon-folder-star';
$lang->doc->customObjectLibs['files'] = 'Show Attachment Library';
$lang->doc->customObjectLibs['customFiles'] = 'Show Custom Library';
$lang->doc->orderLib = 'Rank Settings';
$lang->doc->customShowLibs = 'Display Settings';
$lang->doc->orderLib = 'Rank Settings';
$lang->doc->customShowLibs = 'Display Settings';
$lang->doc->customShowLibsList['zero'] = 'Display Empty Library';
$lang->doc->customShowLibsList['children'] = 'Display Child-category Documents';
$lang->doc->customShowLibsList['unclosed'] = "Display Active {$lang->executionCommon}s Only";
+16 -5
View File
@@ -219,6 +219,18 @@ $lang->doc->statusList['draft'] = "Draft";
$lang->doc->aclList['open'] = "Public <span class='text-gray'>(Access with library permissions)</span>";
$lang->doc->aclList['private'] = "Privé <span class='text-gray'>(Only creators and whitelist users can access)</span>";
$lang->doc->space = 'Space';
$lang->doc->spaceList['mine'] = 'My Space';
$lang->doc->spaceList['product'] = $lang->productCommon . ' Space';
$lang->doc->spaceList['project'] = $lang->projectCommon . ' Space';
$lang->doc->spaceList['api'] = 'API Space';
$lang->doc->spaceList['custom'] = 'Team Space';
$lang->doc->apiType = 'API Type';
$lang->doc->apiTypeList['product'] = $lang->productCommon . ' API';
$lang->doc->apiTypeList['project'] = $lang->projectCommon . ' API';
$lang->doc->apiTypeList['nolink'] = 'No Link API';
$lang->doc->typeList['html'] = 'Html';
$lang->doc->typeList['markdown'] = 'Markdown';
$lang->doc->typeList['url'] = 'URL';
@@ -227,14 +239,13 @@ $lang->doc->typeList['ppt'] = 'PPT';
$lang->doc->typeList['excel'] = 'Excel';
$lang->doc->createList['html'] = 'Create Document';
$lang->doc->createList['api'] = 'Create API';
$lang->doc->createList['template'] = 'Create By Template';
$lang->doc->createList['word'] = 'Word';
$lang->doc->createList['ppt'] = 'PPT';
$lang->doc->createList['excel'] = 'Excel';
$lang->doc->types['text'] = 'Text';
$lang->doc->types['url'] = 'URL';
$lang->doc->types['doc'] = 'WIKI';
$lang->doc->types['api'] = 'API';
$lang->doc->contentTypeList['html'] = 'HTML';
$lang->doc->contentTypeList['markdown'] = 'MarkDown';
@@ -256,8 +267,8 @@ $lang->doc->fastMenuIconList['collectedbyme'] = 'icon-folder-star';
$lang->doc->customObjectLibs['files'] = 'Montrer Bibliothèque des Pièces jointes';
$lang->doc->customObjectLibs['customFiles'] = 'Montrer Library Personnelle';
$lang->doc->orderLib = 'Paramétrage Rang';
$lang->doc->customShowLibs = 'Paramétrage Affichage';
$lang->doc->orderLib = 'Paramétrage Rang';
$lang->doc->customShowLibs = 'Paramétrage Affichage';
$lang->doc->customShowLibsList['zero'] = 'Montrer Bibliothèques Vides';
$lang->doc->customShowLibsList['children'] = 'Montrer sous-catégorie de Documents';
$lang->doc->customShowLibsList['unclosed'] = "Montrer {$lang->executionCommon}s actifs seulement";
+6 -6
View File
@@ -219,16 +219,16 @@ $lang->doc->statusList['draft'] = "草稿";
$lang->doc->aclList['open'] = "公开<span class='text-gray'>(有所属库权限即可访问)</span>";
$lang->doc->aclList['private'] = "私有<span class='text-gray'>(仅创建者和白名单用户可访问)</span>";
$lang->doc->space = '所属空间';
$lang->doc->space = '所属空间';
$lang->doc->spaceList['mine'] = '我的空间';
$lang->doc->spaceList['product'] = '产品空间';
$lang->doc->spaceList['project'] = '项目空间';
$lang->doc->spaceList['product'] = $lang->productCommon . '空间';
$lang->doc->spaceList['project'] = $lang->projectCommon . '空间';
$lang->doc->spaceList['api'] = '接口空间';
$lang->doc->spaceList['custom'] = '团队空间';
$lang->doc->apiType = '接口类型';
$lang->doc->apiTypeList['product'] = '产品接口';
$lang->doc->apiTypeList['project'] = '项目接口';
$lang->doc->apiType = '接口类型';
$lang->doc->apiTypeList['product'] = $lang->productCommon . '接口';
$lang->doc->apiTypeList['project'] = $lang->projectCommon . '接口';
$lang->doc->apiTypeList['nolink'] = '无关联接口';
$lang->doc->typeList['html'] = '富文本';
+16 -15
View File
@@ -994,7 +994,7 @@ class docModel extends model
unset($this->config->doc->search['fields']['module']);
}
elseif(in_array($type, array('product', 'project', 'execution', 'custom', 'book')))
elseif(in_array($type, array('product', 'project', 'execution', 'custom', 'mine')))
{
if(!isset($libs[$libID])) $libs[$libID] = $this->getLibById($libID);
@@ -1034,8 +1034,7 @@ class docModel extends model
$this->config->doc->search['queryID'] = $queryID;
/* Get the modules. */
$moduleOptionMenu = $this->loadModel('tree')->getOptionMenu($libID, 'doc', $startModuleID = 0);
$this->config->doc->search['params']['module']['values'] = $moduleOptionMenu;
$this->config->doc->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($libID, 'doc', $startModuleID = 0);
if($type == 'index' || $type == 'view' || ($this->app->rawMethod != 'contribute' and $libID == 0))
{
@@ -1141,7 +1140,7 @@ class docModel extends model
*/
public function checkPrivLib($object, $extra = '')
{
if($this->app->user->admin) return true;
if($this->app->user->admin and $object->type != 'mine') return true;
if($object->acl == 'open') return true;
@@ -1486,7 +1485,7 @@ class docModel extends model
->andWhere('vision')->eq($this->config->vision)
->andWhere('type')->eq($type)
->beginIF(!empty($appendLib))->orWhere('id')->eq($appendLib)->fi()
->beginIF($type == 'mine')->orWhere('addedBy')->eq($this->app->user->account)->fi()
->beginIF($type == 'mine')->andWhere('addedBy')->eq($this->app->user->account)->fi()
->orderBy('`order` asc, id_asc')
->fetchAll('id');
}
@@ -2638,15 +2637,7 @@ class docModel extends model
if($this->app->tab == 'doc' and $type == 'execution') $type = 'project';
$objectDropdown = '';
if($type == 'custom')
{
$libs = $this->getLibsByObject('custom', 0, '', $appendLib);
if($libID == 0 and !empty($libs)) $libID = reset($libs)->id;
$object = new stdclass();
$object->id = 0;
}
else
if(in_array($type, array('project', 'product', 'execution')))
{
$objects = $this->getOrderedObjects($type);
$objectID = $this->loadModel($type)->saveState($objectID, $objects);
@@ -2665,8 +2656,17 @@ class docModel extends model
return print(js::locate(helper::createLink($type, $methodName, $param)));
}
}
else
{
$libs = $this->getLibsByObject($type, 0, '', $appendLib);
if($libID == 0 and !empty($libs)) $libID = reset($libs)->id;
$tab = strpos(',doc,product,project,execution,', ",{$this->app->tab},") !== false ? $this->app->tab : 'doc';
$object = new stdclass();
$object->id = 0;
}
$tab = strpos(',doc,product,project,execution,', ",{$this->app->tab},") !== false ? $this->app->tab : 'doc';
$type = $type == 'mine' ? 'my' : $type;
if($tab != 'doc' and method_exists($type . 'Model', 'setMenu'))
{
$this->loadModel($type)->setMenu($objectID);
@@ -2911,6 +2911,7 @@ class docModel extends model
if(count($executionLibs[$executionID]) == 1)
{
$execution->id = $item->id;
$execution->type = 'lib';
$execution->hasAction = true;
$execution->children = $item->children;
}
+21 -7
View File
@@ -26,7 +26,8 @@
.img-lib {flex: 0 0 14px; height: 14px; margin-right: 5px;}
.tree-icon {position: absolute; right: 0;}
.tree li > a {max-width: 100%; padding: 2px;}
.file-tree a.show-icon > div {padding-right: 15px;}
.file-tree a.show-icon > div,
.file-tree a.hover > div {padding-right: 15px;}
.tree li.has-input {overflow: hidden;}
.tree-text {overflow: hidden;}
i.btn-info, i.btn-info:hover {border: none; background: #fff; box-shadow: unset;}
@@ -273,6 +274,9 @@ $(function()
ele.on('click', '.icon-drop', function(e)
{
var $icon = $(this);
$('.icon-drop').addClass('hidden');
$(this).removeClass('hidden');
$('#fileTree').find('a.hover').removeClass('hover');
$('.dropdown-in-tree').remove();
var isCatalogue = $icon.attr('data-isCatalogue') === 'false' ? false : true;
var dropDownID = isCatalogue ? 'dropDownCatalogue' : 'dropDownLibrary';
@@ -317,7 +321,7 @@ $(function()
var dropDown = renderDropdown(option);
$icon.closest('body').append(dropDown);
$('.dropdown-in-tree').attr('data-tree-id', $(this).closest('.tree').attr('id'));
$icon.closest('li').addClass('hover');
$icon.closest('a').addClass('hover');
e.stopPropagation();
}).on('mousemove', 'a', function()
@@ -334,11 +338,12 @@ $(function()
}).on('mouseout', 'a', function()
{
$(this).find('.icon').addClass('hidden');
if(!$(this).closest('a').hasClass('hover')) $(this).find('.icon').addClass('hidden');
$(this).removeClass('show-icon');
}).on('click', 'a', function()
{
if(!$(this).data('action')) return;
if($(this).data('type') == 'execution') return;
var isLib = $(this).hasClass('lib');
var moduleID = $(this).data('id');
var libID = 0;
@@ -370,7 +375,7 @@ $(function()
$('#versionSwitcher').find('a[data-id=' + release + ']').parent().addClass('active');
$('.dropdown-in-tree').attr('data-tree-id', $(this).closest('.tree').attr('id'));
$(this).closest('li').addClass('hover');
$(this).closest('a').addClass('hover');
e.stopPropagation();
});
@@ -417,6 +422,11 @@ $(function()
methodName = 'showFiles';
linkParams = 'type=' + objectType + '&objectID=' + objectID;
}
else if(objectType == 'mine')
{
methodName = 'mySpace';
linkParams = 'type=mine&libID=' + libID;
}
else if(['text', 'word', 'ppt', 'excel'].indexOf(type) !== -1)
{
methodName = 'view';
@@ -437,8 +447,12 @@ $(function()
if($dropdown.length)
{
var dropdown = $dropdown.data();
var $hoverItem = $('#' + $dropdown.data('treeId')).find('li.hover');
$hoverItem.removeClass('hover');
var $hoverItem = $('#' + $dropdown.data('treeId')).find('a.hover');
if($hoverItem.length)
{
$hoverItem.removeClass('hover');
$hoverItem.find('.icon').addClass('hidden');
}
$dropdown.remove();
}
}).on('click', '.sidebar-toggle', function()
+2 -2
View File
@@ -39,8 +39,8 @@ body {margin-bottom: 25px;}
</p>
</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;?>
<?php $vars = "$libID=$libID&moduleID=$moduleID&browseType=$browseType&param=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
<?php if($app->rawMethod == 'myspace') $vars = "type=$type&" . $vars;?>
<div>
<form class='main-table' method='post' id='docListForm'>
<table class="table table-files has-sort-head">
@@ -17,7 +17,6 @@
<?php js::set('confirmDelete', $lang->doc->confirmDelete)?>
<?php js::set('appTab', $app->tab)?>
<?php js::set('treeData', $libTree)?>
<div class="cell<?php if($browseType == 'bySearch') echo ' show';?>" id="queryBox" data-module=<?php echo $type . 'Doc';?>></div>
<div id="mainMenu" class="clearfix">
<div id="leftBar" class="btn-toolbar pull-left">
<?php if(!empty($libTree)):?>
@@ -53,7 +52,7 @@
</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">
<div class="cell<?php if($browseType == 'bySearch') echo ' show';?>" style="min-width: 400px" id="queryBox" data-module=<?php echo $type . $libType . 'Doc';?>></div>
<div class="cell<?php if($browseType == 'bySearch') echo ' show';?>" id="queryBox" data-module=<?php echo $type . $libType . 'Doc';?>></div>
<?php include 'mydoclist.html.php'; ?>
</div>
<?php endif;?>
+1 -1
View File
@@ -42,7 +42,7 @@
{
$exportLink = $this->createLink('doc', $exportMethod, "libID=$libID&docID=0", 'html', true);
if($libType == 'api') $exportLink = $this->createLink('api', $exportMethod, "libID=$libID", 'html', true);
echo html::a($exportLink, "<i class='icon-export muted'> </i>" . $lang->export, '', "class='btn btn-link export' id='{$exportMethod}'");
echo html::a($exportLink, "<i class='icon-export muted'> </i>" . $lang->export, '', "class='btn btn-link export' data-width='480px' id='{$exportMethod}'");
}
if(common::hasPriv('doc', 'createLib'))
+2 -2
View File
@@ -1369,7 +1369,7 @@ $lang->job->methodOrder[25] = 'exec';
/* Doc. */
$lang->resource->doc = new stdclass();
$lang->resource->doc->index = 'index';
$lang->resource->doc->browse = 'mySpace';
$lang->resource->doc->mySpace = 'mySpace';
$lang->resource->doc->myView = 'myView';
$lang->resource->doc->myCollection = 'myCollection';
$lang->resource->doc->myCreation = 'myCreation';
@@ -1392,7 +1392,7 @@ $lang->resource->doc->deleteCatalog = 'deleteCatalog';
$lang->resource->doc->displaySetting = 'displaySetting';
$lang->doc->methodOrder[5] = 'index';
$lang->doc->methodOrder[10] = 'browse';
$lang->doc->methodOrder[10] = 'mySpace';
$lang->doc->methodOrder[15] = 'myView';
$lang->doc->methodOrder[20] = 'myCollection';
$lang->doc->methodOrder[25] = 'myCreation';