Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into zentaoipd
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@ if(!class_exists('config')){class config{}}
|
||||
if(!function_exists('getWebRoot')){function getWebRoot(){}}
|
||||
|
||||
/* 基本设置。Basic settings. */
|
||||
$config->version = '18.3'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it.
|
||||
$config->version = '18.4'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it.
|
||||
$config->liteVersion = '1.2'; // 迅捷版版本。 The version of Lite.
|
||||
$config->charset = 'UTF-8'; // ZenTaoPHP的编码。 The encoding of ZenTaoPHP.
|
||||
$config->cookieLife = time() + 2592000; // Cookie的生存时间。The cookie life time.
|
||||
|
||||
@@ -92,6 +92,7 @@ $filter->doc->objectlibs = new stdclass();
|
||||
$filter->doc->tablecontents = new stdclass();
|
||||
$filter->doc->showfiles = new stdclass();
|
||||
$filter->doc->default = new stdclass();
|
||||
$filter->api->default = new stdClass();
|
||||
$filter->api->index = new stdClass();
|
||||
$filter->api->create = new stdClass();
|
||||
$filter->api->edit = new stdClass();
|
||||
@@ -225,6 +226,9 @@ $filter->doc->default->cookie['product'] = 'int';
|
||||
$filter->doc->showfiles->cookie['docFilesViewType'] = 'code';
|
||||
$filter->doc->tablecontents->cookie['preProductID'] = 'int';
|
||||
$filter->doc->tablecontents->cookie['preBranch'] = 'reg::word';
|
||||
|
||||
$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';
|
||||
|
||||
+63
-1
File diff suppressed because one or more lines are too long
+62
-1
@@ -441,8 +441,11 @@ CREATE TABLE IF NOT EXISTS `zt_chart` (
|
||||
`desc` text NOT NULL,
|
||||
`settings` mediumtext NOT NULL,
|
||||
`filters` mediumtext NOT NULL,
|
||||
`step` tinyint(1) unsigned NOT NULL,
|
||||
`fields` mediumtext NOT NULL,
|
||||
`langs` text NOT NULL,
|
||||
`sql` mediumtext,
|
||||
`stage` enum('draft','published') NOT NULL DEFAULT 'draft',
|
||||
`builtin` tinyint(1) unsigned NOT NULL,
|
||||
`objects` mediumtext NOT NULL,
|
||||
`createdBy` char(30) NOT NULL,
|
||||
@@ -461,7 +464,7 @@ CREATE TABLE IF NOT EXISTS `zt_screen` (
|
||||
`cover` mediumtext NOT NULL,
|
||||
`scheme` mediumtext NOT NULL,
|
||||
`status` enum('draft','published') NOT NULL DEFAULT 'draft',
|
||||
`builtin` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
||||
`builtin` enum('0', '1') NOT NULL DEFAULT '0',
|
||||
`createdBy` char(30) NOT NULL,
|
||||
`createdDate` datetime NOT NULL,
|
||||
`editedBy` char(30) NOT NULL,
|
||||
@@ -469,6 +472,20 @@ CREATE TABLE IF NOT EXISTS `zt_screen` (
|
||||
`deleted` enum('0','1') NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
-- DROP TABLE IF EXISTS `zt_dimension`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_dimension` (
|
||||
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(90) NOT NULL,
|
||||
`code` varchar(45) NOT NULL,
|
||||
`desc` text NOT NULL,
|
||||
`createdBy` varchar(30) NOT NULL,
|
||||
`createdDate` datetime NOT NULL,
|
||||
`editedBy` varchar(30) NOT NULL,
|
||||
`editedDate` datetime NOT NULL,
|
||||
`deleted` enum('0','1') NOT NULL default '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `code` (`code`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
-- DROP TABLE IF EXISTS `zt_company`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_company` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
@@ -566,6 +583,7 @@ CREATE TABLE IF NOT EXISTS `zt_dataview` (
|
||||
`view` varchar(57) NOT NULL,
|
||||
`sql` text NOT NULL,
|
||||
`fields` mediumtext NOT NULL,
|
||||
`langs` text NOT NULL,
|
||||
`objects` mediumtext NOT NULL,
|
||||
`createdBy` varchar(30) NOT NULL,
|
||||
`createdDate` datetime NOT NULL,
|
||||
@@ -697,6 +715,8 @@ CREATE TABLE IF NOT EXISTS `zt_doclib` (
|
||||
`collector` text NOT NULL,
|
||||
`desc` mediumtext NOT NULL,
|
||||
`order` tinyint(5) unsigned NOT NULL,
|
||||
`addedBy` varchar(30) NOT NULL,
|
||||
`addedDate` datetime NOT NULL,
|
||||
`deleted` enum('0','1') NOT NULL default '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `product` (`product`),
|
||||
@@ -13921,6 +13941,47 @@ REPLACE INTO `zt_screen` (`id`, `dimension`, `name`, `desc`, `cover`, `scheme`,
|
||||
|
||||
UPDATE `zt_screen` SET builtin = '1', status = 'published';
|
||||
|
||||
UPDATE `zt_grouppriv` SET `module` = 'dataview' WHERE `module` = 'dataset' AND `method` IN ('create', 'browse', 'edit', 'delete');
|
||||
UPDATE `zt_grouppriv` SET `module` = 'screen' WHERE `module` = 'dashboard';
|
||||
UPDATE `zt_grouppriv` SET `module` = 'screen' WHERE `module` = 'report' AND `method` IN ('annualData','allAnnualData');
|
||||
UPDATE `zt_grouppriv` SET `module` = 'pivot' WHERE `module` = 'report' AND `method` IN ('projectDeviation','productSummary', 'bugCreate', 'bugAssign', 'workload', 'showProduct', 'showProject');
|
||||
|
||||
REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) SELECT `group`, 'pivot', 'create' FROM `zt_grouppriv` WHERE `module` = 'report' AND `method` IN ('custom', 'saveReport');
|
||||
REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) SELECT `group`, 'pivot', 'edit' FROM `zt_grouppriv` WHERE `module` = 'report' AND `method` = 'editReport';
|
||||
REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) SELECT `group`, 'pivot', 'delete' FROM `zt_grouppriv` WHERE `module` = 'report' AND `method` = 'deleteReport';
|
||||
REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) SELECT `group`, 'pivot', 'preview' FROM `zt_grouppriv` WHERE `module` = 'report' AND `method` = 'show';
|
||||
REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) SELECT `group`, 'pivot', 'design' FROM `zt_grouppriv` WHERE `module` = 'report' AND `method` = 'useReport';
|
||||
REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) SELECT `group`, 'pivot', 'export' FROM `zt_grouppriv` WHERE `module` = 'report' AND `method` = 'crystalExport';
|
||||
|
||||
DELETE FROM `zt_grouppriv` WHERE `module` = 'dataset' AND `method` = 'view';
|
||||
|
||||
-- DROP TABLE IF EXISTS `zt_pivot`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_pivot` (
|
||||
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`dimension` mediumint(8) unsigned NOT NULL DEFAULT 0,
|
||||
`group` varchar(255) NOT NULL,
|
||||
`name` text NOT NULL,
|
||||
`desc` text NOT NULL,
|
||||
`sql` mediumtext NOT NULL,
|
||||
`fields` mediumtext NOT NULL,
|
||||
`langs` mediumtext NOT NULL,
|
||||
`vars` mediumtext NOT NULL,
|
||||
`objects` mediumtext NULL,
|
||||
`settings` mediumtext NOT NULL,
|
||||
`filters` mediumtext NOT NULL,
|
||||
`step` tinyint(1) unsigned NOT NULL,
|
||||
`stage` enum('draft','published') NOT NULL DEFAULT 'draft',
|
||||
`builtin` enum('0', '1') NOT NULL DEFAULT '0',
|
||||
`createdBy` varchar(30) NOT NULL,
|
||||
`createdDate` datetime NOT NULL,
|
||||
`editedBy` varchar(30) NOT NULL,
|
||||
`editedDate` datetime NOT NULL,
|
||||
`deleted` enum('0', '1') NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY(`dimension`),
|
||||
KEY(`group`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- DROP TABLE IF EXISTS `zt_sqlview`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_sqlview` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
|
||||
@@ -106,45 +106,31 @@ if($config->edition != 'open') $lang->execution->menu->gantt = array('link' =
|
||||
$lang->execution->menu->tree = array('link' => "Tree|execution|tree|executionID=%s");
|
||||
$lang->execution->menu->grouptask = array('link' => "Group view|execution|grouptask|executionID=%s");
|
||||
|
||||
$lang->kanbanProject->menu->doc['subMenu'] = new stdclass();
|
||||
|
||||
$lang->kanbanProject->menu->settings['subMenu'] = new stdclass();
|
||||
$lang->kanbanProject->menu->settings['subMenu']->view = array('link' => "$lang->overview|project|view|project=%s", 'alias' => 'edit');
|
||||
$lang->kanbanProject->menu->settings['subMenu']->members = array('link' => "{$lang->team->common}|project|team|project=%s", 'alias' => 'managemembers,team');
|
||||
$lang->kanbanProject->menu->settings['subMenu']->whitelist = array('link' => "{$lang->whitelist}|project|whitelist|project=%s", 'subModule' => 'personnel');
|
||||
|
||||
unset($lang->doc->menu->product);
|
||||
unset($lang->doc->menu->api);
|
||||
unset($lang->doc->menu->execution);
|
||||
|
||||
$lang->URCommon = 'Story';
|
||||
$lang->SRCommon = 'Story';
|
||||
|
||||
/* Doc menu. */
|
||||
$lang->doc->menu = new stdclass();
|
||||
$lang->doc->menu->dashboard = array('link' => "{$lang->dashboard}|doc|index");
|
||||
$lang->doc->menu->recent = array('link' => "{$lang->doc->recent}|doc|browse|browseTyp=byediteddate", 'alias' => 'recent');
|
||||
$lang->doc->menu->my = array('link' => "{$lang->doc->my}|doc|browse|browseTyp=openedbyme", 'alias' => 'my');
|
||||
$lang->doc->menu->collect = array('link' => "{$lang->doc->favorite}|doc|browse|browseTyp=collectedbyme", 'alias' => 'collect');
|
||||
$lang->doc->menu->project = array('link' => "{$lang->doc->project}|doc|tableContents|type=project", 'alias' => 'showfiles,project');
|
||||
$lang->doc->menu->custom = array('link' => "{$lang->doc->custom}|doc|tableContents|type=custom", 'alias' => 'custom');
|
||||
$lang->doc->menu->my = array('link' => "{$lang->doc->mySpace}|doc|browse|browseTyp=openedbyme", 'alias' => 'my');
|
||||
$lang->doc->menu->project = array('link' => "{$lang->doc->projectSpace}|doc|tableContents|type=project", 'alias' => 'showfiles,project');
|
||||
$lang->doc->menu->custom = array('link' => "{$lang->doc->teamSpace}|doc|tableContents|type=custom", 'alias' => 'custom');
|
||||
|
||||
$lang->doc->dividerMenu = ',project,';
|
||||
|
||||
/* Doc menu order. */
|
||||
$lang->doc->menuOrder = array();
|
||||
$lang->doc->menuOrder[5] = 'dashboard';
|
||||
$lang->doc->menuOrder[10] = 'recent';
|
||||
$lang->doc->menuOrder[15] = 'my';
|
||||
$lang->doc->menuOrder[20] = 'collect';
|
||||
$lang->doc->menuOrder[25] = 'product';
|
||||
$lang->doc->menuOrder[30] = 'custom';
|
||||
|
||||
$lang->doc->menu->project['subMenu'] = new stdclass();
|
||||
$lang->doc->menu->custom['subMenu'] = new stdclass();
|
||||
$lang->doc->menuOrder[10] = 'my';
|
||||
$lang->doc->menuOrder[15] = 'project';
|
||||
$lang->doc->menuOrder[20] = 'custom';
|
||||
|
||||
/* Admin menu. */
|
||||
$lang->admin->menu = new stdclass();
|
||||
$lang->admin->menu = new stdclass();
|
||||
|
||||
/* adjust items of search. */
|
||||
$lang->searchObjects['all'] = 'All';
|
||||
|
||||
@@ -106,45 +106,31 @@ if($config->edition != 'open') $lang->execution->menu->gantt = array('link' =
|
||||
$lang->execution->menu->tree = array('link' => "Tree|execution|tree|executionID=%s");
|
||||
$lang->execution->menu->grouptask = array('link' => "Group view|execution|grouptask|executionID=%s");
|
||||
|
||||
$lang->kanbanProject->menu->doc['subMenu'] = new stdclass();
|
||||
|
||||
$lang->kanbanProject->menu->settings['subMenu'] = new stdclass();
|
||||
$lang->kanbanProject->menu->settings['subMenu']->view = array('link' => "$lang->overview|project|view|project=%s", 'alias' => 'edit');
|
||||
$lang->kanbanProject->menu->settings['subMenu']->members = array('link' => "{$lang->team->common}|project|team|project=%s", 'alias' => 'managemembers,team');
|
||||
$lang->kanbanProject->menu->settings['subMenu']->whitelist = array('link' => "{$lang->whitelist}|project|whitelist|project=%s", 'subModule' => 'personnel');
|
||||
|
||||
unset($lang->doc->menu->product);
|
||||
unset($lang->doc->menu->api);
|
||||
unset($lang->doc->menu->execution);
|
||||
|
||||
$lang->URCommon = 'Story';
|
||||
$lang->SRCommon = 'Story';
|
||||
|
||||
/* Doc menu. */
|
||||
$lang->doc->menu = new stdclass();
|
||||
$lang->doc->menu->dashboard = array('link' => "{$lang->dashboard}|doc|index");
|
||||
$lang->doc->menu->recent = array('link' => "{$lang->doc->recent}|doc|browse|browseTyp=byediteddate", 'alias' => 'recent');
|
||||
$lang->doc->menu->my = array('link' => "{$lang->doc->my}|doc|browse|browseTyp=openedbyme", 'alias' => 'my');
|
||||
$lang->doc->menu->collect = array('link' => "{$lang->doc->favorite}|doc|browse|browseTyp=collectedbyme", 'alias' => 'collect');
|
||||
$lang->doc->menu->project = array('link' => "{$lang->doc->project}|doc|tableContents|type=project", 'alias' => 'showfiles,project');
|
||||
$lang->doc->menu->custom = array('link' => "{$lang->doc->custom}|doc|tableContents|type=custom", 'alias' => 'custom');
|
||||
$lang->doc->menu->my = array('link' => "{$lang->doc->mySpace}|doc|browse|browseTyp=openedbyme", 'alias' => 'my');
|
||||
$lang->doc->menu->project = array('link' => "{$lang->doc->projectSpace}|doc|tableContents|type=project", 'alias' => 'showfiles,project');
|
||||
$lang->doc->menu->custom = array('link' => "{$lang->doc->teamSpace}|doc|tableContents|type=custom", 'alias' => 'custom');
|
||||
|
||||
$lang->doc->dividerMenu = ',project,';
|
||||
|
||||
/* Doc menu order. */
|
||||
$lang->doc->menuOrder = array();
|
||||
$lang->doc->menuOrder[5] = 'dashboard';
|
||||
$lang->doc->menuOrder[10] = 'recent';
|
||||
$lang->doc->menuOrder[15] = 'my';
|
||||
$lang->doc->menuOrder[20] = 'collect';
|
||||
$lang->doc->menuOrder[25] = 'project';
|
||||
$lang->doc->menuOrder[30] = 'custom';
|
||||
|
||||
$lang->doc->menu->project['subMenu'] = new stdclass();
|
||||
$lang->doc->menu->custom['subMenu'] = new stdclass();
|
||||
$lang->doc->menuOrder[10] = 'my';
|
||||
$lang->doc->menuOrder[15] = 'project';
|
||||
$lang->doc->menuOrder[20] = 'custom';
|
||||
|
||||
/* Admin menu. */
|
||||
$lang->admin->menu = new stdclass();
|
||||
$lang->admin->menu = new stdclass();
|
||||
|
||||
/* adjust items of search. */
|
||||
$lang->searchObjects['all'] = 'All';
|
||||
|
||||
@@ -106,45 +106,31 @@ if($config->edition != 'open') $lang->execution->menu->gantt = array('link' =
|
||||
$lang->execution->menu->tree = array('link' => "Tree|execution|tree|executionID=%s");
|
||||
$lang->execution->menu->grouptask = array('link' => "Group view|execution|grouptask|executionID=%s");
|
||||
|
||||
$lang->kanbanProject->menu->doc['subMenu'] = new stdclass();
|
||||
|
||||
$lang->kanbanProject->menu->settings['subMenu'] = new stdclass();
|
||||
$lang->kanbanProject->menu->settings['subMenu']->view = array('link' => "$lang->overview|project|view|project=%s", 'alias' => 'edit');
|
||||
$lang->kanbanProject->menu->settings['subMenu']->members = array('link' => "{$lang->team->common}|project|team|project=%s", 'alias' => 'managemembers,team');
|
||||
$lang->kanbanProject->menu->settings['subMenu']->whitelist = array('link' => "{$lang->whitelist}|project|whitelist|project=%s", 'subModule' => 'personnel');
|
||||
|
||||
unset($lang->doc->menu->product);
|
||||
unset($lang->doc->menu->api);
|
||||
unset($lang->doc->menu->execution);
|
||||
|
||||
$lang->URCommon = 'Story';
|
||||
$lang->SRCommon = 'Story';
|
||||
|
||||
/* Doc menu. */
|
||||
$lang->doc->menu = new stdclass();
|
||||
$lang->doc->menu->dashboard = array('link' => "{$lang->dashboard}|doc|index");
|
||||
$lang->doc->menu->recent = array('link' => "{$lang->doc->recent}|doc|browse|browseTyp=byediteddate", 'alias' => 'recent');
|
||||
$lang->doc->menu->my = array('link' => "{$lang->doc->my}|doc|browse|browseTyp=openedbyme", 'alias' => 'my');
|
||||
$lang->doc->menu->collect = array('link' => "{$lang->doc->favorite}|doc|browse|browseTyp=collectedbyme", 'alias' => 'collect');
|
||||
$lang->doc->menu->project = array('link' => "{$lang->doc->project}|doc|tableContents|type=project", 'alias' => 'showfiles,project');
|
||||
$lang->doc->menu->custom = array('link' => "{$lang->doc->custom}|doc|tableContents|type=custom", 'alias' => 'custom');
|
||||
$lang->doc->menu->my = array('link' => "{$lang->doc->mySpace}|doc|browse|browseTyp=openedbyme", 'alias' => 'my');
|
||||
$lang->doc->menu->project = array('link' => "{$lang->doc->projectSpace}|doc|tableContents|type=project", 'alias' => 'showfiles,project');
|
||||
$lang->doc->menu->custom = array('link' => "{$lang->doc->teamSpace}|doc|tableContents|type=custom", 'alias' => 'custom');
|
||||
|
||||
$lang->doc->dividerMenu = ',project,';
|
||||
|
||||
/* Doc menu order. */
|
||||
$lang->doc->menuOrder = array();
|
||||
$lang->doc->menuOrder[5] = 'dashboard';
|
||||
$lang->doc->menuOrder[10] = 'recent';
|
||||
$lang->doc->menuOrder[15] = 'my';
|
||||
$lang->doc->menuOrder[20] = 'collect';
|
||||
$lang->doc->menuOrder[25] = 'project';
|
||||
$lang->doc->menuOrder[30] = 'custom';
|
||||
|
||||
$lang->doc->menu->project['subMenu'] = new stdclass();
|
||||
$lang->doc->menu->custom['subMenu'] = new stdclass();
|
||||
$lang->doc->menuOrder[10] = 'my';
|
||||
$lang->doc->menuOrder[15] = 'project';
|
||||
$lang->doc->menuOrder[20] = 'custom';
|
||||
|
||||
/* Admin menu. */
|
||||
$lang->admin->menu = new stdclass();
|
||||
$lang->admin->menu = new stdclass();
|
||||
|
||||
/* adjust items of search. */
|
||||
$lang->searchObjects['all'] = 'All';
|
||||
|
||||
@@ -106,45 +106,32 @@ if($config->edition != 'open') $lang->execution->menu->gantt = array('link' =
|
||||
$lang->execution->menu->tree = array('link' => "树状图|execution|tree|executionID=%s");
|
||||
$lang->execution->menu->grouptask = array('link' => "分组视图|execution|grouptask|executionID=%s");
|
||||
|
||||
$lang->kanbanProject->menu->doc['subMenu'] = new stdclass();
|
||||
|
||||
$lang->kanbanProject->menu->settings['subMenu'] = new stdclass();
|
||||
$lang->kanbanProject->menu->settings['subMenu']->view = array('link' => "$lang->overview|project|view|project=%s", 'alias' => 'edit');
|
||||
$lang->kanbanProject->menu->settings['subMenu']->members = array('link' => "{$lang->team->common}|project|team|project=%s", 'alias' => 'managemembers,team');
|
||||
$lang->kanbanProject->menu->settings['subMenu']->whitelist = array('link' => "{$lang->whitelist}|project|whitelist|project=%s", 'subModule' => 'personnel');
|
||||
|
||||
unset($lang->doc->menu->product);
|
||||
unset($lang->doc->menu->api);
|
||||
unset($lang->doc->menu->execution);
|
||||
|
||||
$lang->URCommon = '目标';
|
||||
$lang->SRCommon = '目标';
|
||||
|
||||
/* Doc menu. */
|
||||
$lang->doc->menu = new stdclass();
|
||||
$lang->doc->menu->dashboard = array('link' => "{$lang->dashboard}|doc|index");
|
||||
$lang->doc->menu->recent = array('link' => "{$lang->doc->recent}|doc|browse|browseTyp=byediteddate", 'alias' => 'recent');
|
||||
$lang->doc->menu->my = array('link' => "{$lang->doc->my}|doc|browse|browseTyp=openedbyme", 'alias' => 'my');
|
||||
$lang->doc->menu->collect = array('link' => "{$lang->doc->favorite}|doc|browse|browseTyp=collectedbyme", 'alias' => 'collect');
|
||||
$lang->doc->menu->project = array('link' => "{$lang->doc->project}|doc|tableContents|type=project", 'alias' => 'showfiles,project');
|
||||
$lang->doc->menu->custom = array('link' => "{$lang->doc->custom}|doc|tableContents|type=custom", 'alias' => 'custom');
|
||||
$lang->doc->menu->my = array('link' => "{$lang->doc->mySpace}|doc|browse|browseTyp=openedbyme", 'alias' => 'my');
|
||||
$lang->doc->menu->project = array('link' => "{$lang->doc->projectSpace}|doc|tableContents|type=project", 'alias' => 'showfiles,project');
|
||||
$lang->doc->menu->custom = array('link' => "{$lang->doc->teamSpace}|doc|tableContents|type=custom", 'alias' => 'custom');
|
||||
|
||||
$lang->doc->dividerMenu = ',project,';
|
||||
|
||||
/* Doc menu order. */
|
||||
$lang->doc->menuOrder = array();
|
||||
$lang->doc->menuOrder[5] = 'dashboard';
|
||||
$lang->doc->menuOrder[10] = 'recent';
|
||||
$lang->doc->menuOrder[15] = 'my';
|
||||
$lang->doc->menuOrder[20] = 'collect';
|
||||
$lang->doc->menuOrder[25] = 'project';
|
||||
$lang->doc->menuOrder[30] = 'custom';
|
||||
|
||||
$lang->doc->menu->project['subMenu'] = new stdclass();
|
||||
$lang->doc->menu->custom['subMenu'] = new stdclass();
|
||||
$lang->doc->menuOrder[10] = 'my';
|
||||
$lang->doc->menuOrder[15] = 'project';
|
||||
$lang->doc->menuOrder[20] = 'custom';
|
||||
|
||||
/* Admin menu. */
|
||||
$lang->admin->menu = new stdclass();
|
||||
$lang->admin->menu = new stdclass();
|
||||
|
||||
/* adjust items of search. */
|
||||
$lang->searchObjects['all'] = '全部';
|
||||
|
||||
@@ -171,7 +171,12 @@ class html extends baseHTML
|
||||
$convertedPinYin = (empty($config->isINT) and class_exists('common')) ? common::convert2Pinyin($options) : array();
|
||||
if(count($options) >= $config->maxCount or isset($config->moreLinks[$name]))
|
||||
{
|
||||
if(strpos($attrib, 'chosen') !== false) $attrib = str_replace('chosen', 'picker-select', $attrib);
|
||||
if(strpos($attrib, 'chosen') !== false)
|
||||
{
|
||||
$attrib = str_replace('chosen', 'picker-select', $attrib);
|
||||
$attrib = preg_replace('/data-drop[-_]?direction=([\'"]?)down([\'"]?)/i', 'data-drop-direction=$1bottom$2', $attrib);
|
||||
$attrib = preg_replace('/data-drop[-_]?direction=([\'"]?)up([\'"]?)/i', 'data-drop-direction=$1top$2', $attrib);
|
||||
}
|
||||
if(isset($config->moreLinks[$name]))
|
||||
{
|
||||
$link = $config->moreLinks[$name];
|
||||
|
||||
@@ -1666,7 +1666,8 @@ class actionModel extends model
|
||||
}
|
||||
else
|
||||
{
|
||||
$action->objectLink = helper::createLink('doc', 'objectLibs', sprintf($vars, $docLib->type, $docLib->objectID, $action->objectID, $appendLib));
|
||||
$libType = $docLib->type == 'execution' ? 'project' : $docLib->type;
|
||||
$action->objectLink = helper::createLink('doc', 'tablecontents', sprintf($vars, $libType, $docLib->objectID, $action->objectID, $appendLib));
|
||||
}
|
||||
}
|
||||
elseif($action->objectType == 'user')
|
||||
|
||||
@@ -11,7 +11,7 @@ $config->api->struct = new stdClass();
|
||||
$config->api->struct->requiredFields = 'name,params';
|
||||
|
||||
$config->api->create = new stdclass();
|
||||
$config->api->create->requiredFields = 'lib,title,path';
|
||||
$config->api->create->requiredFields = 'title,path';
|
||||
|
||||
$config->api->edit = new stdclass();
|
||||
$config->api->edit->requiredFields = 'lib,title,path';
|
||||
@@ -33,23 +33,23 @@ $config->api->search['module'] = 'api';
|
||||
$config->api->search['fields']['title'] = $lang->api->title;
|
||||
$config->api->search['fields']['id'] = $lang->api->id;
|
||||
$config->api->search['fields']['lib'] = $lang->api->lib;
|
||||
$config->api->search['fields']['path'] = $lang->api->path;
|
||||
$config->api->search['fields']['method'] = $lang->api->method;
|
||||
$config->api->search['fields']['status'] = $lang->api->status;
|
||||
$config->api->search['fields']['addedBy'] = $lang->api->addedBy;
|
||||
$config->api->search['fields']['addedDate'] = $lang->api->addedDate;
|
||||
$config->api->search['fields']['editedBy'] = $lang->api->editedBy;
|
||||
$config->api->search['fields']['editedDate'] = $lang->api->editedDate;
|
||||
$config->api->search['fields']['path'] = $lang->api->path;
|
||||
$config->api->search['fields']['method'] = $lang->api->method;
|
||||
$config->api->search['fields']['status'] = $lang->api->status;
|
||||
$config->api->search['fields']['version'] = $lang->api->version;
|
||||
|
||||
$config->api->search['params']['title'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
|
||||
$config->api->search['params']['id'] = array('operator' => '=', 'control' => 'input', 'values' => '');
|
||||
$config->api->search['params']['lib'] = array('operator' => '=', 'control' => 'select', 'values' => '');
|
||||
$config->api->search['params']['path'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
|
||||
$config->api->search['params']['method'] = array('operator' => '=', 'control' => 'select', 'values' => array('' => '') + $lang->api->methodOptions);
|
||||
$config->api->search['params']['status'] = array('operator' => '=', 'control' => 'select', 'values' => array('' => '') + $lang->api->statusOptions);
|
||||
$config->api->search['params']['addedBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
|
||||
$config->api->search['params']['addedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
|
||||
$config->api->search['params']['editedBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
|
||||
$config->api->search['params']['editedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
|
||||
$config->api->search['params']['path'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
|
||||
$config->api->search['params']['method'] = array('operator' => '=', 'control' => 'select', 'values' => array('' => '') + $lang->api->methodOptions);
|
||||
$config->api->search['params']['status'] = array('operator' => '=', 'control' => 'select', 'values' => array('' => '') + $lang->api->statusOptions);
|
||||
$config->api->search['params']['version'] = array('operator' => '>=', 'control' => 'input', 'values' => '');
|
||||
|
||||
+208
-124
@@ -11,12 +11,18 @@
|
||||
*/
|
||||
class api extends control
|
||||
{
|
||||
public $objectType = 'nolink';
|
||||
public $objectID = 0;
|
||||
|
||||
public function __construct($moduleName = '', $methodName = '', $appName = '')
|
||||
{
|
||||
parent::__construct($moduleName, $methodName, $appName);
|
||||
$this->user = $this->loadModel('user');
|
||||
$this->doc = $this->loadModel('doc');
|
||||
$this->action = $this->loadModel('action');
|
||||
|
||||
if($this->cookie->objectType) $this->objectType = $this->cookie->objectType;
|
||||
if($this->cookie->objectID) $this->objectID = $this->cookie->objectID;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -35,26 +41,51 @@ class api extends control
|
||||
*/
|
||||
public function index($libID = 0, $moduleID = 0, $apiID = 0, $version = 0, $release = 0, $appendLib = 0, $browseType = '', $param = 0)
|
||||
{
|
||||
$objectType = $this->objectType;
|
||||
$objectID = $this->objectID;
|
||||
|
||||
/* Get all api doc libraries. */
|
||||
$libs = $this->doc->getApiLibs($appendLib);
|
||||
if($libID == 0 and !empty($libs)) $libID = key($libs);
|
||||
$loadLib = false;
|
||||
$libs = $this->doc->getApiLibs($appendLib, $objectType, $objectID);
|
||||
if(empty($libs) and $objectType != 'nolink')
|
||||
{
|
||||
$objectType = 'nolink';
|
||||
$objectID = 0;
|
||||
$libs = $this->doc->getApiLibs($appendLib, 'nolink');
|
||||
}
|
||||
|
||||
if(empty($libs))
|
||||
{
|
||||
list($normalObjects, $closedObjects) = $this->api->getOrderedObjects();
|
||||
|
||||
if(!empty($normalObjects))
|
||||
{
|
||||
$objectType = key($normalObjects);
|
||||
$objectID = key($normalObjects[$objectType]);
|
||||
$libs = $this->doc->getApiLibs($appendLib, $objectType, $objectID);
|
||||
}
|
||||
elseif(!empty($closedObjects))
|
||||
{
|
||||
$objectType = key($closedObjects);
|
||||
$objectID = key($closedObjects[$objectType]);
|
||||
$libs = $this->doc->getApiLibs($appendLib, $objectType, $objectID);
|
||||
}
|
||||
}
|
||||
|
||||
if($libID == 0 and !empty($libs))
|
||||
{
|
||||
$lib = current($libs);
|
||||
$libID = $lib->id;
|
||||
$objectType = $lib->product ? 'product' : ($lib->project ? 'project' : '');
|
||||
$objectID = $lib->product ? $lib->product : $lib->project;
|
||||
if($loadLib) $libs = $this->doc->getApiLibs($appendLib);
|
||||
}
|
||||
|
||||
/* Get an api doc. */
|
||||
if($apiID > 0)
|
||||
{
|
||||
$api = $this->api->getLibById($apiID, $version, $release);
|
||||
if($api)
|
||||
{
|
||||
$moduleID = $api->module;
|
||||
$libID = $api->lib;
|
||||
$api->desc = htmlspecialchars_decode($api->desc);
|
||||
|
||||
$this->view->api = $api;
|
||||
$this->view->apiID = $apiID;
|
||||
$this->view->version = $version;
|
||||
$this->view->typeList = $this->api->getTypeList($api->lib);
|
||||
$this->view->actions = $apiID ? $this->action->getList('api', $apiID) : array();
|
||||
}
|
||||
echo $this->fetch('api', 'view', "libID=$libID&apiID=$apiID&moduleID=$moduleID&release=$release&version=$version");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -68,37 +99,76 @@ class api extends control
|
||||
$lib = $this->doc->getLibById($libID);
|
||||
$appendLib = (!empty($lib) and $lib->deleted == '1') ? $libID : 0;
|
||||
|
||||
/* Generate bread crumbs dropMenu. */
|
||||
if($libs) $this->lang->modulePageNav = $this->generateLibsDropMenu($libs, $libID, $release);
|
||||
|
||||
$this->setMenu($libID, $moduleID);
|
||||
$this->lang->TRActions = '<a class="btn btn-link querybox-toggle" id="bysearchTab"><i class="icon icon-search muted"></i> ' . $this->lang->api->search . '</a>' . $this->lang->TRActions;
|
||||
|
||||
/* Build the search form. */
|
||||
$queryID = $browseType == 'bySearch' ? (int)$param : 0;
|
||||
$actionURL = $this->createLink('api', 'index', "libID=$libID&moduleID=0&apiID=0&version=0&release=0&appendLib=0&browseType=bySearch¶m=myQueryID");
|
||||
$this->api->buildSearchForm($lib,$queryID, $actionURL);
|
||||
$this->api->buildSearchForm($lib,$queryID, $actionURL, $libs);
|
||||
|
||||
if($browseType == 'bySearch')
|
||||
{
|
||||
$this->view->apiList = $this->api->getApiListBySearch($libID, $queryID);
|
||||
$this->view->apiList = $this->api->getApiListBySearch($libID, $queryID, '', array_keys($libs));
|
||||
$this->view->typeList = $this->api->getTypeList($libID);
|
||||
}
|
||||
|
||||
$this->view->lib = $lib;
|
||||
$this->view->isRelease = $release > 0;
|
||||
$this->view->release = $release;
|
||||
$this->view->title = $this->lang->api->pageTitle;
|
||||
$this->view->libID = $libID;
|
||||
$this->view->apiID = $apiID;
|
||||
$this->view->libs = $libs;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->moduleTree = $libID ? $this->doc->getApiModuleTree($libID, $apiID, $release, $moduleID) : '';
|
||||
$this->view->users = $this->user->getPairs('noclosed,noletter');
|
||||
$this->view->lib = $lib;
|
||||
$this->view->release = $release;
|
||||
$this->view->title = $this->lang->api->pageTitle;
|
||||
$this->view->libID = $libID;
|
||||
$this->view->apiID = $apiID;
|
||||
$this->view->libs = $libs;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->objectType = $objectType;
|
||||
$this->view->objectID = $objectID;
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->libTree = $this->api->getLibTree($libID, $libs, $moduleID, $objectID, $browseType);
|
||||
$this->view->users = $this->user->getPairs('noclosed,noletter');
|
||||
$this->view->objectDropdown = isset($libs[$libID]) ? $this->generateLibsDropMenu($libs[$libID], $release) : '';
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* View api.
|
||||
*
|
||||
* @param int $libID
|
||||
* @param int $apiID
|
||||
* @param int $moduleID
|
||||
* @param int $release
|
||||
* @param int $version
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function view($libID, $apiID, $moduleID = 0, $release = 0, $version = 0)
|
||||
{
|
||||
/* Get all api doc libraries. */
|
||||
$libs = $this->doc->getApiLibs($libID);
|
||||
|
||||
$api = $this->api->getLibById($apiID, $version, $release);
|
||||
if($api)
|
||||
{
|
||||
$moduleID = $api->module;
|
||||
$libID = $api->lib;
|
||||
$api->desc = htmlspecialchars_decode($api->desc);
|
||||
|
||||
$this->view->api = $api;
|
||||
$this->view->apiID = $apiID;
|
||||
$this->view->version = $version;
|
||||
$this->view->typeList = $this->api->getTypeList($api->lib);
|
||||
$this->view->actions = $apiID ? $this->action->getList('api', $apiID) : array();
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->api->pageTitle;
|
||||
$this->view->libs = $libs;
|
||||
$this->view->isRelease = $release > 0;
|
||||
$this->view->release = $release;
|
||||
$this->view->libID = $libID;
|
||||
$this->view->apiID = $apiID;
|
||||
$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->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Release list.
|
||||
*
|
||||
@@ -110,7 +180,7 @@ class api extends control
|
||||
{
|
||||
$libs = $this->doc->getApiLibs();
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$this->lang->modulePageNav = $this->generateLibsDropMenu($libs, $libID);
|
||||
$this->lang->modulePageNav = $this->generateLibsDropMenu($libs[$libID]);
|
||||
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
@@ -198,7 +268,7 @@ class api extends control
|
||||
{
|
||||
$libs = $this->doc->getApiLibs();
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$this->lang->modulePageNav = $this->generateLibsDropMenu($libs, $libID, $releaseID);
|
||||
$this->lang->modulePageNav = $this->generateLibsDropMenu($libs[$libID], $releaseID);
|
||||
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
@@ -329,30 +399,40 @@ class api extends control
|
||||
/**
|
||||
* Create a api doc library.
|
||||
*
|
||||
* @param string normal|demo
|
||||
* @param string $type project|product
|
||||
* @param int $objectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function createLib($type = 'normal')
|
||||
public function createLib($type = 'product', $objectID = 0)
|
||||
{
|
||||
if(!in_array($type, array('product', 'project'))) $type = 'product';
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$libID = $type == 'demo' ? $this->api->createDemoData($this->post->name, $this->post->baseUrl) : $this->doc->createApiLib();
|
||||
if(dao::isError()) return $this->sendError(dao::getError());
|
||||
|
||||
/* If the created api library of imported zentao api library, return directly. */
|
||||
if($type == 'demo') return $this->sendSuccess(array('locate' => $this->createLink('api', 'index', "libID=$libID")));
|
||||
$libID = $this->doc->createApiLib();
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
/* Record action for create api library. */
|
||||
$this->action->create('docLib', $libID, 'Created');
|
||||
$this->action->create('doclib', $libID, 'created');
|
||||
if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
|
||||
|
||||
/* Set locate object data. */
|
||||
setCookie("objectType", $this->post->libType, $this->config->cookieLife, $this->config->webRoot);
|
||||
setCookie("objectID", $this->post->libType == 'project' ? $this->post->project : $this->post->product, $this->config->cookieLife, $this->config->webRoot);
|
||||
|
||||
if(!helper::isAjaxRequest()) return print(js::locate($this->createLink('api', 'index', "libID=$libID"), 'parent.parent'));
|
||||
return $this->sendSuccess(array('locate' => $this->createLink('api', 'index', "libID=$libID")));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('api', 'index', "libID=$libID")));
|
||||
}
|
||||
|
||||
$this->view->type = $type;
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->users = $this->user->getPairs('nocode|noclosed');
|
||||
$this->lang->api->aclList['default'] = sprintf($this->lang->api->aclList['default'], $this->lang->{$type}->common);
|
||||
|
||||
$this->view->type = $type;
|
||||
$this->view->objectID = $objectID;
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->users = $this->user->getPairs('nocode|noclosed');
|
||||
$this->view->projects = $this->loadModel('project')->getPairsByModel();
|
||||
$this->view->products = $this->loadModel('product')->getPairs();
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -366,28 +446,36 @@ class api extends control
|
||||
*/
|
||||
public function editLib($id)
|
||||
{
|
||||
$doc = $this->doc->getLibById($id);
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$lib = fixer::input('post')->join('groups', ',')->join('users', ',')->get();
|
||||
|
||||
if($lib->acl == 'private') $lib->users = $this->app->user->account;
|
||||
$this->doc->updateApiLib($id, $doc, $lib);
|
||||
$this->doc->updateApiLib($id);
|
||||
|
||||
if(dao::isError()) return $this->sendError(dao::getError());
|
||||
|
||||
$res = array(
|
||||
'message' => $this->lang->saveSuccess,
|
||||
'closeModal' => true,
|
||||
'callback' => "redirectParentWindow($id)",
|
||||
);
|
||||
return $this->sendSuccess($res);
|
||||
return $this->sendSuccess(array('message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => "redirectParentWindow($id)"));
|
||||
}
|
||||
|
||||
$this->view->doc = $doc;
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->users = $this->user->getPairs('nocode|noclosed');
|
||||
$lib = $this->doc->getLibById($id);
|
||||
$type = 'nolink';
|
||||
if(!empty($lib->product))
|
||||
{
|
||||
$type = 'product';
|
||||
$this->view->object = $this->loadModel('product')->getByID($lib->product);
|
||||
}
|
||||
if(!empty($lib->project))
|
||||
{
|
||||
$type = 'project';
|
||||
$this->view->object = $this->loadModel('project')->getById($lib->project);
|
||||
}
|
||||
if($type != 'nolink') $this->lang->api->aclList['default'] = sprintf($this->lang->doclib->aclList['default'], $this->lang->{$type}->common);
|
||||
if($type == 'nolink') unset($this->lang->api->aclList['default']);
|
||||
|
||||
$this->view->lib = $lib;
|
||||
$this->view->type = $type;
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->users = $this->user->getPairs('nocode|noclosed');
|
||||
$this->view->projects = $this->loadModel('project')->getPairsByModel();
|
||||
$this->view->products = $this->loadModel('product')->getPairs();
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -480,6 +568,8 @@ class api extends control
|
||||
if($api === false) return $this->sendError(dao::getError());
|
||||
|
||||
$this->action->create('api', $api->id, 'Created');
|
||||
|
||||
if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
|
||||
return $this->sendSuccess(array('locate' => helper::createLink('api', 'index', "libID={$api->lib}&moduleID=0&apiID={$api->id}")));
|
||||
}
|
||||
|
||||
@@ -492,7 +582,7 @@ class api extends control
|
||||
$libName = isset($lib->name) ? $lib->name . $this->lang->colon : '';
|
||||
|
||||
$this->getTypeOptions($libID);
|
||||
$this->view->gobackLink = $this->createLink('api', 'index', "libID=$libID&moduleID=$moduleID");
|
||||
$this->view->gobackLink = '';
|
||||
$this->view->user = $this->app->user->account;
|
||||
$this->view->allUsers = $this->loadModel('user')->getPairs('devfirst|noclosed');
|
||||
$this->view->libID = $libID;
|
||||
@@ -614,7 +704,7 @@ class api extends control
|
||||
*/
|
||||
private function setMenu($libID = 0, $moduleID = 0)
|
||||
{
|
||||
common::setMenuVars('doc', $libID);
|
||||
common::setMenuVars('doc', '');
|
||||
|
||||
/* Global struct link. */
|
||||
$menu = '';
|
||||
@@ -657,76 +747,38 @@ class api extends control
|
||||
/**
|
||||
* Generate api doc index page dropMenu
|
||||
*
|
||||
* @param array $libs
|
||||
* @param int $libID
|
||||
* @param int $version
|
||||
* @param object $lib
|
||||
* @param int $version
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
private function generateLibsDropMenu($libs, $libID, $version = 0)
|
||||
private function generateLibsDropMenu($lib, $version = 0)
|
||||
{
|
||||
if(empty($libs)) return '';
|
||||
if(!isset($libs[$libID])) return '';
|
||||
if(empty($lib)) return '';
|
||||
|
||||
$methodName = $this->app->rawMethod;
|
||||
|
||||
$libName = $libs[$libID]->name;
|
||||
$output = <<<EOT
|
||||
<div class='btn-group angle-btn'>
|
||||
<div class='btn-group'>
|
||||
<button id='currentBranch' data-toggle='dropdown' type='button' class='btn btn-limit'><div class='nobr'>{$libName}</div> <span class='caret'></span>
|
||||
</button>
|
||||
<div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList'>
|
||||
<div class="input-control search-box has-icon-left has-icon-right search-example">
|
||||
<input type="search" class="form-control search-input" />
|
||||
<label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>
|
||||
<a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a>
|
||||
</div>
|
||||
<div class='table-col'>
|
||||
<div class='list-group'>
|
||||
EOT;
|
||||
foreach($libs as $key => $lib)
|
||||
$objectTitle = $this->lang->api->noLinked;
|
||||
$objectType = 'nolink';
|
||||
$objectID = 0;
|
||||
if($lib->product)
|
||||
{
|
||||
$selected = $key == $libID ? 'selected' : '';
|
||||
$output .= html::a(inlink($methodName, "libID=$key"), $lib->name, '', "class='$selected' data-app='{$this->app->tab}'");
|
||||
$objectType = 'product';
|
||||
$objectID = $lib->product;
|
||||
$product = $this->loadModel('product')->getByID($objectID);
|
||||
$objectTitle = zget($product, 'name', '');
|
||||
}
|
||||
if(count($libs) >= 2 and common::hasPriv('doc', 'sortLibs'))
|
||||
elseif($lib->project)
|
||||
{
|
||||
$output .= '<li class="divider"></li>';
|
||||
$output .= html::a($this->createLink('doc', 'sortLibs', "type=api&objectID=0", '', true), "<i class='icon-move'></i> {$this->lang->doc->sortLibs}", '', "data-title='{$this->lang->doc->sortLibs}' data-toggle='modal' data-type='iframe' data-width='400px' data-app='{$this->app->tab}'");
|
||||
}
|
||||
$output .= "</div></div></div></div></div>";
|
||||
|
||||
/* Get lib version */
|
||||
$versions = $this->api->getReleaseListByApi($libID);
|
||||
if(!empty($versions))
|
||||
{
|
||||
$versionName = $version > 0 ? $versions[$version]->version : $this->lang->api->defaultVersion;
|
||||
$output .= <<<EOT
|
||||
<div class='btn-group angle-btn'>
|
||||
<div class='btn-group'>
|
||||
<button id='currentBranch' data-toggle='dropdown' type='button' class='btn btn-limit'><div class='nobr'>{$versionName}</div> <span class='caret'></span>
|
||||
</button>
|
||||
<div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList'>
|
||||
<div class="input-control search-box has-icon-left has-icon-right search-example">
|
||||
<input type="search" class="form-control search-input" />
|
||||
<label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>
|
||||
<a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a>
|
||||
</div>
|
||||
<div class='table-col'>
|
||||
<div class='list-group'>
|
||||
EOT;
|
||||
$params = $methodName == 'index' ? "libID=$libID&moduleID=0&apiID=0&version=0" : "libID=$libID";
|
||||
$selected = $version > 0 ? '' : 'selected';
|
||||
$output .= html::a(inlink($methodName, $params . "&release=0"), $this->lang->api->defaultVersion, '', "class='$selected'");
|
||||
foreach($versions as $key => $item)
|
||||
{
|
||||
$selected = $key == $version ? 'selected' : '';
|
||||
$output .= html::a(inlink($methodName, $params . "&release=$key"), $item->version, '', "class='$selected' data-app='{$this->app->tab}'");
|
||||
}
|
||||
$output .= "</div></div></div></div></div>";
|
||||
$objectType = 'project';
|
||||
$objectID = $lib->project;
|
||||
$project = $this->loadModel('project')->getByID($objectID);
|
||||
$objectTitle = zget($project, 'name', '');
|
||||
}
|
||||
|
||||
$dropMenuLink = helper::createLink('api', 'ajaxGetDropMenu', "objectType=$objectType&objectID=$objectID&libID=$lib->id&version=$version");
|
||||
|
||||
$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'>";
|
||||
$output .= '<div class="input-control search-box has-icon-left has-icon-right search-example"><input type="search" class="form-control search-input" /><label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label><a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a></div>';
|
||||
$output .= "</div></div>";
|
||||
return $output;
|
||||
}
|
||||
|
||||
@@ -861,4 +913,36 @@ EOT;
|
||||
}
|
||||
$this->view->typeOptions = $options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax get objectType drop menu.
|
||||
*
|
||||
* @param string $objectType
|
||||
* @param int $objectID
|
||||
* @param string $module
|
||||
* @param string $method
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetDropMenu($objectType, $objectID, $module, $method)
|
||||
{
|
||||
list($normalObjects, $closedObjects) = $this->api->getOrderedObjects();
|
||||
|
||||
$titleList = array($this->lang->api->noLinked);
|
||||
if(!empty($normalObjects['product'])) $titleList += array_values($normalObjects['product']);
|
||||
if(!empty($normalObjects['project'])) $titleList += array_values($normalObjects['project']);
|
||||
if(!empty($closedObjects['product'])) $titleList += array_values($closedObjects['product']);
|
||||
if(!empty($closedObjects['project'])) $titleList += array_values($closedObjects['project']);
|
||||
|
||||
$this->view->objectType = $objectType;
|
||||
$this->view->objectID = $objectID;
|
||||
$this->view->module = $module;
|
||||
$this->view->method = $method;
|
||||
$this->view->normalObjects = $normalObjects;
|
||||
$this->view->closedObjects = $closedObjects;
|
||||
$this->view->nolinkLibs = $this->doc->getApiLibs(0, 'nolink');
|
||||
$this->view->objectsPinYin = common::convert2Pinyin($titleList);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,3 +100,62 @@ ol, ul {margin-bottom: 0}
|
||||
|
||||
form .table-data, #content .table-data {border: 1px solid #e2e2e3;}
|
||||
.table-data thead {background: #f9f9f9;}
|
||||
|
||||
#aclBox .acl-tip {color: #838a9d;}
|
||||
.lib {width: 130px; margin-bottom: 10px;}
|
||||
.addbtn {padding-top: 22px; height: 63px; border: 1px dashed #ddd; width: 60px;}
|
||||
.addbtn .icon-plus {font-size: 18px; display: block; opacity: 0.5; transition: opacity .2s; text-shadow: 1px 1px 3px rgba(0,0,0,.2);}
|
||||
.addbtn:hover .icon-plus {opacity: .9; animation: flash-icon 1s linear alternate infinite;}
|
||||
#subHeader #dropMenu {min-width: 250px; box-sizing: inhert; max-height: inherit;}
|
||||
#subHeader #dropMenu .table-col .list-group {padding-top: 10px;}
|
||||
.main-col .block-files .panel-heading {padding-right: 20px;}
|
||||
.main-col .block-files .panel-heading .panel-title {height: 35px; line-height: 30px;}
|
||||
.side-col .action a {margin: 0 auto 3px; display: block; max-width: 200px;}
|
||||
.side-col .tips {padding: 0 10px;}
|
||||
.main-col .doc-title {display: flex; font-size: 16px; margin-bottom: 15px;}
|
||||
.main-col .doc-title .title {margin: 0; line-height: 30px; font-size: 25px;}
|
||||
.main-col .doc-title .http-method {line-height: 27px; height: 27px; font-size: 13px; margin-right: 10px; padding: 0 10px;}
|
||||
.main-col .doc-title .path {line-height: 30px; font-size: 20px; margin-right: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
|
||||
.main-col .doc-title .info {flex: 1 1 0;}
|
||||
.main-col .doc-title .version a {font-size: 13px; color: #8c8c8c;}
|
||||
.main-col .doc-title .version .dropdown-menu a:hover {color: #ffffff;}
|
||||
.main-col .doc-title .actions {min-width: 120px; display: inline-block;}
|
||||
.main-col .doc-title .actions a + a {margin-left: 8px;}
|
||||
.main-col .doc-title .actions i {font-size: 15px; color: #8c8c8c;}
|
||||
#content h2.title {margin: 0; font-size: 17px;}
|
||||
#content h3.title {font-weight: 500; font-size: 17px!important;}
|
||||
#content .desc {margin: 10px 0; color: #57585b; word-wrap: break-word;}
|
||||
#content .detail-content {padding-left: 10px;}
|
||||
#mainContent .scrollbar-hover {max-height: 2000px; overflow: scroll;}
|
||||
#sidebar {width: 275px;}
|
||||
#sidebar>.cell {width: 100%;}
|
||||
#sidebar>.sidebar-toggle {left: 3px; right: auto;}
|
||||
.hide-sidebar #sidebar>.cell {display: none;}
|
||||
.hide-sidebar #sidebar>.sidebar-toggle>.icon:before {content: "\e314";}
|
||||
.detail.empty {line-height: 200px;}
|
||||
.main-col+.side-col {padding-left: 16px;}
|
||||
.main-col iframe {min-height: 380px;}
|
||||
.article-content .keywords {margin-bottom: 15px;}
|
||||
|
||||
.article-content {width: 100%; display: inline-block;}
|
||||
.outline {position: relative;}
|
||||
.outline .outline-toggle i.icon-angle-right, i.icon-angle-left {width: 18px; height: 18px; border-radius: 50%; position: absolute; padding-left: 2px; padding-top: 1px;}
|
||||
.outline .outline-toggle i.icon-angle-right:before {content: "\e314"; cursor: pointer;}
|
||||
.outline .outline-toggle i.icon-angle-left:before {content: "\e315"; cursor: pointer;}
|
||||
.outline ul li {list-style: none;}
|
||||
.outline-content {display: none; padding-top: 18px;}
|
||||
.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;}
|
||||
|
||||
.article-content.comment {width: 100% !important;}
|
||||
|
||||
.cell .detail .detail-title {padding-left: 5px; list-style: none;}
|
||||
.menu-actions {top: 5px!important; right: 45px;}
|
||||
.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;}
|
||||
.no-content-button a:nth-child(2) {margin-left: 20px;}
|
||||
|
||||
.paramsTable th {text-align: left!important; font-size: 14px;}
|
||||
.paramsTable td {text-align: left;}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.modal-dialog {width: 75%;}
|
||||
form {margin-bottom: 100px; padding-left: 65px;}
|
||||
form {margin-bottom: 100px;}
|
||||
table {width: 90% !important;}
|
||||
#whiteListBox div.input-group {margin-bottom: 2px;}
|
||||
#whiteListBox .input-group:last-child {margin-top: 10px;}
|
||||
|
||||
+44
-134
@@ -1,142 +1,52 @@
|
||||
.lib {width: 130px; margin-bottom: 10px;}
|
||||
.addbtn {padding-top: 22px; height: 63px; border: 1px dashed #ddd; width: 60px;}
|
||||
.addbtn .icon-plus {font-size: 18px; display: block; opacity: 0.5; transition: opacity .2s; text-shadow: 1px 1px 3px rgba(0,0,0,.2);}
|
||||
.addbtn:hover .icon-plus {opacity: .9; animation: flash-icon 1s linear alternate infinite;}
|
||||
#subHeader #dropMenu {min-width: 250px; box-sizing: inhert; max-height: inherit;}
|
||||
#subHeader #dropMenu .table-col .list-group {padding-top: 10px;}
|
||||
.main-col .block-files .panel-heading {padding-right: 20px;}
|
||||
.main-col .block-files .panel-heading .panel-title {height: 35px; line-height: 30px;}
|
||||
.side-col .action a {margin: 0 auto 3px; display: block; max-width: 200px;}
|
||||
.side-col .tips {padding: 0 10px;}
|
||||
.main-col .doc-title {display: flex; font-size: 16px; margin-bottom: 15px;}
|
||||
.main-col .doc-title .title {margin: 0; line-height: 30px; font-size: 25px;}
|
||||
.main-col .doc-title .http-method {line-height: 27px; height: 27px; font-size: 13px; margin-right: 10px; padding: 0 10px;}
|
||||
.main-col .doc-title .path {line-height: 30px; font-size: 20px; margin-right: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
|
||||
.main-col .doc-title .info {flex: 1 1 0;}
|
||||
.main-col .doc-title .version a {font-size: 13px; color: #8c8c8c;}
|
||||
.main-col .doc-title .version .dropdown-menu a:hover {color: #ffffff;}
|
||||
.main-col .doc-title .actions {min-width: 120px; display: inline-block;}
|
||||
.main-col .doc-title .actions a + a {margin-left: 8px;}
|
||||
.main-col .doc-title .actions i {font-size: 15px; color: #8c8c8c;}
|
||||
#content h2.title {margin: 0; font-size: 17px;}
|
||||
#content h3.title {font-weight: 500; font-size: 17px!important;}
|
||||
#content .desc {margin: 10px 0; color: #57585b; word-wrap: break-word;}
|
||||
#content .detail-content {padding-left: 10px;}
|
||||
#mainContent .scrollbar-hover {max-height: 2000px; overflow: scroll;}
|
||||
#sidebar {width: 275px;}
|
||||
#sidebar>.cell {width: 100%;}
|
||||
#sidebar>.sidebar-toggle {left: 3px; right: auto;}
|
||||
.hide-sidebar #sidebar>.cell {display: none;}
|
||||
.hide-sidebar #sidebar>.sidebar-toggle>.icon:before {content: "\e314";}
|
||||
.detail.empty {line-height: 200px;}
|
||||
.main-col+.side-col {padding-left: 16px;}
|
||||
.main-col iframe {min-height: 380px;}
|
||||
.article-content .keywords {margin-bottom: 15px;}
|
||||
.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;}
|
||||
|
||||
.article-content {width: 100%; display: inline-block;}
|
||||
.outline {position: relative;}
|
||||
.outline .outline-toggle i.icon-angle-right, i.icon-angle-left {width: 18px; height: 18px; border-radius: 50%; position: absolute; padding-left: 2px; padding-top: 1px;}
|
||||
.outline .outline-toggle i.icon-angle-right:before {content: "\e314"; cursor: pointer;}
|
||||
.outline .outline-toggle i.icon-angle-left:before {content: "\e315"; cursor: pointer;}
|
||||
.outline ul li {list-style: none;}
|
||||
.outline-content {display: none; padding-top: 18px;}
|
||||
.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;}
|
||||
|
||||
.article-content.comment {width: 100% !important;}
|
||||
|
||||
.cell .detail .detail-title {padding-left: 5px; list-style: none;}
|
||||
.menu-actions {position: absolute; top: 7px; right: 45px; padding: 7px 8px;}
|
||||
.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;}
|
||||
.no-content-button a:nth-child(2) {margin-left: 20px;}
|
||||
|
||||
.detail .list-group-item .heading.GET {
|
||||
background-color: #e7f0f7;
|
||||
}
|
||||
.detail .list-group-item .heading.GET a {
|
||||
color: #0f6ab4;
|
||||
}
|
||||
.cell .detail .detail-title {padding-left: 5px; list-style: none;}
|
||||
.menu-actions {position: absolute; top: 7px; right: 45px; padding: 7px 8px;}
|
||||
.detail ul {position: relative;}
|
||||
.tail-info {position: absolute; right: 0; padding-left: 10px; padding-top: 1px;}
|
||||
.tail-info, .doc-title, span.item {background: #fff;}
|
||||
span.item>a {padding-left: 6px;}
|
||||
span.dotted-line+a {display: block;}
|
||||
#modules li.doc:before, .chapterNode:before, .independent:before {content: " "; width: 100%; border-bottom: 1px dashed #b5b9c5; position: absolute; top: 13px; right: 0; left: 30px;}
|
||||
.doc-title ,.item{display: inline-block !important; position: relative; padding-right: 10px; max-width:80%; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;}
|
||||
#modules i.icon-file-text {color: #D0D2D6; font-size: 14px;}
|
||||
|
||||
.detail .list-group-item .heading.OPTIONS {
|
||||
background-color: #e7f0f7;
|
||||
}
|
||||
.detail .list-group-item .heading.OPTIONS a {
|
||||
color: #0f6ab4;
|
||||
}
|
||||
.sortable-sorting .module-name > a {cursor: move;}
|
||||
.sortable-sorting li >.tree-group {opacity: .5;}
|
||||
.sortable-sorting li:before {opacity: .3;}
|
||||
.sortable-sorting .drop-here .tree-group {background-color: #fff3e0;}
|
||||
.sortable-sorting .drop-here .tree-group > * {opacity: .1;}
|
||||
.sortable-sorting .drag-shadow .tree-group {opacity: 1!important;}
|
||||
.sortable-sorting .drag-shadow .tree-actions {visibility: hidden;}
|
||||
.is-sorting > li:before {opacity: 1;}
|
||||
.is-sorting > li > .tree-group {opacity: 1; border-radius: 4px;}
|
||||
.is-sorting > li ul {display: none!important;}
|
||||
li.drag-shadow ul {display: none!important;}
|
||||
.cell {height: 100%;}
|
||||
|
||||
.detail .list-group-item .heading.POST {
|
||||
background-color: #e7f6ec;
|
||||
}
|
||||
.detail .list-group-item .heading.POST a {
|
||||
color: #10a54a;
|
||||
}
|
||||
|
||||
.detail .list-group-item .heading.PUT {
|
||||
background-color: #f9f2e9;
|
||||
}
|
||||
.detail .list-group-item .heading.PUT a {
|
||||
color: #c5862b;
|
||||
}
|
||||
.detail .list-group-item .heading.PATCH {
|
||||
background-color: #f9f2e9;
|
||||
}
|
||||
.detail .list-group-item .heading.PATCH a {
|
||||
color: #c5862b;
|
||||
}
|
||||
|
||||
.detail .list-group-item .heading.DELETE {
|
||||
background-color: #f5e8e8;
|
||||
border: 1px solid #e8c6c7;
|
||||
}
|
||||
.detail .list-group-item .heading.DELETE a {
|
||||
color: #a41e22;
|
||||
}
|
||||
|
||||
.detail .list-group-item a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.detail .list-group-item .path, .detail .list-group-item .desc {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.detail .list-group-item .path {
|
||||
padding-left: 10px;
|
||||
font-size: 14px;
|
||||
color: black;
|
||||
flex: 1;
|
||||
}
|
||||
.detail .list-group-item .desc {
|
||||
width: auto;
|
||||
font-size: 14px;
|
||||
line-height: 38px;
|
||||
float: right;
|
||||
padding-right: 10px;
|
||||
max-width: 200px;
|
||||
}
|
||||
.detail .list-group-item {list-style: none; font-size: 14px; margin-bottom: 10px; line-height: 30px}
|
||||
.detail .list-group-item span {line-height: 30px; width: 65px;}
|
||||
.detail .list-group-item .label+.label {margin-left: -4px;}
|
||||
.detail .list-group-item .label {border-radius: 0;}
|
||||
|
||||
.paramsTable th {text-align: left!important; font-size: 14px;}
|
||||
.paramsTable td {text-align: left;}
|
||||
|
||||
.tree-group {position: relative;}
|
||||
.tree-group > .module-name {white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; display: block;}
|
||||
.tree li.active > .tree-group a {font-weight: 700; color: #0c64eb;}
|
||||
.tree-actions {display: inline-block; margin-left: 5px; vertical-align: middle;}
|
||||
.tree-group .tree-actions {display: none; position: absolute; right: 0; top: 0; background-color: #fff; white-space: nowrap;}
|
||||
.tree-group:hover .tree-actions {display: block}
|
||||
.tree-actions a {display: inline-block; margin-left: 5px; font-size: 13px; opacity: .6;}
|
||||
.tree li.active > .tree-group a {font-weight: 700; color: #0c64eb;}
|
||||
|
||||
.base-url {background: #f3f3f3; margin: 0; border-top: 1px solid #eee;}
|
||||
.base-url > p {margin: 0; padding-left: 20px; color: black;}
|
||||
.detail+.detail {border-top: 0px;}
|
||||
#queryBox #groupAndOr {min-width: 60px;}
|
||||
.tree li>.list-toggle {left: -4px;}
|
||||
|
||||
+30
-6
@@ -19,7 +19,7 @@ function loadDocModule(libID)
|
||||
*/
|
||||
function toggleAcl(acl, type)
|
||||
{
|
||||
if(acl == 'custom')
|
||||
if(acl == 'private')
|
||||
{
|
||||
$('#whiteListBox').removeClass('hidden');
|
||||
}
|
||||
@@ -27,15 +27,39 @@ function toggleAcl(acl, type)
|
||||
{
|
||||
$('#whiteListBox').addClass('hidden');
|
||||
}
|
||||
if(type == 'lib')
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle lib type.
|
||||
*
|
||||
* @param string $libType
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function toggleLibType(libType)
|
||||
{
|
||||
if(libType == 'project')
|
||||
{
|
||||
var notice = typeof(noticeAcl[acl]) != 'undefined' ? noticeAcl[acl] : '';
|
||||
$('#noticeAcl').html(notice);
|
||||
$('#projectBox').removeClass('hidden');
|
||||
$('#productBox').addClass('hidden');
|
||||
$('#acldefault').closest('.radio').show();
|
||||
$('#acldefault').next('.acl-tip').html($('#acldefault').next('.acl-tip').html().replace(productLang, projectLang));
|
||||
}
|
||||
else if(libType == 'product')
|
||||
{
|
||||
$('#projectBox').addClass('hidden');
|
||||
$('#productBox').removeClass('hidden');
|
||||
$('#acldefault').closest('.radio').show();
|
||||
$('#acldefault').next('.acl-tip').html($('#acldefault').next('.acl-tip').html().replace(projectLang, productLang));
|
||||
}
|
||||
else
|
||||
{
|
||||
var notice = typeof(noticeAcl[acl]) != 'undefined' ? noticeAcl[acl] : '';
|
||||
$('#noticeAcl').html(notice);
|
||||
var acl = $("input[name='acl']:checked").val();
|
||||
if(acl == 'default') $("input[id='aclopen']").prop('checked', true);
|
||||
|
||||
$('#projectBox').addClass('hidden');
|
||||
$('#productBox').addClass('hidden');
|
||||
$('#acldefault').closest('.radio').hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,4 +10,4 @@ $(document).ready(function()
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,22 +1,3 @@
|
||||
$(document).ready(function()
|
||||
{
|
||||
/* Update doc content silently on switch doc version, story #40503 */
|
||||
$(document).on('click', '.api-version-menu a, #mainActions .container a', function(event)
|
||||
{
|
||||
var $tmpDiv = $('<div>');
|
||||
$tmpDiv.load($(this).data('url') + ' #mainContent', function()
|
||||
{
|
||||
$('#content').html($tmpDiv.find('#content').html());
|
||||
$('#sidebarContent').html($tmpDiv.find('#sidebarContent').html());
|
||||
$('#actionbox .histories-list').html($tmpDiv.find('#actionbox .histories-list').html());
|
||||
if($.cookie('isFullScreen') == 1) fullScreen();
|
||||
$('#content [data-ride="tree"]').tree();
|
||||
$('#outline li.has-list').addClass('open in');
|
||||
$('#outline li.has-list>i+ul').prev('i').remove();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Ajax delete api doc.
|
||||
*
|
||||
|
||||
+13
-4
@@ -39,7 +39,6 @@ $lang->api->noModule = 'No directory in the API library. Please add the
|
||||
$lang->api->post = 'Auf Seiten Liste beziehen bei POST Debug';
|
||||
$lang->api->noUniqueName = 'The API library name exists.';
|
||||
$lang->api->noUniqueVersion = 'The version exists.';
|
||||
$lang->api->version = 'Version';
|
||||
$lang->api->createStruct = 'Create Data Structure';
|
||||
$lang->api->editStruct = 'Edit Data Structure';
|
||||
$lang->api->deleteStruct = 'Delete Data Structure';
|
||||
@@ -61,12 +60,13 @@ $lang->api->defaultVersion = "Current Version";
|
||||
$lang->api->zentaoAPI = "Zentao API v1";
|
||||
$lang->api->search = "Search";
|
||||
$lang->api->allLibs = "AllLibs";
|
||||
$lang->api->noLinked = "No Linked";
|
||||
|
||||
/* Common access control lang. */
|
||||
$lang->api->whiteList = 'Whitelist';
|
||||
$lang->api->aclList['open'] = 'Open';
|
||||
$lang->api->aclList['private'] = 'Private';
|
||||
$lang->api->aclList['custom'] = 'Custom';
|
||||
$lang->api->aclList['open'] = "Public <span class='acl-tip'>(Users who can access doccan access it)</span>";
|
||||
$lang->api->aclList['default'] = "Default <span class='acl-tip'>(Users who can access the selected %s can access it)</span>";
|
||||
$lang->api->aclList['private'] = "Private <span class='acl-tip'> (Only the one who created it or users in the whiltelist can access it)</span>";
|
||||
$lang->api->group = 'Group';
|
||||
$lang->api->user = 'User';
|
||||
|
||||
@@ -148,6 +148,10 @@ $lang->api->default = 'Default';
|
||||
$lang->api->desc = 'Beschreibung';
|
||||
$lang->api->customType = 'Custom Structure';
|
||||
$lang->api->format = 'Format';
|
||||
$lang->api->libType = 'Api Library Type';
|
||||
$lang->api->product = $lang->productCommon;
|
||||
$lang->api->project = $lang->projectCommon;
|
||||
|
||||
$lang->api->methodOptions = array(
|
||||
'GET' => 'GET',
|
||||
'POST' => 'POST',
|
||||
@@ -169,6 +173,11 @@ $lang->api->requestTypeOptions['application/json'] = 'applicati
|
||||
$lang->api->requestTypeOptions['application/x-www-form-urlencoded'] = 'application/x-www-form-urlencoded';
|
||||
$lang->api->requestTypeOptions['multipart/form-data'] = 'multipart/form-data';
|
||||
|
||||
$lang->api->libTypeList = array();
|
||||
$lang->api->libTypeList['product'] = $lang->productCommon . ' Api Library';
|
||||
$lang->api->libTypeList['project'] = $lang->projectCommon . ' Api Library';
|
||||
$lang->api->libTypeList['nolink'] = 'No Linked Api Library';
|
||||
|
||||
$lang->api->statusOptions = array(
|
||||
'done' => 'Done',
|
||||
'doing' => 'Doing',
|
||||
|
||||
+13
-4
@@ -39,7 +39,6 @@ $lang->api->noModule = 'No directory in the API library. Please add the
|
||||
$lang->api->post = 'Please refer to the page form for post debugging';
|
||||
$lang->api->noUniqueName = 'The API library name exists.';
|
||||
$lang->api->noUniqueVersion = 'The version exists.';
|
||||
$lang->api->version = 'Version';
|
||||
$lang->api->createStruct = 'Create Data Structure';
|
||||
$lang->api->editStruct = 'Edit Data Structure';
|
||||
$lang->api->deleteStruct = 'Delete Data Structure';
|
||||
@@ -61,12 +60,13 @@ $lang->api->defaultVersion = "Current Version";
|
||||
$lang->api->zentaoAPI = "Zentao API v1";
|
||||
$lang->api->search = "Search";
|
||||
$lang->api->allLibs = "AllLibs";
|
||||
$lang->api->noLinked = "No Linked";
|
||||
|
||||
/* Common access control lang. */
|
||||
$lang->api->whiteList = 'Whitelist';
|
||||
$lang->api->aclList['open'] = 'Open';
|
||||
$lang->api->aclList['private'] = 'Private';
|
||||
$lang->api->aclList['custom'] = 'Custom';
|
||||
$lang->api->aclList['open'] = "Public <span class='acl-tip'>(Users who can access doccan access it)</span>";
|
||||
$lang->api->aclList['default'] = "Default <span class='acl-tip'>(Users who can access the selected %s can access it)</span>";
|
||||
$lang->api->aclList['private'] = "Private <span class='acl-tip'> (Only the one who created it or users in the whiltelist can access it)</span>";
|
||||
$lang->api->group = 'Group';
|
||||
$lang->api->user = 'User';
|
||||
|
||||
@@ -148,6 +148,10 @@ $lang->api->default = 'Default';
|
||||
$lang->api->desc = 'Description';
|
||||
$lang->api->customType = 'Custom Structure';
|
||||
$lang->api->format = 'Format';
|
||||
$lang->api->libType = 'Api Library Type';
|
||||
$lang->api->product = $lang->productCommon;
|
||||
$lang->api->project = $lang->projectCommon;
|
||||
|
||||
$lang->api->methodOptions = array(
|
||||
'GET' => 'GET',
|
||||
'POST' => 'POST',
|
||||
@@ -169,6 +173,11 @@ $lang->api->requestTypeOptions['application/json'] = 'applicati
|
||||
$lang->api->requestTypeOptions['application/x-www-form-urlencoded'] = 'application/x-www-form-urlencoded';
|
||||
$lang->api->requestTypeOptions['multipart/form-data'] = 'multipart/form-data';
|
||||
|
||||
$lang->api->libTypeList = array();
|
||||
$lang->api->libTypeList['product'] = $lang->productCommon . ' Api Library';
|
||||
$lang->api->libTypeList['project'] = $lang->projectCommon . ' Api Library';
|
||||
$lang->api->libTypeList['nolink'] = 'No Linked Api Library';
|
||||
|
||||
$lang->api->statusOptions = array(
|
||||
'done' => 'Done',
|
||||
'doing' => 'Doing',
|
||||
|
||||
+13
-4
@@ -39,7 +39,6 @@ $lang->api->noModule = 'No directory in the API library. Please add the
|
||||
$lang->api->post = 'Se référer à la liste si POST Debug';
|
||||
$lang->api->noUniqueName = 'The API library name exists.';
|
||||
$lang->api->noUniqueVersion = 'The version exists.';
|
||||
$lang->api->version = 'Version';
|
||||
$lang->api->createStruct = 'Create Data Structure';
|
||||
$lang->api->editStruct = 'Edit Data Structure';
|
||||
$lang->api->deleteStruct = 'Delete Data Structure';
|
||||
@@ -61,12 +60,13 @@ $lang->api->defaultVersion = "Current Version";
|
||||
$lang->api->zentaoAPI = "Zentao API v1";
|
||||
$lang->api->search = "Search";
|
||||
$lang->api->allLibs = "AllLibs";
|
||||
$lang->api->noLinked = "No Linked";
|
||||
|
||||
/* Common access control lang. */
|
||||
$lang->api->whiteList = 'Whitelist';
|
||||
$lang->api->aclList['open'] = 'Open';
|
||||
$lang->api->aclList['private'] = 'Private';
|
||||
$lang->api->aclList['custom'] = 'Custom';
|
||||
$lang->api->aclList['open'] = "Public <span class='acl-tip'>(Users who can access doccan access it)</span>";
|
||||
$lang->api->aclList['default'] = "Default <span class='acl-tip'>(Users who can access the selected %s can access it)</span>";
|
||||
$lang->api->aclList['private'] = "Private <span class='acl-tip'> (Only the one who created it or users in the whiltelist can access it)</span>";
|
||||
$lang->api->group = 'Group';
|
||||
$lang->api->user = 'User';
|
||||
|
||||
@@ -148,6 +148,10 @@ $lang->api->default = 'Default';
|
||||
$lang->api->desc = 'Description';
|
||||
$lang->api->customType = 'Custom Structure';
|
||||
$lang->api->format = 'Format';
|
||||
$lang->api->libType = 'Api Library Type';
|
||||
$lang->api->product = $lang->productCommon;
|
||||
$lang->api->project = $lang->projectCommon;
|
||||
|
||||
$lang->api->methodOptions = array(
|
||||
'GET' => 'GET',
|
||||
'POST' => 'POST',
|
||||
@@ -169,6 +173,11 @@ $lang->api->requestTypeOptions['application/json'] = 'applicati
|
||||
$lang->api->requestTypeOptions['application/x-www-form-urlencoded'] = 'application/x-www-form-urlencoded';
|
||||
$lang->api->requestTypeOptions['multipart/form-data'] = 'multipart/form-data';
|
||||
|
||||
$lang->api->libTypeList = array();
|
||||
$lang->api->libTypeList['product'] = $lang->productCommon . ' Api Library';
|
||||
$lang->api->libTypeList['project'] = $lang->projectCommon . ' Api Library';
|
||||
$lang->api->libTypeList['nolink'] = 'No Linked Api Library';
|
||||
|
||||
$lang->api->statusOptions = array(
|
||||
'done' => 'Done',
|
||||
'doing' => 'Doing',
|
||||
|
||||
+32
-23
@@ -13,13 +13,13 @@ $lang->api->common = 'API接口';
|
||||
$lang->api->getModel = '超级model调用接口';
|
||||
$lang->api->sql = 'SQL查询接口';
|
||||
|
||||
$lang->api->index = '接口库主页';
|
||||
$lang->api->editLib = '编辑接口库';
|
||||
$lang->api->index = '库主页';
|
||||
$lang->api->editLib = '编辑库';
|
||||
$lang->api->releases = '版本管理';
|
||||
$lang->api->deleteRelease = '删除版本';
|
||||
$lang->api->deleteLib = '删除接口库';
|
||||
$lang->api->deleteLib = '删除库';
|
||||
$lang->api->createRelease = '发布接口';
|
||||
$lang->api->createLib = '创建接口库';
|
||||
$lang->api->createLib = '创建库';
|
||||
$lang->api->createApi = '创建接口';
|
||||
$lang->api->createAB = '创建';
|
||||
$lang->api->createDemo = '导入禅道API';
|
||||
@@ -35,17 +35,16 @@ $lang->api->result = '返回结果';
|
||||
$lang->api->status = '状态';
|
||||
$lang->api->data = '内容';
|
||||
$lang->api->noParam = 'GET方式调试不需要输入参数,';
|
||||
$lang->api->noModule = '接口库下没有目录,请先维护目录';
|
||||
$lang->api->noModule = '库下没有目录,请先维护目录';
|
||||
$lang->api->post = 'POST方式调试请参照页面表单';
|
||||
$lang->api->noUniqueName = '接口库名已存在。';
|
||||
$lang->api->noUniqueName = '库名已存在。';
|
||||
$lang->api->noUniqueVersion = '版本已存在。';
|
||||
$lang->api->version = '版本';
|
||||
$lang->api->createStruct = '创建数据结构';
|
||||
$lang->api->editStruct = '编辑数据结构';
|
||||
$lang->api->deleteStruct = '删除数据结构';
|
||||
$lang->api->create = '创建接口';
|
||||
$lang->api->title = '接口名称';
|
||||
$lang->api->pageTitle = '接口库';
|
||||
$lang->api->pageTitle = '库';
|
||||
$lang->api->module = '目录';
|
||||
$lang->api->apiDoc = '接口';
|
||||
$lang->api->manageType = '维护目录';
|
||||
@@ -55,18 +54,19 @@ $lang->api->done = '开发完成';
|
||||
$lang->api->basicInfo = '基本信息';
|
||||
$lang->api->apiDesc = '接口说明';
|
||||
$lang->api->confirmDelete = "您确定删除该接口吗?";
|
||||
$lang->api->confirmDeleteLib = "您确定删除该接口库吗?";
|
||||
$lang->api->confirmDeleteLib = "您确定删除该库吗?";
|
||||
$lang->api->filterStruct = "使用数据结构填充";
|
||||
$lang->api->defaultVersion = "当前版本";
|
||||
$lang->api->zentaoAPI = "禅道API文档v1";
|
||||
$lang->api->search = "搜索";
|
||||
$lang->api->allLibs = "全部接口库";
|
||||
$lang->api->allLibs = "全部库";
|
||||
$lang->api->noLinked = "无关联";
|
||||
|
||||
/* Common access control lang. */
|
||||
$lang->api->whiteList = '白名单';
|
||||
$lang->api->aclList['open'] = '公开';
|
||||
$lang->api->aclList['private'] = '私有';
|
||||
$lang->api->aclList['custom'] = '自定义';
|
||||
$lang->api->aclList['open'] = "公开 <span class='acl-tip'>(有文档视图权限即可访问)</span>";
|
||||
$lang->api->aclList['default'] = "默认 <span class='acl-tip'>(有所选%s访问权限用户可以访问)</span>";
|
||||
$lang->api->aclList['private'] = "私有 <span class='acl-tip'>(仅创建者和白名单用户可访问)</span>";
|
||||
$lang->api->group = '分组';
|
||||
$lang->api->user = '用户';
|
||||
|
||||
@@ -102,15 +102,15 @@ $lang->api->structType = '类型';
|
||||
$lang->api->structAttr = '属性';
|
||||
$lang->api->structAddedBy = '创建人';
|
||||
$lang->api->structAddedDate = '创建时间';
|
||||
$lang->api->name = '接口库名称';
|
||||
$lang->api->baseUrl = '请求基路径';
|
||||
$lang->api->name = '库名称';
|
||||
$lang->api->baseUrl = '请求基础路径';
|
||||
$lang->api->baseUrlDesc = '网址或者路径,比如 test.zentao.net 或者 /v1';
|
||||
$lang->api->desc = '描述';
|
||||
$lang->api->control = '访问控制';
|
||||
$lang->api->noLib = '暂时没有接口库。';
|
||||
$lang->api->noLib = '暂时没有库。';
|
||||
$lang->api->noApi = '暂时没有接口。';
|
||||
$lang->api->noStruct = '暂时没有数据结构。';
|
||||
$lang->api->lib = '所属接口库';
|
||||
$lang->api->lib = '所属库';
|
||||
$lang->api->apiList = '接口列表';
|
||||
$lang->api->formTitle = '接口名称';
|
||||
$lang->api->path = '请求路径';
|
||||
@@ -125,11 +125,11 @@ $lang->api->query = '请求参数';
|
||||
$lang->api->params = '请求体';
|
||||
$lang->api->response = '请求响应';
|
||||
$lang->api->responseExample = '响应示例';
|
||||
$lang->api->id = '接口编号';
|
||||
$lang->api->addedBy = '由谁添加';
|
||||
$lang->api->addedDate = '添加时间';
|
||||
$lang->api->editedBy = '由谁更新';
|
||||
$lang->api->editedDate = '更新时间';
|
||||
$lang->api->id = 'ID';
|
||||
$lang->api->addedBy = '创建者';
|
||||
$lang->api->addedDate = '创建时间';
|
||||
$lang->api->editedBy = '修改者';
|
||||
$lang->api->editedDate = '修改时间';
|
||||
$lang->api->version = '版本号';
|
||||
$lang->api->res = new stdClass();
|
||||
$lang->api->res->name = '名称';
|
||||
@@ -148,6 +148,10 @@ $lang->api->default = '默认值';
|
||||
$lang->api->desc = '描述';
|
||||
$lang->api->customType = '自定义结构';
|
||||
$lang->api->format = '格式化';
|
||||
$lang->api->libType = '接口库类型';
|
||||
$lang->api->product = '所属' . $lang->productCommon;
|
||||
$lang->api->project = '所属' . $lang->projectCommon;
|
||||
|
||||
$lang->api->methodOptions = array(
|
||||
'GET' => 'GET',
|
||||
'POST' => 'POST',
|
||||
@@ -169,6 +173,11 @@ $lang->api->requestTypeOptions['application/json'] = 'applicati
|
||||
$lang->api->requestTypeOptions['application/x-www-form-urlencoded'] = 'application/x-www-form-urlencoded';
|
||||
$lang->api->requestTypeOptions['multipart/form-data'] = 'multipart/form-data';
|
||||
|
||||
$lang->api->libTypeList = array();
|
||||
$lang->api->libTypeList['product'] = $lang->productCommon . '接口库';
|
||||
$lang->api->libTypeList['project'] = $lang->projectCommon . '接口库';
|
||||
$lang->api->libTypeList['nolink'] = '无关联接口库';
|
||||
|
||||
$lang->api->statusOptions = array(
|
||||
'done' => '开发完成',
|
||||
'doing' => '开发中',
|
||||
@@ -210,7 +219,7 @@ $lang->apistruct = new stdClass();
|
||||
$lang->apistruct->name = '结构名';
|
||||
|
||||
$lang->api_lib_release = new stdClass();
|
||||
$lang->api_lib_release->version = '版本';
|
||||
$lang->api_lib_release->version = '版本号';
|
||||
|
||||
$lang->api->error = new stdclass();
|
||||
$lang->api->error->onlySelect = 'SQL查询接口只允许SELECT查询';
|
||||
|
||||
+144
-34
@@ -394,12 +394,13 @@ class apiModel extends model
|
||||
/**
|
||||
* Get api doc list by module id.
|
||||
*
|
||||
* @param int $libID
|
||||
* @param int $moduleID
|
||||
* @param int $release
|
||||
* @param int $libID
|
||||
* @param int $moduleID
|
||||
* @param int $release
|
||||
* @param object $pager
|
||||
* @return array $list
|
||||
*/
|
||||
public function getListByModuleId($libID = 0, $moduleID = 0, $release = 0)
|
||||
public function getListByModuleId($libID = 0, $moduleID = 0, $release = 0, $pager = null)
|
||||
{
|
||||
/* Get release info. */
|
||||
if($release > 0)
|
||||
@@ -437,6 +438,7 @@ class apiModel extends model
|
||||
->from(TABLE_API)
|
||||
->where($where)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->page($pager)
|
||||
->fetchAll();
|
||||
}
|
||||
array_map(function ($item) {
|
||||
@@ -528,7 +530,7 @@ class apiModel extends model
|
||||
public function getReleaseByQuery($libID, $pager = '', $orderBy = '')
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_API_LIB_RELEASE)
|
||||
->where('lib')->eq($libID)
|
||||
->where('lib')->in($libID)
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
->fetchAll();
|
||||
@@ -902,15 +904,30 @@ class apiModel extends model
|
||||
* @param object $lib
|
||||
* @param string $queryID
|
||||
* @param string $actionURL
|
||||
* @param array $libs
|
||||
* @param string $type product|project
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function buildSearchForm($lib, $queryID, $actionURL)
|
||||
public function buildSearchForm($lib, $queryID, $actionURL, $libs = array(), $type = '')
|
||||
{
|
||||
$this->config->api->search['module'] = 'api';
|
||||
if(empty($lib)) return;
|
||||
$libPairs = array('' => '', $lib->id => $lib->name);
|
||||
$this->config->api->search['module'] = 'api';
|
||||
if(!empty($libs))
|
||||
{
|
||||
foreach($libs as $lib)
|
||||
{
|
||||
if(empty($lib)) continue;
|
||||
if($lib->type != 'api') continue;
|
||||
$libPairs[$lib->id] = $lib->name;
|
||||
}
|
||||
$this->config->api->search['module'] = !empty($type) ? $type . 'apiDoc' : 'api';
|
||||
}
|
||||
|
||||
$this->config->api->search['queryID'] = $queryID;
|
||||
$this->config->api->search['actionURL'] = $actionURL;
|
||||
$this->config->api->search['params']['lib']['values'] = (!empty($lib)) ? array($lib->id => $lib->name) + array('all' => $this->lang->api->allLibs) : array('all' => $this->lang->api->allLibs);
|
||||
$this->config->api->search['params']['lib']['values'] = $libPairs + array('all' => $this->lang->api->allLibs);
|
||||
|
||||
$this->loadModel('search')->setSearchParams($this->config->api->search);
|
||||
}
|
||||
@@ -920,38 +937,131 @@ class apiModel extends model
|
||||
*
|
||||
* @param string $libID
|
||||
* @param int $queryID
|
||||
* @param string $objectType product|project
|
||||
* @param array $libs
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getApiListBySearch($libID, $queryID)
|
||||
public function getApiListBySearch($libID, $queryID, $objectType = '', $libs = array())
|
||||
{
|
||||
if($queryID)
|
||||
{
|
||||
$query = $this->loadModel('search')->getQuery($queryID);
|
||||
if($query)
|
||||
{
|
||||
$this->session->set('apiQuery', $query->sql);
|
||||
$this->session->set('apiForm', $query->form);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->session->set('apiQuery', ' 1 = 1');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if($this->session->apiQuery == false) $this->session->set('apiQuery', ' 1 = 1');
|
||||
}
|
||||
$queryName = $objectType ? $objectType . 'apiDocQuery' : 'apiQuery';
|
||||
$queryForm = $objectType ? $objectType . 'apiDocForm' : 'apiForm';
|
||||
if($queryID)
|
||||
{
|
||||
$query = $this->loadModel('search')->getQuery($queryID);
|
||||
if($query)
|
||||
{
|
||||
$this->session->set($queryName, $query->sql);
|
||||
$this->session->set($queryForm, $query->form);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->session->set($queryName, ' 1 = 1');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if($this->session->$queryName == false) $this->session->set($queryName, ' 1 = 1');
|
||||
}
|
||||
|
||||
$apiQuery = $this->session->apiQuery;
|
||||
$apiQuery = strpos($apiQuery, "`lib` = 'all'") === false ? "$apiQuery and lib = $libID" : str_replace("`lib` = 'all'", '1', $apiQuery);
|
||||
$apiQuery = $this->session->$queryName;
|
||||
if(strpos($apiQuery, "`lib` = 'all'") !== false) $apiQuery = str_replace("`lib` = 'all'", '1', $apiQuery);
|
||||
|
||||
$list = $this->dao->select('*')
|
||||
->from(TABLE_API)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere($apiQuery)
|
||||
->fetchAll();
|
||||
$list = $this->dao->select('*')
|
||||
->from(TABLE_API)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere($apiQuery)
|
||||
->beginIF(!empty($libs))->andWhere('`lib`')->in($libs)->fi()
|
||||
->fetchAll();
|
||||
|
||||
return $list;
|
||||
return $list;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get ordered objects for dic.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getOrderedObjects()
|
||||
{
|
||||
$normalObjects = $closedObjects = array();
|
||||
|
||||
$libs = $this->loadModel('doc')->getApiLibs();
|
||||
$products = $this->dao->select('t1.id, 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))
|
||||
->fetchAll('id');
|
||||
|
||||
foreach($products as $id => $product)
|
||||
{
|
||||
if($product->status == 'normal')
|
||||
{
|
||||
$normalObjects['product'][$id] = $product->name;
|
||||
}
|
||||
elseif($product->status == 'closed')
|
||||
{
|
||||
$closedObjects['product'][$id] = $product->name;
|
||||
}
|
||||
}
|
||||
|
||||
$projects = $this->dao->select('t1.id, 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')
|
||||
->fetchAll('id');
|
||||
|
||||
foreach($projects as $id => $project)
|
||||
{
|
||||
if($project->status != 'done' and $project->status != 'closed')
|
||||
{
|
||||
$normalObjects['project'][$id] = $project->name;
|
||||
}
|
||||
else if($project->status == 'done' or $project->status == 'closed')
|
||||
{
|
||||
$closedObjects['project'][$id] = $project->name;
|
||||
}
|
||||
}
|
||||
|
||||
return array($normalObjects, $closedObjects);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get lib tree.
|
||||
*
|
||||
* @param int $libID
|
||||
* @param int $libs
|
||||
* @param int $moduleID
|
||||
* @param int $objectID
|
||||
* @param string $browseType bySearch
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getLibTree($libID, $libs, $moduleID, $objectID = 0, $browseType = '')
|
||||
{
|
||||
$libTree = $this->loadModel('doc')->getLibTree($libID, $libs, 'api', $moduleID, $objectID, $browseType);
|
||||
$releases = $this->getReleaseByQuery(array_keys($libs), null, 'lib_asc, id_desc');
|
||||
|
||||
foreach($libTree as &$tree)
|
||||
{
|
||||
$tree->versions = array();
|
||||
foreach($releases as $index => $release)
|
||||
{
|
||||
if($tree->id == $release->lib)
|
||||
{
|
||||
$tree->versions[] = $release;
|
||||
unset($releases[$index]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $libTree;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,157 @@
|
||||
<style>
|
||||
#tabContent {margin-top: 5px; max-width: 220px}
|
||||
.objectTree ul {list-style: none; margin: 0}
|
||||
.objectTree .objects>ul>li>div {display: flex; flex-flow: row nowrap; justify-content: flex-start; align-items: center;}
|
||||
.objectTree li>a, div.hide-in-search>a {display: block; padding: 2px 10px 2px 5px; overflow: hidden; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; border-radius: 4px;}
|
||||
.objectTree .tree li>.list-toggle {line-height: 24px;}
|
||||
.objectTree .tree li.has-list.open:before {content: unset;}
|
||||
|
||||
#swapper li>div.hide-in-search>a:focus, #swapper li>div.hide-in-search>a:hover {color: #838a9d; cursor: default;}
|
||||
#swapper li > a {margin-top: 4px; margin-bottom: 4px;}
|
||||
#swapper li {padding-top: 0; padding-bottom: 0;}
|
||||
#swapper .tree li>.list-toggle {top: -1px;}
|
||||
|
||||
#closed {width: 90px; height: 25px; line-height: 25px; background-color: #ddd; color: #3c495c; text-align: center; margin-left: 15px; border-radius: 2px;}
|
||||
#gray-line {width: 230px;height: 1px; margin-left: 10px; margin-bottom:2px; background-color: #ddd;}
|
||||
#dropMenu.has-search-text .hide-in-search {display: flex;}
|
||||
#swapper li>.selected {color: #0c64eb!important; background: #e9f2fb!important;}
|
||||
.tree-product:last-child {border-bottom: 1px solid #eee;}
|
||||
</style>
|
||||
<?php
|
||||
$normalObjectsHtml = '<ul class="tree noProgram">';
|
||||
$closedObjectsHtml = '<ul class="tree noProgram">';
|
||||
$link = $this->createLink('api', 'index');
|
||||
$selected = $objectType == 'nolink' ? 'selected' : '';
|
||||
$dataParams = 'data-type="nolink" data-id="0"';
|
||||
|
||||
if(!empty($nolinkLibs)) $normalObjectsHtml .= "<li>" . html::a($link, $lang->api->noLinked, '', "class='clickable $selected' title='{$lang->api->noLinked}' $dataParams data-key='" . zget($objectsPinYin, $lang->api->noLinked, '') . "'") . '</li>';
|
||||
foreach(array('product', 'project') as $moduleType)
|
||||
{
|
||||
if(!empty($normalObjects[$moduleType]))
|
||||
{
|
||||
foreach($normalObjects[$moduleType] as $normalObjectID => $normalObjectName)
|
||||
{
|
||||
$dataParams = "data-type='$moduleType' data-id='$normalObjectID'";
|
||||
$selected = $normalObjectID == $objectID ? 'selected' : '';
|
||||
$normalObjectsHtml .= "<li>" . html::a($link, "<i class='icon icon-$moduleType'></i> $normalObjectName", '', "class='$selected clickable' title='{$normalObjectName}' $dataParams data-key='" . zget($objectsPinYin, $normalObjectName, '') . "'") . '</li>';
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($closedObjects[$moduleType]))
|
||||
{
|
||||
foreach($closedObjects[$moduleType] as $closedObjectID => $closedObjectName)
|
||||
{
|
||||
$dataParams = "data-type='$moduleType' data-id='$closedObjectID'";
|
||||
$selected = $closedObjectID == $objectID ? 'selected' : '';
|
||||
$closedObjectsHtml .= '<li>' . html::a($link, "<i class='icon icon-$moduleType'></i> $closedObjectName", '', "class='$selected clickable' title='{$closedObjectName}' $dataParams data-key='" . zget($objectsPinYin, $closedObjectName, '') . "'") . '</li>';
|
||||
}
|
||||
}
|
||||
|
||||
if($moduleType == 'product')
|
||||
{
|
||||
if(!empty($normalObjects['project']) and (!empty($nolinkLibs) or !empty($normalObjects['product']))) $normalObjectsHtml .= '<li class="divider"></li>';
|
||||
if(!empty($closedObjects['project']) and !empty($normalObjects['product'])) $closedObjectsHtml .= '<li class="divider"></li>';
|
||||
}
|
||||
}
|
||||
$normalObjectsHtml .= '</ul>';
|
||||
$closedObjectsHtml .= '</ul>';
|
||||
?>
|
||||
|
||||
<div class="table-row">
|
||||
<div class="table-col <?php if(!empty($closedObjects['product']) or !empty($closedObjects['project'])) echo 'col-left'?>">
|
||||
<div class='list-group'>
|
||||
<div class="tab-content objectTree" id="tabContent">
|
||||
<div class="tab-pane objects active">
|
||||
<?php echo $normalObjectsHtml;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(!empty($closedObjects['product']) or !empty($closedObjects['project'])):?>
|
||||
<div class="col-footer">
|
||||
<a class='pull-right toggle-right-col not-list-item'><?php echo $lang->doc->closed?><i class='icon icon-angle-right'></i></a>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div id="gray-line" hidden></div>
|
||||
<div id="closed" hidden><?php echo $lang->doc->closed?></div>
|
||||
<div class="table-col col-right objectTree">
|
||||
<div class='list-group objects'><?php echo $closedObjectsHtml;?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('#swapper [data-ride="tree"]').tree('expand');
|
||||
|
||||
<?php if(isset($closedObjects[$objectID])):?>
|
||||
$('.col-footer .toggle-right-col').click(function(){ scrollToSelected(); })
|
||||
<?php else:?>
|
||||
scrollToSelected();
|
||||
<?php endif;?>
|
||||
|
||||
$('.nav-tabs li span').hide();
|
||||
$('.nav-tabs li.active').find('span').show();
|
||||
|
||||
$('.nav-tabs>li a').click(function()
|
||||
{
|
||||
if($('#swapper input[type="search"]').val() == '')
|
||||
{
|
||||
$(this).siblings().show();
|
||||
$(this).parent().siblings('li').find('span').hide();
|
||||
}
|
||||
})
|
||||
|
||||
$('#swapper #dropMenu .search-box').on('onSearchChange', function(event, value)
|
||||
{
|
||||
if(value != '')
|
||||
{
|
||||
$('div.hide-in-search').siblings('i').addClass('hide-in-search');
|
||||
$('.nav-tabs li span').hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
$('div.hide-in-search').siblings('i').removeClass('hide-in-search');
|
||||
$('li.has-list div.hide-in-search').removeClass('hidden');
|
||||
$('.nav-tabs li.active').find('span').show();
|
||||
}
|
||||
|
||||
if($('.form-control.search-input').val().length > 0)
|
||||
{
|
||||
$('#closed').attr("hidden", false);
|
||||
$('#gray-line').attr("hidden", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#closed').attr("hidden", true);
|
||||
$('#gray-line').attr("hidden", true);
|
||||
}
|
||||
});
|
||||
|
||||
$('#swapper #dropMenu').on('onSearchComplete', function()
|
||||
{
|
||||
var listItem = $(this).find('.has-list');
|
||||
listItem.each(function()
|
||||
{
|
||||
$(this).css('display','')
|
||||
var $hidden = $(this).find('.hidden');
|
||||
var $item = $(this).find('.search-list-item');
|
||||
if($hidden.length == $item.length) $(this).css('display','none');
|
||||
});
|
||||
|
||||
if($('.list-group.objects').height() == 0)
|
||||
{
|
||||
$('#closed').attr("hidden", true);
|
||||
$('#gray-line').attr("hidden", true);
|
||||
}
|
||||
});
|
||||
|
||||
$('.objectTree a').on('click', function()
|
||||
{
|
||||
var objectType = $(this).data('type');
|
||||
var objectID = $(this).data('id');
|
||||
$.cookie('objectType', objectType, {expires: config.cookieLife, path: config.webRoot});
|
||||
$.cookie('objectID', objectID, {expires: config.cookieLife, path: config.webRoot});
|
||||
});
|
||||
})
|
||||
</script>
|
||||
@@ -0,0 +1,130 @@
|
||||
<style>
|
||||
.base-url > p {margin: 0;}
|
||||
.table-empty-tip > div {display: inline-block;}
|
||||
.detail .list-group-item .heading.GET {
|
||||
background-color: #e7f0f7;
|
||||
}
|
||||
.detail .list-group-item .heading.GET a {
|
||||
color: #0f6ab4;
|
||||
}
|
||||
|
||||
.detail .list-group {
|
||||
height: calc(100vh - 215px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
.detail .list-group-item .heading.OPTIONS {
|
||||
background-color: #e7f0f7;
|
||||
}
|
||||
.detail .list-group-item .heading.OPTIONS a {
|
||||
color: #0f6ab4;
|
||||
}
|
||||
|
||||
.detail .list-group-item .heading.POST {
|
||||
background-color: #e7f6ec;
|
||||
}
|
||||
.detail .list-group-item .heading.POST a {
|
||||
color: #10a54a;
|
||||
}
|
||||
|
||||
.detail .list-group-item .heading.PUT {
|
||||
background-color: #f9f2e9;
|
||||
}
|
||||
.detail .list-group-item .heading.PUT a {
|
||||
color: #c5862b;
|
||||
}
|
||||
.detail .list-group-item .heading.PATCH {
|
||||
background-color: #f9f2e9;
|
||||
}
|
||||
.detail .list-group-item .heading.PATCH a {
|
||||
color: #c5862b;
|
||||
}
|
||||
|
||||
.detail .list-group-item .heading.DELETE {
|
||||
background-color: #f5e8e8;
|
||||
border: 1px solid #e8c6c7;
|
||||
}
|
||||
.detail .list-group-item .heading.DELETE a {
|
||||
color: #a41e22;
|
||||
}
|
||||
|
||||
.detail .list-group-item a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.detail .list-group-item .path, .detail .list-group-item .desc {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.detail .list-group-item .path {
|
||||
padding-left: 10px;
|
||||
font-size: 14px;
|
||||
color: black;
|
||||
flex: 1;
|
||||
}
|
||||
.detail .list-group-item .desc {
|
||||
width: auto;
|
||||
font-size: 14px;
|
||||
line-height: 38px;
|
||||
float: right;
|
||||
padding-right: 10px;
|
||||
max-width: 200px;
|
||||
}
|
||||
.detail .list-group-item {list-style: none; font-size: 14px; margin-bottom: 10px; line-height: 30px}
|
||||
.detail .list-group-item span {line-height: 30px; width: 65px;}
|
||||
.detail .list-group-item .label+.label {margin-left: -4px;}
|
||||
.detail .list-group-item .label {border-radius: 0;}
|
||||
</style>
|
||||
<?php if($apiID):?>
|
||||
<?php include './content.html.php';?>
|
||||
<?php else:?>
|
||||
<?php if(empty($libs) || empty($apiList)):?>
|
||||
<div class="cell">
|
||||
<div class="detail">
|
||||
<li class="detail-title"><?php echo intval($libID) > 0 ? $lang->api->apiList : $lang->api->pageTitle;?></li>
|
||||
</div>
|
||||
<div class="table-empty-tip">
|
||||
<div class="notice text-muted"><?php echo (empty($libs)) ? $lang->api->noLib : $lang->api->noApi;?></div>
|
||||
<div class="no-content-button">
|
||||
<?php
|
||||
if($libID && common::hasPriv('api', 'create'))
|
||||
{
|
||||
if($app->rawModule == 'doc')
|
||||
{
|
||||
echo html::a($this->createLink('api', 'create', "libID=$libID&moduleID=$moduleID", '', true), '<i class="icon icon-plus"></i> ' . $lang->api->createApi, '', 'class="btn btn-info iframe" data-width="95%"');
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::a(helper::createLink('api', 'create', "libID={$libID}&moduleID=$moduleID"), '<i class="icon icon-plus"></i> ' . $lang->api->createApi, '', 'class="btn btn-info"');
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class="cell main-col" data-min-width="400">
|
||||
<div class="detail base-url">
|
||||
<?php $delimiter = strpos($app->clientLang, 'zh') === 0 ? ':' : ': ';?>
|
||||
<p><?php echo $lang->api->baseUrl . $delimiter . $lib->baseUrl;?></p>
|
||||
</div>
|
||||
<div class="detail">
|
||||
<ul class="list-group">
|
||||
<?php foreach($apiList as $api):?>
|
||||
<li class="list-group-item">
|
||||
<div class="heading <?php echo $api->method;?>">
|
||||
<a href="<?php echo helper::createLink('api', 'index', "libID={$api->lib}&moduleID=0&apiID={$api->id}&version=0&release=$release");?>">
|
||||
<span class="label label-primary"><?php echo $api->method;?></span>
|
||||
<span class="path" title="<?php echo $api->path;?>"><?php echo $api->path;?></span>
|
||||
<span class="desc" title="<?php echo $api->title;?>"><?php echo $api->title;?></span>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach;?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
@@ -62,7 +62,9 @@ js::set('struct_paramsType', $lang->struct->paramsType);
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class='w-110px'><?php echo $lang->api->lib;?></th>
|
||||
<td> <?php echo html::select('lib', $libs, $libID, "class='form-control chosen' onchange=loadDocModule(this.value)");?> </td>
|
||||
<td>
|
||||
<?php echo $libName . html::hidden('lib', $libID);?>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -223,7 +225,7 @@ js::set('struct_paramsType', $lang->struct->paramsType);
|
||||
<tr>
|
||||
<td colspan='3' class='text-center form-actions'>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php if(empty($gobackLink)) echo html::backButton($lang->goback, "data-app='{$app->tab}'");?>
|
||||
<?php if(empty($gobackLink)) echo html::backButton($lang->goback, "data-app='{$app->tab}' class='btn btn-back btn-wide'");?>
|
||||
<?php if(!empty($gobackLink)) echo html::a($gobackLink, $lang->goback, '', "class='btn btn-back btn-wide'");?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -18,24 +18,40 @@
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $type == 'normal' ? $lang->api->createLib : $lang->api->createDemo;?></h2>
|
||||
<h2><?php echo $lang->api->createLib;?></h2>
|
||||
</div>
|
||||
<form class='load-indicator main-form' id="apiForm" method='post' enctype='multipart/form-data'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th><?php echo $lang->api->libType;?></th>
|
||||
<td>
|
||||
<span><?php echo html::radio('libType', $lang->api->libTypeList, $type, "onchange='toggleLibType(this.value)'")?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='productBox'>
|
||||
<th><?php echo $lang->api->product;?></th>
|
||||
<td class='required'>
|
||||
<span><?php echo html::select('product', $products, $objectID, "class='form-control chosen'")?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='projectBox' class='hidden'>
|
||||
<th><?php echo $lang->api->project;?></th>
|
||||
<td class='required'>
|
||||
<span><?php echo html::select('project', $projects, $objectID, "class='form-control chosen'")?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->api->name?></th>
|
||||
<td style="width: 80%"><?php echo html::input('name', $type == 'demo' ? $lang->api->zentaoAPI : '', "class='form-control'")?></td>
|
||||
<td style="width: 80%"><?php echo html::input('name', '', "class='form-control'")?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->api->baseUrl?></th>
|
||||
<td style="width: 80%"><?php echo html::input('baseUrl', $type == 'demo' ? ('http://' . $_SERVER['HTTP_HOST'] . $this->app->config->webRoot . 'api.php/v1') : '', "class='form-control' placeholder='" . $lang->api->baseUrlDesc . "'");?></td>
|
||||
<td style="width: 80%"><?php echo html::input('baseUrl', '', "class='form-control' placeholder='" . $lang->api->baseUrlDesc . "'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr id='aclBox'>
|
||||
<th><?php echo $lang->api->control;?></th>
|
||||
<td>
|
||||
<?php $isDisabled = $type == 'demo' ? 'disabled' : '';?>
|
||||
<span><?php echo html::radio('acl', $lang->api->aclList, 'open', "onchange='toggleAcl(this.value, \"lib\")' $isDisabled")?></span>
|
||||
<span class='text-info' id='noticeAcl'><?php echo $lang->api->noticeAcl['open'];?></span>
|
||||
<span><?php echo html::radio('acl', $lang->api->aclList, 'open', "onchange='toggleAcl(this.value, \"lib\")'", 'block');?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='whiteListBox' class='hidden'>
|
||||
@@ -48,15 +64,10 @@
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon'><?php echo $lang->api->user?></span>
|
||||
<?php echo html::select('users[]', $users, '', "class='form-control chosen' multiple")?>
|
||||
<?php echo $this->fetch('my', 'buildContactLists', "dropdownName=users&attr=data-drop_direction='up'");?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->api->desc;?></th>
|
||||
<td colspan='2'>
|
||||
<?php echo html::textarea('desc', '', "rows='8' class='form-control kindeditor' hidefocus='true' tabindex=''");?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='text-center form-actions' colspan='2'><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
@@ -66,5 +77,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php js::set('noticeAcl', $lang->api->noticeAcl);?>
|
||||
<?php js::set('productLang', $lang->productCommon);?>
|
||||
<?php js::set('projectLang', $lang->projectCommon);?>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* The createlib view of doc module of ZenTaoPMS.
|
||||
* The createlib view of api module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
|
||||
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Jia Fu <fujia@cnezsoft.com>
|
||||
* @package doc
|
||||
* @version $Id: createlib.html.php 975 2010-07-29 03:30:25Z jajacn@126.com $
|
||||
* @package api
|
||||
* @version $Id: editlib.html.php 975 2010-07-29 03:30:25Z jajacn@126.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
@@ -22,42 +22,42 @@
|
||||
</div>
|
||||
<form class='load-indicator main-form form-ajax' id="apiForm" method='post' enctype='multipart/form-data'>
|
||||
<table class='table table-form'>
|
||||
<?php if(in_array($type, array('product', 'project'))):?>
|
||||
<tr>
|
||||
<th class='w-130px'><?php echo $lang->api->{$type};?></th>
|
||||
<td><?php echo $object->name?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->api->name?></th>
|
||||
<td style="width: 80%"><?php echo html::input('name', $doc->name, "class='form-control'");?></td>
|
||||
<td style="width: 80%"><?php echo html::input('name', $lib->name, "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->api->baseUrl?></th>
|
||||
<td style="width: 80%"><?php echo html::input('baseUrl', $doc->baseUrl, "class='form-control'");?></td>
|
||||
<td style="width: 80%"><?php echo html::input('baseUrl', $lib->baseUrl, "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr id='aclBox'>
|
||||
<th><?php echo $lang->api->control;?></th>
|
||||
<td>
|
||||
<span><?php echo html::radio('acl', $lang->api->aclList, $doc->acl, "onchange='toggleAcl(this.value, \"lib\")'")?></span>
|
||||
<span class='text-info' id='noticeAcl'><?php echo $lang->api->noticeAcl['open'];?></span>
|
||||
<span><?php echo html::radio('acl', $lang->api->aclList, $lib->acl, "onchange='toggleAcl(this.value, \"lib\")'", 'block')?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='whiteListBox' class='<?php echo $doc->acl == 'custom' ? '' : 'hidden';?>'>
|
||||
<tr id='whiteListBox' class='<?php echo $lib->acl != 'open' ? '' : 'hidden';?>'>
|
||||
<th><?php echo $lang->api->whiteList;?></th>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon groups-addon'><?php echo $lang->api->group?></span>
|
||||
<?php echo html::select('groups[]', $groups, $doc->groups, "class='form-control chosen' multiple");?>
|
||||
<?php echo html::select('groups[]', $groups, $lib->groups, "class='form-control chosen' multiple");?>
|
||||
</div>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon'><?php echo $lang->api->user?></span>
|
||||
<?php echo html::select('users[]', $users, $doc->users, "class='form-control chosen' multiple");?>
|
||||
<?php echo html::select('users[]', $users, $lib->users, "class='form-control chosen' multiple");?>
|
||||
<?php echo $this->fetch('my', 'buildContactLists', "dropdownName=users&attr=data-drop_direction='up'");?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->api->desc;?></th>
|
||||
<td colspan='2'>
|
||||
<?php echo html::textarea('desc', $doc->desc, "rows='8' class='form-control kindeditor' hidefocus='true' tabindex=''");?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='text-center form-actions' colspan='2'><?php echo html::submitButton();?></td>
|
||||
<td class='text-center form-actions' colspan='2'><?php echo html::hidden('type', $type) . html::submitButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
@@ -65,22 +65,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='hidden'>
|
||||
<table>
|
||||
<tr id='aclBoxA'>
|
||||
<th><?php echo $lang->api->control;?></th>
|
||||
<td>
|
||||
<?php echo html::radio('acl', $lang->api->aclListA, 'default', "onchange='toggleAcl(this.value, \"lib\")'");?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='aclBoxB'>
|
||||
<th><?php echo $lang->api->control;?></th>
|
||||
<td><?php echo html::radio('acl', $lang->api->aclListB, 'open', "onchange='toggleAcl(this.value, \"lib\")'");?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php js::set('noticeAcl', $lang->api->noticeAcl);?>
|
||||
<script>
|
||||
$(function(){toggleAcl($('form input[name="acl"]:checked').val(), 'lib');})
|
||||
</script>
|
||||
<?php js::set('productLang', $lang->productCommon);?>
|
||||
<?php js::set('projectLang', $lang->projectCommon);?>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
|
||||
@@ -12,89 +12,80 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.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">
|
||||
<div id='title'>
|
||||
<li class='menu-title'><?php echo $this->lang->api->module;?></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);?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div id="leftBar" class="btn-toolbar pull-left">
|
||||
<?php echo $objectDropdown;?>
|
||||
<?php if(!empty($libTree)):?>
|
||||
<a class="btn btn-link querybox-toggle" id='bysearchTab'><i class="icon icon-search muted"></i> <?php echo $lang->doc->searchDoc;?></a>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if($apiID):?>
|
||||
<?php include './content.html.php';?>
|
||||
<?php else:?>
|
||||
<?php if(empty($libs) || empty($apiList)):?>
|
||||
<div class="cell">
|
||||
<div class="detail">
|
||||
<li class="detail-title"><?php echo intval($libID) > 0 ? $lang->api->apiList : $lang->api->pageTitle;?></li>
|
||||
</div>
|
||||
<div class="detail">
|
||||
<div class="no-content"><img src="<?php echo $config->webRoot . 'theme/default/images/main/no_content.png'?>"/></div>
|
||||
<div class="notice text-muted"><?php echo (empty($libs)) ? $lang->api->noLib : $lang->api->noApi;?></div>
|
||||
<div class="no-content-button">
|
||||
<?php
|
||||
if($libID && common::hasPriv('api', 'create'))
|
||||
{
|
||||
echo html::a(helper::createLink('api', 'create', "libID={$libID}"), '<i class="icon icon-plus"></i> ' . $lang->api->createApi, '', 'class="btn btn-info btn-wide"');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</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($config->edition != 'open' and $libTree and common::hasPriv('api', 'export')) echo html::a($this->createLink('api', 'export', "libID=$libID", 'html', true), "<i class='icon-export muted'> </i>" . $lang->export, '', "class='btn btn-link export' id='export'");
|
||||
if(common::hasPriv('api', 'createLib')) echo html::a($this->createLink('api', 'createLib', "type=" . ($objectType == 'project' ? 'project' : 'product') . "&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>
|
||||
<?php else:?>
|
||||
<div class="cell main-col" data-min-width="400">
|
||||
<div class="detail base-url">
|
||||
<p><?php echo $lang->api->baseUrl . ': ' . $lib->baseUrl;?></p>
|
||||
</div>
|
||||
<div class="detail">
|
||||
<ul class="list-group">
|
||||
<?php foreach($apiList as $api):?>
|
||||
<li class="list-group-item">
|
||||
<div class="heading <?php echo $api->method;?>">
|
||||
<a href="<?php echo helper::createLink('api', 'index', "libID={$api->lib}&moduleID=0&apiID={$api->id}&version=0&release=$release");?>">
|
||||
<span class="label label-primary"><?php echo $api->method;?></span>
|
||||
<span class="path" title="<?php echo $api->path;?>"><?php echo $api->path;?></span>
|
||||
<span class="desc" title="<?php echo $api->title;?>"><?php echo $api->title;?></span>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach;?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id='mainContent' class="fade <?php if(!empty($libTree)) echo 'flex';?>">
|
||||
<?php if(empty($libTree)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->doc->noLib;?></span>
|
||||
<?php
|
||||
if(common::hasPriv('api', 'createLib')) echo html::a(helper::createLink('api', 'createLib', "type=$objectType"), '<i class="icon icon-plus"></i> ' . $lang->api->createLib, '', 'class="btn btn-info iframe" data-width="800px"');
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
<?php else:?>
|
||||
<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;?>
|
||||
</div>
|
||||
<div class='hidden' id='dropDownData'>
|
||||
<ul class='libDorpdown'>
|
||||
<?php if(common::hasPriv('tree', 'browse')):?>
|
||||
<li data-method="addCataLib" data-has-children='%hasChildren%' data-libid='%libID%' data-moduleid="%moduleID%" data-type="add"><a><i class="icon icon-icon-add-directory"></i><?php echo $lang->doc->libDropdown['addModule'];?></a></li>
|
||||
<?php endif;?>
|
||||
<?php if(common::hasPriv('api', 'editLib')):?>
|
||||
<li data-method="editLib"><a href='<?php echo inlink('editLib', 'libID=%libID%');?>' data-toggle='modal' data-type='iframe'><i class="icon icon-edit"></i><?php echo $lang->doc->libDropdown['editLib'];?></a></li>
|
||||
<?php endif;?>
|
||||
<?php if(common::hasPriv('api', 'deleteLib')):?>
|
||||
<li data-method="deleteLib"><a href='<?php echo inlink('deleteLib', 'libID=%libID%');?>' target='hiddenwin'><i class="icon icon-trash"></i><?php echo $lang->doc->libDropdown['deleteLib'];?></a></li>
|
||||
<?php endif;?>
|
||||
</ul>
|
||||
<ul class='moduleDorpdown'>
|
||||
<?php if(common::hasPriv('tree', 'browse')):?>
|
||||
<li data-method="addCataBro" data-type="add" data-id="%moduleID%"><a><i class="icon icon-icon-add-directory"></i><?php echo $lang->doc->libDropdown['addSameModule'];?></a></li>
|
||||
<li data-method="addCataChild" data-type="add" data-id="%moduleID%" data-has-children='%hasChildren%'><a><i class="icon icon-icon-add-directory"></i><?php echo $lang->doc->libDropdown['addSubModule'];?></a></li>
|
||||
<li data-method="editCata" class='edit-module'><a data-href='<?php echo helper::createLink('tree', 'edit', 'moduleID=%moduleID%&type=doc');?>'><i class="icon icon-edit"></i><?php echo $lang->doc->libDropdown['editModule'];?></a></li>
|
||||
<li data-method="deleteCata"><a href='<?php echo helper::createLink('tree', 'delete', 'rootID=%libID%&moduleID=%moduleID%');?>' target='hiddenwin'><i class="icon icon-trash"></i><?php echo $lang->doc->libDropdown['delModule'];?></a></li>
|
||||
<?php endif;?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class='hidden' data-id="ulTreeModal">
|
||||
<ul data-id="liTreeModal" class="menu-active-primary menu-hover-primary has-input">
|
||||
<li data-id="insert" class="has-input">
|
||||
<input data-target="%target%" class="form-control input-tree"></input>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="hidden" data-id="aTreeModal">
|
||||
<a href="###" data-has-children="false" title="%name%" data-id="%id%">
|
||||
<div class="text h-full w-full flex-between overflow-hidden" style="position: relative;">
|
||||
<div>%name%</div>
|
||||
<i class="icon icon-drop icon-ellipsis-v hidden file-drop-icon" data-iscatalogue="true"></i>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/**
|
||||
* The index view file of doc module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
|
||||
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Yidong Wang <yidong@cnezsoft.com>
|
||||
* @package doc
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.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>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php include 'apilist.html.php';?>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
+16
-11
@@ -276,17 +276,22 @@ $lang->project->kanban = $lang->projectCommon . ' Kanban';
|
||||
$lang->execution->executionKanban = "{$lang->execution->common} Kanban";
|
||||
$lang->execution->all = "{$lang->execution->common} List";
|
||||
|
||||
$lang->doc->recent = 'Recent';
|
||||
$lang->doc->my = 'My';
|
||||
$lang->doc->favorite = 'Favorite';
|
||||
$lang->doc->product = $lang->productCommon;
|
||||
$lang->doc->project = $lang->projectCommon;
|
||||
$lang->doc->api = 'API';
|
||||
$lang->doc->execution = $lang->execution->common;
|
||||
$lang->doc->custom = 'Custom';
|
||||
$lang->doc->wiki = 'WIKI';
|
||||
$lang->doc->apiDoc = 'API Docuemnt';
|
||||
$lang->doc->apiStruct = 'Data Structure';
|
||||
$lang->doc->recent = 'Recent';
|
||||
$lang->doc->my = 'My';
|
||||
$lang->doc->favorite = 'Favorite';
|
||||
$lang->doc->product = $lang->productCommon;
|
||||
$lang->doc->project = $lang->projectCommon;
|
||||
$lang->doc->api = 'API';
|
||||
$lang->doc->execution = $lang->execution->common;
|
||||
$lang->doc->custom = 'Custom';
|
||||
$lang->doc->wiki = 'WIKI';
|
||||
$lang->doc->apiDoc = 'API Docuemnt';
|
||||
$lang->doc->apiStruct = 'Data Structure';
|
||||
$lang->doc->mySpace = 'My Space';
|
||||
$lang->doc->productSpace = "{$lang->productCommon} Space";
|
||||
$lang->doc->projectSpace = "{$lang->projectCommon} Space";
|
||||
$lang->doc->apiSpace = 'API Space';
|
||||
$lang->doc->teamSpace = 'Team Space';
|
||||
|
||||
$lang->product->list = $lang->productCommon . ' List';
|
||||
$lang->product->kanban = $lang->productCommon . ' Kanban';
|
||||
|
||||
+16
-11
@@ -276,17 +276,22 @@ $lang->project->kanban = $lang->projectCommon . ' Kanban';
|
||||
$lang->execution->executionKanban = "{$lang->execution->common} Kanban";
|
||||
$lang->execution->all = "{$lang->execution->common} List";
|
||||
|
||||
$lang->doc->recent = 'Recent';
|
||||
$lang->doc->my = 'My';
|
||||
$lang->doc->favorite = 'Favorite';
|
||||
$lang->doc->product = $lang->productCommon;
|
||||
$lang->doc->project = $lang->projectCommon;
|
||||
$lang->doc->api = 'API';
|
||||
$lang->doc->execution = $lang->execution->common;
|
||||
$lang->doc->custom = 'Custom';
|
||||
$lang->doc->wiki = 'WIKI';
|
||||
$lang->doc->apiDoc = 'API Docuemnt';
|
||||
$lang->doc->apiStruct = 'Data Structure';
|
||||
$lang->doc->recent = 'Recent';
|
||||
$lang->doc->my = 'My';
|
||||
$lang->doc->favorite = 'Favorite';
|
||||
$lang->doc->product = $lang->productCommon;
|
||||
$lang->doc->project = $lang->projectCommon;
|
||||
$lang->doc->api = 'API';
|
||||
$lang->doc->execution = $lang->execution->common;
|
||||
$lang->doc->custom = 'Custom';
|
||||
$lang->doc->wiki = 'WIKI';
|
||||
$lang->doc->apiDoc = 'API Docuemnt';
|
||||
$lang->doc->apiStruct = 'Data Structure';
|
||||
$lang->doc->mySpace = 'My Space';
|
||||
$lang->doc->productSpace = "{$lang->productCommon} Space";
|
||||
$lang->doc->projectSpace = "{$lang->projectCommon} Space";
|
||||
$lang->doc->apiSpace = 'API Space';
|
||||
$lang->doc->teamSpace = 'Team Space';
|
||||
|
||||
$lang->product->list = $lang->productCommon . ' List';
|
||||
$lang->product->kanban = $lang->productCommon . ' Kanban';
|
||||
|
||||
+16
-11
@@ -276,17 +276,22 @@ $lang->project->kanban = $lang->projectCommon . ' Kanban';
|
||||
$lang->execution->executionKanban = "{$lang->execution->common} Kanban";
|
||||
$lang->execution->all = "{$lang->execution->common} List";
|
||||
|
||||
$lang->doc->recent = 'Recent';
|
||||
$lang->doc->my = 'My';
|
||||
$lang->doc->favorite = 'Favorite';
|
||||
$lang->doc->product = $lang->productCommon;
|
||||
$lang->doc->project = $lang->projectCommon;
|
||||
$lang->doc->api = 'API';
|
||||
$lang->doc->execution = $lang->execution->common;
|
||||
$lang->doc->custom = 'Custom';
|
||||
$lang->doc->wiki = 'WIKI';
|
||||
$lang->doc->apiDoc = 'API Docuemnt';
|
||||
$lang->doc->apiStruct = 'Data Structure';
|
||||
$lang->doc->recent = 'Recent';
|
||||
$lang->doc->my = 'My';
|
||||
$lang->doc->favorite = 'Favorite';
|
||||
$lang->doc->product = $lang->productCommon;
|
||||
$lang->doc->project = $lang->projectCommon;
|
||||
$lang->doc->api = 'API';
|
||||
$lang->doc->execution = $lang->execution->common;
|
||||
$lang->doc->custom = 'Custom';
|
||||
$lang->doc->wiki = 'WIKI';
|
||||
$lang->doc->apiDoc = 'API Docuemnt';
|
||||
$lang->doc->apiStruct = 'Data Structure';
|
||||
$lang->doc->mySpace = 'My Space';
|
||||
$lang->doc->productSpace = "{$lang->productCommon} Space";
|
||||
$lang->doc->projectSpace = "{$lang->projectCommon} Space";
|
||||
$lang->doc->apiSpace = 'API Space';
|
||||
$lang->doc->teamSpace = 'Team Space';
|
||||
|
||||
$lang->product->list = $lang->productCommon . ' List';
|
||||
$lang->product->kanban = $lang->productCommon . ' Kanban';
|
||||
|
||||
+10
-33
@@ -187,8 +187,6 @@ $lang->product->menuOrder[55] = 'settings';
|
||||
$lang->product->menuOrder[60] = 'create';
|
||||
$lang->product->menuOrder[65] = 'all';
|
||||
|
||||
$lang->product->menu->doc['subMenu'] = new stdclass();
|
||||
|
||||
$lang->product->menu->settings['subMenu'] = new stdclass();
|
||||
$lang->product->menu->settings['subMenu']->view = array('link' => "{$lang->overview}|product|view|productID=%s", 'alias' => 'edit');
|
||||
$lang->product->menu->settings['subMenu']->module = array('link' => "{$lang->module}|tree|browse|product=%s&view=story", 'subModule' => 'tree');
|
||||
@@ -237,8 +235,6 @@ $lang->scrum->menuOrder[40] = 'release';
|
||||
$lang->scrum->menuOrder[45] = 'dynamic';
|
||||
$lang->scrum->menuOrder[55] = 'settings';
|
||||
|
||||
$lang->scrum->menu->doc['subMenu'] = new stdclass();
|
||||
|
||||
$lang->scrum->menu->qa['subMenu'] = new stdclass();
|
||||
//$lang->scrum->menu->qa['subMenu']->index = array('link' => "$lang->dashboard|project|qa|projectID=%s");
|
||||
$lang->scrum->menu->qa['subMenu']->bug = array('link' => "{$lang->bug->common}|project|bug|projectID=%s", 'subModule' => 'bug');
|
||||
@@ -289,8 +285,6 @@ $lang->waterfall->menuOrder[65] = 'build';
|
||||
$lang->waterfall->menuOrder[70] = 'release';
|
||||
$lang->waterfall->menuOrder[80] = 'dynamic';
|
||||
|
||||
$lang->waterfall->menu->doc['subMenu'] = new stdclass();
|
||||
|
||||
$lang->waterfall->menu->programplan['subMenu'] = new stdclass();
|
||||
$lang->waterfall->menu->programplan['subMenu']->lists = array('link' => "{$lang->stage->list}|programplan|browse|projectID=%s&productID=0&type=lists", 'alias' => 'create');
|
||||
|
||||
@@ -372,8 +366,6 @@ $lang->execution->menuOrder[60] = 'release';
|
||||
$lang->execution->menuOrder[65] = 'action';
|
||||
$lang->execution->menuOrder[70] = 'settings';
|
||||
|
||||
$lang->execution->menu->doc['subMenu'] = new stdclass();
|
||||
|
||||
$lang->execution->menu->view['subMenu'] = new stdclass();
|
||||
$lang->execution->menu->view['subMenu']->groupTask = "$lang->groupView|execution|grouptask|executionID=%s";
|
||||
$lang->execution->menu->view['subMenu']->tree = "$lang->treeView|execution|tree|executionID=%s";
|
||||
@@ -507,36 +499,21 @@ $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->recent = array('link' => "{$lang->doc->recent}|doc|browse|browseTyp=byediteddate", 'alias' => 'recent');
|
||||
$lang->doc->menu->my = array('link' => "{$lang->doc->my}|doc|browse|browseTyp=openedbyme", 'alias' => 'my');
|
||||
$lang->doc->menu->collect = array('link' => "{$lang->doc->favorite}|doc|browse|browseTyp=collectedbyme", 'alias' => 'collect');
|
||||
$lang->doc->menu->product = array('link' => "{$lang->doc->product}|doc|tableContents|type=product", 'alias' => 'showfiles,product');
|
||||
$lang->doc->menu->api = array('link' => "{$lang->doc->api}|api|index", 'alias' => 'api');
|
||||
$lang->doc->menu->project = array('link' => "{$lang->doc->project}|doc|tableContents|type=project", 'alias' => 'showfiles,project');
|
||||
$lang->doc->menu->execution = array('link' => "{$lang->doc->execution}|doc|tableContents|type=execution", 'alias' => 'showfiles,execution');
|
||||
$lang->doc->menu->custom = array('link' => "{$lang->doc->custom}|doc|tableContents|type=custom", 'alias' => 'custom');
|
||||
$lang->doc->menu->my = array('link' => "{$lang->doc->mySpace}|doc|browse|browseTyp=openedbyme", 'alias' => 'my');
|
||||
$lang->doc->menu->product = array('link' => "{$lang->doc->productSpace}|doc|tableContents|type=product", 'alias' => 'showfiles,product');
|
||||
$lang->doc->menu->project = array('link' => "{$lang->doc->projectSpace}|doc|tableContents|type=project", 'alias' => 'showfiles,project');
|
||||
$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' => 'custom');
|
||||
|
||||
$lang->doc->dividerMenu = ',product,';
|
||||
|
||||
/* Doc menu order. */
|
||||
$lang->doc->menuOrder[5] = 'dashboard';
|
||||
$lang->doc->menuOrder[10] = 'recent';
|
||||
$lang->doc->menuOrder[15] = 'my';
|
||||
$lang->doc->menuOrder[20] = 'collect';
|
||||
$lang->doc->menuOrder[25] = 'product';
|
||||
$lang->doc->menuOrder[30] = 'project';
|
||||
$lang->doc->menuOrder[35] = 'execution';
|
||||
$lang->doc->menuOrder[36] = 'api';
|
||||
$lang->doc->menuOrder[40] = 'custom';
|
||||
|
||||
$lang->doc->menu->product['subMenu'] = new stdclass();
|
||||
$lang->doc->menu->project['subMenu'] = new stdclass();
|
||||
$lang->doc->menu->execution['subMenu'] = new stdclass();
|
||||
$lang->doc->menu->custom['subMenu'] = new stdclass();
|
||||
|
||||
$lang->doc->menu->api['subMenu'] = new stdclass();
|
||||
$lang->doc->menu->api['subMenu']->index = array('link' => "{$lang->doc->apiDoc}|api|index|libID=%s", 'alias' => 'create,edit');
|
||||
$lang->doc->menu->api['subMenu']->struct = array('link' => "{$lang->doc->apiStruct}|api|struct|libID=%s", 'alias' => 'createstruct,editstruct');
|
||||
$lang->doc->menuOrder[10] = 'my';
|
||||
$lang->doc->menuOrder[15] = 'product';
|
||||
$lang->doc->menuOrder[20] = 'project';
|
||||
$lang->doc->menuOrder[25] = 'api';
|
||||
$lang->doc->menuOrder[30] = 'custom';
|
||||
|
||||
/* Report menu.*/
|
||||
$lang->report->menu = new stdclass();
|
||||
|
||||
@@ -276,17 +276,22 @@ $lang->project->kanban = $lang->projectCommon . '看板';
|
||||
$lang->execution->executionKanban = "{$lang->execution->common}看板";
|
||||
$lang->execution->all = "{$lang->execution->common}列表";
|
||||
|
||||
$lang->doc->recent = '最近文档';
|
||||
$lang->doc->my = '我的文档';
|
||||
$lang->doc->favorite = '我的收藏';
|
||||
$lang->doc->product = $lang->productCommon . '库';
|
||||
$lang->doc->project = $lang->projectCommon . '库';
|
||||
$lang->doc->api = '接口库';
|
||||
$lang->doc->execution = "{$lang->execution->common}库";
|
||||
$lang->doc->custom = '自定义库';
|
||||
$lang->doc->wiki = 'WIKI';
|
||||
$lang->doc->apiDoc = '文档';
|
||||
$lang->doc->apiStruct = '数据结构';
|
||||
$lang->doc->recent = '最近文档';
|
||||
$lang->doc->my = '我的文档';
|
||||
$lang->doc->favorite = '我的收藏';
|
||||
$lang->doc->product = $lang->productCommon . '库';
|
||||
$lang->doc->project = $lang->projectCommon . '库';
|
||||
$lang->doc->api = '接口库';
|
||||
$lang->doc->execution = "{$lang->execution->common}库";
|
||||
$lang->doc->custom = '自定义库';
|
||||
$lang->doc->wiki = 'WIKI';
|
||||
$lang->doc->apiDoc = '文档';
|
||||
$lang->doc->apiStruct = '数据结构';
|
||||
$lang->doc->mySpace = '我的空间';
|
||||
$lang->doc->productSpace = "{$lang->productCommon}空间";
|
||||
$lang->doc->projectSpace = "{$lang->projectCommon}空间";
|
||||
$lang->doc->apiSpace = '接口空间';
|
||||
$lang->doc->teamSpace = '团队空间';
|
||||
|
||||
$lang->product->list = $lang->productCommon . '列表';
|
||||
$lang->product->kanban = $lang->productCommon . '看板';
|
||||
|
||||
@@ -285,6 +285,7 @@ class customModel extends model
|
||||
foreach($item['subMenu'] as $subMenu)
|
||||
{
|
||||
if(!isset($subMenu['link']) or strpos($subMenu['link'], '|') === false) continue;
|
||||
if(strpos("|program|product|project|execution|qa|", "|{$app->tab}|") === false and strpos($subMenu['link'], '%s') !== false) continue;
|
||||
list($subLabel, $module, $method) = explode('|', $subMenu['link']);
|
||||
if(count(explode('|', $subMenu['link'])) > 3) list($subLabel, $module, $method, $vars) = explode('|', $subMenu['link']);
|
||||
|
||||
|
||||
@@ -44,23 +44,25 @@ $config->doc->search['fields']['product'] = $lang->doc->product;
|
||||
if($app->rawMethod == 'contribute') $config->doc->search['fields']['project'] = $lang->doc->project;
|
||||
$config->doc->search['fields']['execution'] = $lang->doc->execution;
|
||||
$config->doc->search['fields']['lib'] = $lang->doc->lib;
|
||||
$config->doc->search['fields']['status'] = $lang->doc->status;
|
||||
$config->doc->search['fields']['module'] = $lang->doc->module;
|
||||
$config->doc->search['fields']['keywords'] = $lang->doc->keywords;
|
||||
$config->doc->search['fields']['addedBy'] = $lang->doc->addedBy;
|
||||
$config->doc->search['fields']['addedBy'] = $lang->doc->addedByAB;
|
||||
$config->doc->search['fields']['addedDate'] = $lang->doc->addedDate;
|
||||
$config->doc->search['fields']['editedBy'] = $lang->doc->editedBy;
|
||||
$config->doc->search['fields']['editedDate'] = $lang->doc->editedDate;
|
||||
$config->doc->search['fields']['keywords'] = $lang->doc->keywords;
|
||||
$config->doc->search['fields']['version'] = $lang->doc->version;
|
||||
|
||||
$config->doc->search['params']['title'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
|
||||
$config->doc->search['params']['keywords'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
|
||||
$config->doc->search['params']['product'] = array('operator' => '=', 'control' => 'select', 'values' => '');
|
||||
$config->doc->search['params']['lib'] = array('operator' => '=', 'control' => 'select', 'values' => '');
|
||||
$config->doc->search['params']['status'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->doc->statusList);
|
||||
$config->doc->search['params']['module'] = array('operator' => 'belong', 'control' => 'select', 'values' => '');
|
||||
if($app->rawMethod == 'contribute') $config->doc->search['params']['project'] = array('operator' => '=', 'control' => 'select', 'values' => '');
|
||||
$config->doc->search['params']['execution'] = array('operator' => '=', 'control' => 'select', 'values' => '');
|
||||
$config->doc->search['params']['lib'] = array('operator' => '=', 'control' => 'select', 'values' => '' );
|
||||
$config->doc->search['params']['addedBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
|
||||
$config->doc->search['params']['addedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
|
||||
$config->doc->search['params']['editedBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
|
||||
$config->doc->search['params']['editedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
|
||||
$config->doc->search['params']['keywords'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
|
||||
$config->doc->search['params']['version'] = array('operator' => '=', 'control' => 'input', 'values' => '');
|
||||
|
||||
+265
-184
@@ -40,9 +40,6 @@ class doc extends control
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager(0, 5, 1);
|
||||
|
||||
$actionURL = $this->createLink('doc', 'browse', "lib=0&browseType=bySearch&queryID=myQueryID");
|
||||
$this->doc->buildSearchForm(0, array(), 0, $actionURL, 'index');
|
||||
|
||||
$this->view->title = $this->lang->doc->common . $this->lang->colon . $this->lang->doc->index;
|
||||
$this->view->position[] = $this->lang->doc->index;
|
||||
|
||||
@@ -132,72 +129,60 @@ class doc extends control
|
||||
$libID = $this->doc->createlib();
|
||||
if(!dao::isError())
|
||||
{
|
||||
$objectType = $this->post->type;
|
||||
if($objectType == 'project' and $this->post->project) $objectID = $this->post->project;
|
||||
if($objectType == 'product' and $this->post->product) $objectID = $this->post->product;
|
||||
if($objectType == 'execution' and $this->post->execution) $objectID = $this->post->execution;
|
||||
if($objectType == 'custom' or $objectType == 'book') $objectID = 0;
|
||||
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;
|
||||
|
||||
$this->action->create('docLib', $libID, 'Created');
|
||||
|
||||
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $libID));
|
||||
return print(js::locate($this->createLink('doc', 'objectLibs', "type=$objectType&objectID=$objectID&libID=$libID"), 'parent.parent'));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => "parent.locateNewLib(\"$type\", \"$objectID\", \"$libID\")"));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo js::error(dao::getError());
|
||||
return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
}
|
||||
}
|
||||
|
||||
$products = $this->product->getPairs();
|
||||
$projects = $this->project->getPairsByProgram('', 'all', true);
|
||||
$executions = $this->execution->getList();
|
||||
if(in_array($type, array('product', 'project'))) $this->app->loadLang('api');
|
||||
|
||||
/* Splice project name. */
|
||||
foreach($executions as $executionID => $execution)
|
||||
$objects = array();
|
||||
if($type == 'product') $objects = $this->product->getPairs();
|
||||
if($type == 'project')
|
||||
{
|
||||
if($execution->multiple)
|
||||
$objects = $this->project->getPairsByProgram();
|
||||
if($this->app->tab == 'doc')
|
||||
{
|
||||
if($execution->type == 'stage' and $execution->grade > 1)
|
||||
{
|
||||
$parentExecutions = $this->dao->select('id,name')->from(TABLE_EXECUTION)->where('id')->in(trim($execution->path, ','))->andWhere('type')->in('stage,kanban,sprint')->orderBy('grade')->fetchPairs();
|
||||
$execution->name = implode('/', $parentExecutions);
|
||||
}
|
||||
|
||||
$executionPrefix = isset($projects[$execution->project]) ? $projects[$execution->project] . '/' : '';
|
||||
$executions[$executionID] = $executionPrefix . $execution->name;
|
||||
}
|
||||
else
|
||||
{
|
||||
unset($executions[$executionID]);
|
||||
$this->view->executionPairs = array(0 => '') + $this->execution->getPairs($objectID, 'all', 'multiple,leaf,noprefix');
|
||||
$this->view->project = $this->project->getById($objectID);
|
||||
}
|
||||
}
|
||||
|
||||
/* Get the project that has permission to view. */
|
||||
foreach($projects as $projectID => $project) if(!$this->app->user->admin and strpos(',' . $this->app->user->view->projects . ',', ',' . $projectID . ',') === false) unset($projects[$projectID]);
|
||||
if($type == 'execution') $objects = $this->execution->getPairs(0, 'all', 'multiple,leaf,noprefix');
|
||||
|
||||
if($type == 'execution')
|
||||
{
|
||||
$execution = $this->execution->getByID($objectID);
|
||||
if($execution->type == 'stage') $this->lang->doc->execution = str_replace($this->lang->executionCommon, $this->lang->project->stage, $this->lang->doc->execution);
|
||||
if($execution->type == 'stage') $this->lang->doc->libTypeList['execution'] = str_replace($this->lang->executionCommon, $this->lang->project->stage, $this->lang->doc->libTypeList['execution']);
|
||||
}
|
||||
|
||||
$libTypeList = $this->lang->doc->libTypeList;
|
||||
if(empty($products)) unset($libTypeList['product']);
|
||||
if(empty($projects)) unset($libTypeList['project']);
|
||||
if(empty($executions)) unset($libTypeList['execution']);
|
||||
if($type == 'custom') unset($this->lang->doclib->aclList['default']);
|
||||
if($type != 'custom')
|
||||
{
|
||||
$this->lang->doclib->aclList['default'] = sprintf($this->lang->doclib->aclList['default'], $this->lang->{$type}->common);
|
||||
$this->lang->doclib->aclList['private'] = sprintf($this->lang->doclib->privateACL, $this->lang->{$type}->common);
|
||||
unset($this->lang->doclib->aclList['open']);
|
||||
}
|
||||
|
||||
$this->app->loadLang('api');
|
||||
$this->lang->api->aclList['default'] = sprintf($this->lang->api->aclList['default'], $this->lang->{$type}->common);
|
||||
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->users = $this->user->getPairs('nocode|noclosed');
|
||||
$this->view->products = $products;
|
||||
$this->view->projects = $projects;
|
||||
$this->view->executions = $executions;
|
||||
$this->view->type = $type;
|
||||
$this->view->libTypeList = $libTypeList;
|
||||
$this->view->objectID = $objectID;
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->users = $this->user->getPairs('nocode|noclosed');
|
||||
$this->view->objects = $objects;
|
||||
$this->view->type = $type;
|
||||
$this->view->objectID = $objectID;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -241,7 +226,8 @@ class doc extends control
|
||||
}
|
||||
|
||||
$lib = $this->doc->getLibByID($libID);
|
||||
if(!empty($lib->product)) $this->view->product = $this->dao->select('id,name')->from(TABLE_PRODUCT)->where('id')->eq($lib->product)->fetch();
|
||||
if(!empty($lib->product)) $this->view->object = $this->product->getByID($lib->product);
|
||||
if(!empty($lib->project) and empty($lib->execution)) $this->view->object = $this->project->getById($lib->project);
|
||||
if(!empty($lib->execution))
|
||||
{
|
||||
$execution = $this->execution->getByID($lib->execution);
|
||||
@@ -256,8 +242,25 @@ class doc extends control
|
||||
$this->lang->doc->execution = str_replace($this->lang->executionCommon, $this->lang->project->stage, $this->lang->doc->execution);
|
||||
}
|
||||
|
||||
$this->view->execution = $execution;
|
||||
$this->view->object = $execution;
|
||||
}
|
||||
|
||||
if($lib->type == 'custom') unset($this->lang->doclib->aclList['default']);
|
||||
if($lib->type == 'api')
|
||||
{
|
||||
$this->app->loadLang('api');
|
||||
$type = !empty($lib->product) ? 'product' : 'project';
|
||||
$this->lang->api->aclList['default'] = sprintf($this->lang->api->aclList['default'], $this->lang->{$type}->common);
|
||||
}
|
||||
if($lib->type != 'custom')
|
||||
{
|
||||
$type = isset($type) ? $type : $lib->type;
|
||||
$this->lang->doclib->aclList['default'] = sprintf($this->lang->doclib->aclList['default'], $this->lang->{$type}->common);
|
||||
$this->lang->doclib->aclList['private'] = sprintf($this->lang->doclib->privateACL, $this->lang->{$type}->common);
|
||||
unset($this->lang->doclib->aclList['open']);
|
||||
}
|
||||
if(!empty($lib->main)) unset($this->lang->doclib->aclList['private'], $this->lang->doclib->aclList['open']);
|
||||
|
||||
$this->view->lib = $lib;
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->users = $this->user->getPairs('noletter|noclosed', $lib->users);
|
||||
@@ -276,7 +279,7 @@ class doc extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function deleteLib($libID, $confirm = 'no', $type = 'lib', $from = 'objectLibs')
|
||||
public function deleteLib($libID, $confirm = 'no', $type = 'lib', $from = 'tableContents')
|
||||
{
|
||||
if($libID == 'product' or $libID == 'execution') return;
|
||||
if($confirm == 'no')
|
||||
@@ -295,9 +298,15 @@ class doc extends control
|
||||
unset($_GET['onlybody']);
|
||||
return print(js::locate($this->createLink('doc', 'objectLibs', 'type=book'), 'parent.parent'));
|
||||
}
|
||||
if($this->app->tab == 'doc' and $from == 'tableContents') return print(js::reload('parent'));
|
||||
|
||||
$objectType = $lib->type;
|
||||
$objectID = strpos(',product,project,execution,', ",$objectType,") !== false ? $lib->{$objectType} : 0;
|
||||
if(in_array($this->app->tab, array('project', 'doc')) and $objectType == 'execution')
|
||||
{
|
||||
$objectType = 'project';
|
||||
$objectID = $lib->project;
|
||||
}
|
||||
$browseLink = $this->createLink('doc', $from, "type=$objectType&objectID=$objectID");
|
||||
|
||||
return print(js::locate($browseLink, 'parent'));
|
||||
@@ -307,27 +316,33 @@ class doc extends control
|
||||
/**
|
||||
* Create a doc.
|
||||
*
|
||||
* @param string $objectType
|
||||
* @param string $objectType product|project|execution|custom
|
||||
* @param int $objectID
|
||||
* @param int|string $libID
|
||||
* @param int $moduleID
|
||||
* @param string $docType
|
||||
* @param bool $fromGlobal
|
||||
* @param string $docType html|word|ppt|excel
|
||||
* @param string $from
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function create($objectType, $objectID, $libID, $moduleID = 0, $docType = '', $fromGlobal = false, $from = 'doc')
|
||||
public function create($objectType, $objectID, $libID, $moduleID = 0, $docType = '', $from = 'doc')
|
||||
{
|
||||
$linkType = $objectType;
|
||||
if($objectType == 'execution' and $this->app->tab != 'execution') $linkType = 'project';
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
setcookie('lastDocModule', (int)$this->post->module, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, false);
|
||||
$libID = $this->post->lib;
|
||||
$moduleID = $this->post->module;
|
||||
if(empty($libID) and strpos($this->post->module, '_') !== false) list($libID, $moduleID) = explode('_', $this->post->module);
|
||||
setcookie('lastDocModule', $moduleID, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, false);
|
||||
|
||||
$docResult = $this->doc->create();
|
||||
if(!$docResult or dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$docID = $docResult['id'];
|
||||
$files = zget($docResult, 'files', '');
|
||||
$lib = $this->doc->getLibByID($this->post->lib);
|
||||
$lib = $this->doc->getLibByID($libID);
|
||||
if($docResult['status'] == 'exists')
|
||||
{
|
||||
return $this->send(array('result' => 'fail', 'message' => sprintf($this->lang->duplicate, $this->lang->doc->common), 'locate' => $this->createLink('doc', 'view', "docID=$docID")));
|
||||
@@ -339,66 +354,75 @@ class doc extends control
|
||||
|
||||
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $docID));
|
||||
$objectID = zget($lib, $lib->type, 0);
|
||||
$params = "type={$lib->type}&objectID=$objectID&libID={$lib->id}&docID=" . $docResult['id'];
|
||||
$params = "type=$linkType&objectID=$objectID&libID={$lib->id}&docID=" . $docResult['id'];
|
||||
$link = isonlybody() ? 'parent' : $this->createLink('doc', 'objectLibs', $params);
|
||||
$response = array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $link);
|
||||
|
||||
return $this->send($response);
|
||||
}
|
||||
|
||||
unset($_GET['onlybody']);
|
||||
|
||||
if($this->app->tab == 'product')
|
||||
{
|
||||
$this->product->setMenu($objectID);
|
||||
unset($this->lang->product->menu->doc['subMenu']);
|
||||
}
|
||||
else if($this->app->tab == 'project')
|
||||
elseif($this->app->tab == 'project')
|
||||
{
|
||||
$this->project->setMenu($objectID);
|
||||
unset($this->lang->project->menu->doc['subMenu']);
|
||||
$this->project->setMenu($this->session->project);
|
||||
}
|
||||
else if($this->app->tab == 'execution')
|
||||
elseif($this->app->tab == 'execution')
|
||||
{
|
||||
$this->execution->setMenu($objectID);
|
||||
unset($this->lang->execution->menu->doc['subMenu']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->app->rawMethod = $objectType;
|
||||
unset($this->lang->doc->menu->product['subMenu']);
|
||||
unset($this->lang->doc->menu->custom['subMenu']);
|
||||
unset($this->lang->doc->menu->execution['subMenu']);
|
||||
unset($this->lang->doc->menu->project['subMenu']);
|
||||
}
|
||||
unset($_GET['onlybody']);
|
||||
|
||||
$this->config->showMainMenu = (strpos($this->config->doc->textTypes, $docType) === false or $from == 'template');
|
||||
|
||||
/* Get libs and the default lib id. */
|
||||
$gobackLink = ($objectID == 0 and $libID == 0) ? $this->createLink('doc', 'tableContents', "type=$objectType") : '';
|
||||
$gobackLink = ($objectID == 0 and $libID == 0) ? $this->createLink('doc', 'tableContents', "type=$linkType") : '';
|
||||
$unclosed = strpos($this->config->doc->custom->showLibs, 'unclosed') !== false ? 'unclosedProject' : '';
|
||||
$libs = $this->doc->getLibs($objectType, $extra = "withObject,$unclosed", $libID, $objectID);
|
||||
if(!$libID and !empty($libs)) $libID = key($libs);
|
||||
|
||||
$lib = $this->doc->getLibByID($libID);
|
||||
$type = isset($lib->type) ? $lib->type : 'product';
|
||||
$libName = isset($lib->name) ? $lib->name . $this->lang->colon : '';
|
||||
$lib = $this->doc->getLibByID($libID);
|
||||
$objects = array();
|
||||
if($objectType == 'project')
|
||||
{
|
||||
$objects = $this->loadModel('project')->getPairs();
|
||||
$this->view->executions = array(0 => '') + $this->loadModel('execution')->getPairs($objectID, 'all', 'multiple,leaf,noprefix');
|
||||
}
|
||||
elseif($objectType == 'execution')
|
||||
{
|
||||
$execution = $this->loadModel('execution')->getById($objectID);
|
||||
$objects = $this->execution->getPairs($execution->project, 'all', "multiple,leaf,noprefix");
|
||||
}
|
||||
elseif($objectType == 'product')
|
||||
{
|
||||
$objects = $this->loadModel('product')->getPairs();
|
||||
}
|
||||
$moduleOptionMenu = $this->doc->getLibsOptionMenu($libs);
|
||||
|
||||
$this->view->title = $libName . $this->lang->doc->create;
|
||||
$moduleID = $moduleID ? (int)$moduleID : (int)$this->cookie->lastDocModule;
|
||||
$moduleID = $libID . '_' . $moduleID;
|
||||
|
||||
$this->view->title = zget($lib, 'name', '', $lib->name . $this->lang->colon) . $this->lang->doc->create;
|
||||
$this->view->linkType = $linkType;
|
||||
$this->view->objectType = $objectType;
|
||||
$this->view->objectID = zget($lib, $lib->type, 0);
|
||||
$this->view->libID = $libID;
|
||||
$this->view->lib = $lib;
|
||||
$this->view->libs = $libs;
|
||||
$this->view->objects = $objects;
|
||||
$this->view->gobackLink = $gobackLink;
|
||||
$this->view->libName = $this->dao->findByID($libID)->from(TABLE_DOCLIB)->fetch('name');
|
||||
$this->view->moduleOptionMenu = $this->tree->getOptionMenu($libID, 'doc', $startModuleID = 0);
|
||||
$this->view->moduleID = $moduleID ? (int)$moduleID : (int)$this->cookie->lastDocModule;
|
||||
$this->view->libName = zget($lib, 'name', '');
|
||||
$this->view->moduleOptionMenu = $moduleOptionMenu;
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->docType = $docType;
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->users = $this->user->getPairs('nocode|noclosed|nodeleted');
|
||||
$this->view->fromGlobal = $fromGlobal;
|
||||
$this->view->from = $from;
|
||||
|
||||
$this->display();
|
||||
@@ -495,24 +519,22 @@ class doc extends control
|
||||
|
||||
if($doc->contentType == 'markdown') $this->config->doc->markdown->edit = array('id' => 'content', 'tools' => 'toolbar');
|
||||
|
||||
$lib = $this->doc->getLibByID($libID);
|
||||
$type = $lib->type;
|
||||
$lib = $this->doc->getLibByID($libID);
|
||||
$objectType = $lib->type;
|
||||
$objectID = zget($lib, $objectType, 0);
|
||||
|
||||
/* Set menus. */
|
||||
if($this->app->tab == 'product')
|
||||
{
|
||||
$this->product->setMenu($objectID);
|
||||
unset($this->lang->product->menu->doc['subMenu']);
|
||||
}
|
||||
else if($this->app->tab == 'project')
|
||||
{
|
||||
$this->project->setMenu($objectID);
|
||||
unset($this->lang->project->menu->doc['subMenu']);
|
||||
}
|
||||
else if($this->app->tab == 'execution')
|
||||
{
|
||||
$this->execution->setMenu($objectID);
|
||||
unset($this->lang->execution->menu->doc['subMenu']);
|
||||
}
|
||||
else if($this->app->tab == 'my')
|
||||
{
|
||||
@@ -523,45 +545,43 @@ class doc extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->app->rawMethod = $objectType;
|
||||
|
||||
unset($this->lang->doc->menu->product['subMenu']);
|
||||
unset($this->lang->doc->menu->custom['subMenu']);
|
||||
unset($this->lang->doc->menu->project['subMenu']);
|
||||
unset($this->lang->doc->menu->execution['subMenu']);
|
||||
|
||||
/* High light menu. */
|
||||
if(strpos(',product,project,execution,custom,book,', ",$objectType,") !== false)
|
||||
{
|
||||
$menu = $this->lang->doc->menu->$objectType;
|
||||
$menu['alias'] .= ',edit';
|
||||
$menu['subModule'] = 'doc';
|
||||
$this->lang->doc->menu->$objectType = $menu;
|
||||
}
|
||||
$this->app->rawMethod = $objectType == 'execution' ? 'project' : $objectType;
|
||||
}
|
||||
|
||||
$this->config->showMainMenu = strpos(',html,markdown,text,', ",{$doc->type},") === false;
|
||||
$libs = $this->doc->getLibs($objectType, 'withObject', $libID, $objectID);
|
||||
$objects = array();
|
||||
if($objectType == 'project')
|
||||
{
|
||||
$objects = $this->loadModel('project')->getPairs();
|
||||
}
|
||||
elseif($objectType == 'execution')
|
||||
{
|
||||
$execution = $this->loadModel('execution')->getById($objectID);
|
||||
$objects = $this->execution->getPairs($execution->project, 'all', "multiple,leaf,noprefix");
|
||||
}
|
||||
elseif($objectType == 'product')
|
||||
{
|
||||
$objects = $this->loadModel('product')->getPairs();
|
||||
}
|
||||
$moduleOptionMenu = $this->doc->getLibsOptionMenu($libs);
|
||||
|
||||
$objects = $this->doc->getOrderedObjects($objectType);
|
||||
$appendLib = (!empty($lib) and $lib->deleted == '1') ? $libID : 0;
|
||||
$libs = $this->doc->getLibsByObject($objectType, $objectID, '', $appendLib);
|
||||
$this->lang->modulePageNav = $this->doc->select($objectType, $objects, $objectID, $libs, $libID);
|
||||
$this->lang->TRActions = common::hasPriv('doc', 'create') ? $this->doc->buildCreateButton4Doc($objectType, $objectID, $libID) : '';
|
||||
$this->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->doc = $doc;
|
||||
$this->view->moduleOptionMenu = $this->tree->getOptionMenu($libID, 'doc', $startModuleID = 0);
|
||||
$this->view->type = $type;
|
||||
$this->view->libs = $this->doc->getLibs('all', 'withObject', $libID, $objectID, 'book');
|
||||
$this->view->moduleOptionMenu = $moduleOptionMenu;
|
||||
$this->view->type = $objectType;
|
||||
$this->view->libs = $libs;
|
||||
$this->view->objects = $objects;
|
||||
$this->view->lib = $lib;
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->users = $this->user->getPairs('noletter|noclosed|nodeleted', $doc->users);
|
||||
$this->view->from = $from;
|
||||
$this->view->files = $this->loadModel('file')->getByObject('doc', $docID);
|
||||
$this->view->objectID = zget($lib, $type, 0);
|
||||
$this->view->objectID = $objectID;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -802,16 +822,19 @@ class doc extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax get modules by libID.
|
||||
* Ajax get modules by object.
|
||||
*
|
||||
* @param int $libID
|
||||
* @param string $objectType
|
||||
* @param int $objectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetModules($libID)
|
||||
public function ajaxGetModules($objectType, $objectID)
|
||||
{
|
||||
$moduleOptionMenu = $this->tree->getOptionMenu($libID, 'doc', $startModuleID = 0);
|
||||
return print(html::select('module', $moduleOptionMenu, 0, "class='form-control'"));
|
||||
$unclosed = strpos($this->config->doc->custom->showLibs, 'unclosed') !== false ? 'unclosedProject' : '';
|
||||
$libs = $this->doc->getLibs($objectType, $extra = "withObject,$unclosed", '', $objectID);
|
||||
$moduleOptionMenu = $this->doc->getLibsOptionMenu($libs);
|
||||
return print(html::select('module', $moduleOptionMenu, '', "class='form-control'"));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -945,7 +968,7 @@ class doc extends control
|
||||
public function ajaxGetWhitelist($doclibID, $acl = '', $control = '', $docID = 0)
|
||||
{
|
||||
$doclib = $this->doc->getLibById($doclibID);
|
||||
$doc = $this->doc->getById($docID);
|
||||
$doc = $docID ? $this->doc->getById($docID) : null;
|
||||
$users = $this->user->getPairs('noletter|noempty|noclosed');
|
||||
$selectedUser = $docID ? $doc->users : $doclib->users;
|
||||
$selectedGroup = $docID ? $doc->groups : $doclib->groups;
|
||||
@@ -958,7 +981,7 @@ class doc extends control
|
||||
{
|
||||
foreach($groups as $groupID => $group)
|
||||
{
|
||||
if(strpos($doclib->groups, (string)$groupID) === false) unset($groups[$groupID]);
|
||||
if(strpos(",{$doclib->groups},", ",{$groupID},") === false) unset($groups[$groupID]);
|
||||
}
|
||||
return print(html::select('groups[]', $groups, $selectedGroup, "class='form-control picker-select' multiple $dropDirection"));
|
||||
}
|
||||
@@ -976,21 +999,10 @@ class doc extends control
|
||||
if(($doclib->acl == 'custom' or $doclib->acl == 'private') and strpos($doclib->users, (string)$account) === false ) unset($users[$account]);
|
||||
}
|
||||
|
||||
if($doclib->acl == 'custom')
|
||||
{
|
||||
return print(html::select('users[]', $users, $selectedUser, "multiple class='form-control picker-select' $dropDirection"));
|
||||
}
|
||||
if($doclib->acl == 'custom') return print(html::select('users[]', $users, $selectedUser, "multiple class='form-control picker-select' $dropDirection"));
|
||||
if($doclib->acl == 'open') return print(html::select('users[]', $users, $selectedUser, "multiple class='form-control picker-select' $dropDirection"));
|
||||
if($doclib->acl == 'default') return print(html::select('users[]', $users, $selectedUser, "multiple class='form-control picker-select' $dropDirection"));
|
||||
if($doclib->acl == 'private' and $doclib->type == 'project')
|
||||
{
|
||||
echo 'project';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'private';
|
||||
}
|
||||
|
||||
if($doclib->acl == 'private') echo 'private';
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1001,7 +1013,6 @@ class doc extends control
|
||||
$projectTeams = $this->loadModel('user')->getTeamMemberPairs($doclib->project);
|
||||
$stakeholders = $this->loadModel('stakeholder')->getStakeHolderPairs($doclib->project);
|
||||
$whitelist = implode(',', array_keys($projectTeams + $stakeholders)) . $project->whitelist . ',' . $project->PM . ',' . $doclib->users;
|
||||
|
||||
$selectedUser = $whitelist;
|
||||
}
|
||||
|
||||
@@ -1023,49 +1034,47 @@ class doc extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function showFiles($type, $objectID, $viewType = '', $orderBy = 't1.id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1, $searchTitle = '')
|
||||
public function showFiles($type, $objectID, $viewType = '', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1, $searchTitle = '')
|
||||
{
|
||||
if(empty($viewType)) $viewType = !empty($_COOKIE['docFilesViewType']) ? $this->cookie->docFilesViewType : 'card';
|
||||
$this->loadModel('file');
|
||||
if(empty($viewType)) $viewType = !empty($_COOKIE['docFilesViewType']) ? $this->cookie->docFilesViewType : 'list';
|
||||
setcookie('docFilesViewType', $viewType, $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
|
||||
$objects = $this->doc->getOrderedObjects($type);
|
||||
$objectID = $this->{$type}->saveState($objectID, $objects);
|
||||
$libs = $this->doc->getLibsByObject($type, $objectID);
|
||||
$this->lang->modulePageNav = $this->doc->select($type, $objects, $objectID, $libs);
|
||||
|
||||
$tab = strpos('doc,product,project,execution', $this->app->tab) !== false ? $this->app->tab : 'doc';
|
||||
if($tab != 'doc') $this->loadModel($tab)->setMenu($objectID);
|
||||
$objects = $this->doc->getOrderedObjects($type);
|
||||
list($libs, $libID, $object, $objectID, $objectDropdown) = $this->doc->setMenuByType($type, $objectID, 0);
|
||||
|
||||
$table = $this->config->objectTables[$type];
|
||||
$object = $this->dao->select('id,name,status')->from($table)->where('id')->eq($objectID)->fetch();
|
||||
|
||||
if(!empty($_POST)) $searchTitle = $this->post->title;
|
||||
if(empty($_POST) and !empty($searchTitle)) $this->post->title = $searchTitle;
|
||||
|
||||
$this->lang->TRActions = $this->doc->buildCollectButton4Doc();
|
||||
$this->lang->TRActions .= $this->doc->buildBrowseSwitch($type, $objectID, $viewType, $orderBy, $recTotal, $recPerPage, $pageID, $searchTitle);
|
||||
|
||||
/* Load pager. */
|
||||
$rawMethod = $this->app->rawMethod;
|
||||
$this->app->rawMethod = 'showFiles';
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
$this->app->rawMethod = $rawMethod;
|
||||
|
||||
$files = $this->doc->getLibFiles($type, $objectID, $orderBy, $pager);
|
||||
|
||||
$this->view->title = $object->name;
|
||||
$this->view->position[] = $object->name;
|
||||
|
||||
$this->view->type = $type;
|
||||
$this->view->object = $object;
|
||||
$this->view->files = $files;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->pager = $pager;
|
||||
$this->view->viewType = $viewType;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->objectID = $objectID;
|
||||
$this->view->canBeChanged = common::canModify($type, $object); // Determines whether an object is editable.
|
||||
$this->view->summary = $this->doc->summary($files);
|
||||
$this->view->sourcePairs = $this->doc->getFileSourcePairs($files);
|
||||
$this->view->fileIcon = $this->doc->getFileIcon($files);
|
||||
$this->view->type = $type;
|
||||
$this->view->object = $object;
|
||||
$this->view->files = $files;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->pager = $pager;
|
||||
$this->view->viewType = $viewType;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->objectID = $objectID;
|
||||
$this->view->canBeChanged = common::canModify($type, $object); // Determines whether an object is editable.
|
||||
$this->view->summary = $this->doc->summary($files);
|
||||
$this->view->sourcePairs = $this->doc->getFileSourcePairs($files);
|
||||
$this->view->fileIcon = $this->doc->getFileIcon($files);
|
||||
$this->view->libTree = $this->doc->getLibTree(0, $libs, $type, 0, $objectID);
|
||||
$this->view->objectDropdown = $objectDropdown;
|
||||
$this->view->searchTitle = $searchTitle;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -1157,9 +1166,6 @@ class doc extends control
|
||||
/* Set Custom. */
|
||||
foreach(explode(',', $this->config->doc->customObjectLibs) as $libType) $customObjectLibs[$libType] = $this->lang->doc->customObjectLibs[$libType];
|
||||
|
||||
$actionURL = $this->createLink('doc', 'tableContents', "type=$type&objectID=$objectID&libID=$libID&browseType=bySearch¶m=myQueryID");
|
||||
$this->doc->buildSearchForm(0, array(), 0, $actionURL, $type);
|
||||
|
||||
$moduleTree = $type == 'book' ? $this->doc->getBookStructure($libID) : $this->doc->getTreeMenu($type, $objectID, $libID, 0, $docID);
|
||||
|
||||
/* Get doc. */
|
||||
@@ -1273,7 +1279,9 @@ class doc extends control
|
||||
* @param string $type
|
||||
* @param int $objectID
|
||||
* @param int $libID
|
||||
* @param string $browseType
|
||||
* @param int $moduleID
|
||||
* @param string $browseType all|draft|bysearch
|
||||
* @param string $orderBy
|
||||
* @param int $param
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
@@ -1281,50 +1289,81 @@ class doc extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function tableContents($type, $objectID = 0, $libID = 0, $browseType = '', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
public function tableContents($type, $objectID = 0, $libID = 0, $moduleID = 0, $browseType = 'all', $orderBy = 'status,id_desc', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
list($libs, $libID, $object, $objectID) = $this->doc->setMenuByType($type, $objectID, $libID);
|
||||
$this->session->set('createProjectLocate', $this->app->getURI(true), 'doc');
|
||||
|
||||
$libID = (int)$libID;
|
||||
list($libs, $libID, $object, $objectID, $objectDropdown) = $this->doc->setMenuByType($type, $objectID, $libID);
|
||||
|
||||
$libID = (int)$libID;
|
||||
$moduleTree = $type == 'book' ? $this->doc->getBookStructure($libID) : $this->doc->getTreeMenu($type, $objectID, $libID);
|
||||
|
||||
$title = ($type == 'book' or $type == 'custom') ? $this->lang->doc->tableContents : $object->name . $this->lang->colon . $this->lang->doc->tableContents;
|
||||
$libTree = $this->doc->getLibTree($libID, $libs, $type, $moduleID, $objectID, $browseType);
|
||||
|
||||
$title = ($type == 'book' or $type == 'custom') ? $this->lang->doc->tableContents : $object->name . $this->lang->colon . $this->lang->doc->tableContents;
|
||||
$lib = $this->doc->getLibById($libID);
|
||||
$libType = isset($lib->type) && $lib->type == 'api' ? 'api' : 'lib';
|
||||
|
||||
/* Build the search form. */
|
||||
$queryID = $browseType == 'bySearch' ? (int)$param : 0;
|
||||
$actionURL = $this->createLink('doc', 'tableContents', "type=$type&objectID=$objectID&libID=$libID&browseType=bySearch¶m=myQueryID");
|
||||
$this->doc->buildSearchForm($libID, $libs, $queryID, $actionURL, $type);
|
||||
|
||||
$this->view->title = $title;
|
||||
$this->view->type = $type;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->param = $queryID;
|
||||
$this->view->users = $this->user->getPairs('noletter');
|
||||
if($browseType == 'bySearch')
|
||||
$actionURL = $this->createLink('doc', 'tableContents', "type=$type&objectID=$objectID&libID=$libID&moduleID=0&browseType=bySearch&orderBy=$orderBy¶m=myQueryID");
|
||||
if($libType == 'api')
|
||||
{
|
||||
/* Load pager. */
|
||||
$rawMethod = $this->app->rawMethod;
|
||||
$this->app->rawMethod = 'tableContents';
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
$this->app->rawMethod = $rawMethod;
|
||||
|
||||
$this->view->docs = $this->doc->getDocsBySearch($type, $objectID, $libID, $queryID, $pager);
|
||||
$this->view->browseType = 'bySearch';
|
||||
$this->view->pager = $pager;
|
||||
$this->display('doc', 'browse', "browseType=bySearch¶m=$queryID");
|
||||
$this->loadModel('api')->buildSearchForm($lib, $queryID, $actionURL, $libs, $type);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->view->libs = $libs;
|
||||
$this->view->objectID = $objectID;
|
||||
$this->view->libID = $libID;
|
||||
$this->view->moduleTree = $moduleTree;
|
||||
|
||||
$this->display();
|
||||
$this->doc->buildSearchForm($libID, $libs, $queryID, $actionURL, $type);
|
||||
}
|
||||
|
||||
/* Load pager. */
|
||||
$rawMethod = $this->app->rawMethod;
|
||||
$this->app->rawMethod = 'tableContents';
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
$this->app->rawMethod = $rawMethod;
|
||||
|
||||
if($libType == 'api')
|
||||
{
|
||||
$this->loadModel('api');
|
||||
$this->session->set('objectName', $this->lang->doc->api, 'admin');
|
||||
|
||||
$this->view->libs = $libs;
|
||||
$this->view->apiID = 0;
|
||||
$this->view->release = 0;
|
||||
$this->view->apiList = $browseType == 'bySearch' ? $this->api->getApiListBySearch($libID, $queryID, $type, array_keys($libs)) : $this->api->getListByModuleId($libID, $moduleID, 0, $pager);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(in_array($type, array('product', 'project'))) $this->session->set('objectName', $this->lang->doc->common, 'admin');
|
||||
if($this->config->vision == 'lite' or in_array($type, array('execution', 'custom'))) $this->session->set('objectName', '', 'admin');
|
||||
$this->view->docs = $browseType == 'bySearch' ? $this->doc->getDocsBySearch($type, $objectID, $libID, $queryID, $orderBy, $pager) : $this->doc->getDocs($libID, $moduleID, $browseType, $orderBy, $pager);
|
||||
}
|
||||
|
||||
$apiObjectType = $type == 'product' || $type == 'project' ? $type : '';
|
||||
$apiObjectID = $apiObjectType ? $objectID : 0;
|
||||
$apiLibs = $apiObjectType ? $this->doc->getApiLibs(0, $apiObjectType, $apiObjectID) : array();
|
||||
|
||||
$this->view->title = $title;
|
||||
$this->view->type = $type;
|
||||
$this->view->objectType = $type;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->param = $queryID;
|
||||
$this->view->users = $this->user->getPairs('noletter');
|
||||
$this->view->libTree = $libTree;
|
||||
$this->view->libID = $libID;
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->objectDropdown = $objectDropdown;
|
||||
$this->view->lib = $lib;
|
||||
$this->view->libType = $libType;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->objectID = $objectID;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->exportMethod = $type . '2export';
|
||||
$this->view->canExport = common::hasPriv('doc', $type . '2export');
|
||||
$this->view->apiLibID = key($apiLibs);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1379,4 +1418,46 @@ class doc extends control
|
||||
$this->view->libs = $this->doc->getLibs($type, '', '', $objectID);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax get objectType drop menu.
|
||||
*
|
||||
* @param string $objectType
|
||||
* @param int $objectID
|
||||
* @param string $module
|
||||
* @param string $method
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetDropMenu($objectType, $objectID, $module, $method)
|
||||
{
|
||||
list($myObjects, $normalObjects, $closedObjects) = $this->doc->getOrderedObjects($objectType, 'nomerge');
|
||||
|
||||
$this->view->objectType = $objectType;
|
||||
$this->view->objectID = $objectID;
|
||||
$this->view->module = $module;
|
||||
$this->view->method = $method;
|
||||
$this->view->normalObjects = $myObjects + $normalObjects;
|
||||
$this->view->closedObjects = $closedObjects;
|
||||
$this->view->objectsPinYin = common::convert2Pinyin($myObjects + $normalObjects + $closedObjects);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax Get the execution drop down by the projectID.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function ajaxGetExecution($projectID)
|
||||
{
|
||||
$executions = $this->execution->getList($projectID);
|
||||
$executionPairs = array(0 => '') + $this->execution->getPairs($projectID, 'all', 'multiple,leaf,noprefix');
|
||||
|
||||
$project = $this->project->getById($projectID);
|
||||
$disabled = $project->multiple ? '' : 'disabled';
|
||||
return print(html::select('execution', $executionPairs, 0, "class='form-control' data-placeholder='{$this->lang->doclib->tip->selectExecution}' $disabled data-drop_direction='down' data-drop-direction='down'"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
#mainContent .c-id {width: 70px;}
|
||||
#mainContent .c-id > a {color: #0c60e1;}
|
||||
.btn.ajaxCollect {width: 20px; padding: 0px;}
|
||||
.btn.ajaxCollect > img {width: 20px;}
|
||||
|
||||
@@ -104,3 +104,6 @@ ol, ul {margin-bottom: 0}
|
||||
|
||||
#subHeader .list-group>a.selected {color: #e9f2fb !important;}
|
||||
#pageNav #dropMenu .table-col .list-group .icon-move {display:block; float: left; font-size: 12px; padding: 3px 4px 3px 1px;}
|
||||
|
||||
#aclBox .acl-tip {color: #838a9d;}
|
||||
.ajaxCollect > img.star-empty {margin-right: 0px;}
|
||||
|
||||
@@ -1,2 +1,42 @@
|
||||
.doc-title {width:400px;}
|
||||
.doc-title input {border: unset; font-size: 18px; font-weight: bold; color: #3c4353; padding-left: 16px;}
|
||||
.doc-title .form-control:focus {border: unset; box-shadow: unset;}
|
||||
.doc-title input::-webkit-input-placeholder {color: #D8DBDE;}
|
||||
.doc-title.required:after {top: 4px; right: 0; left: 12px; display: inline-table;}
|
||||
#savePath {display:inline-block; width:320px; overflow:hidden; white-space: nowrap; height: 19px; padding-top: 4px; padding-right:8px;}
|
||||
.contentmarkdown.required:after, .contenthtml.required:after {right:3px;}
|
||||
#headerBox {border-bottom: 1px solid #e3e3e3;}
|
||||
#headerBox td:last-child {padding-right: 24px;}
|
||||
#editorContent {padding: 0;}
|
||||
|
||||
#contentBox {padding: 0; width: 100%;}
|
||||
#contentBox .ke-container {overflow: visible;}
|
||||
#contentBox .ke-container, #contentBox .contenthtml {border: unset; background: #efefef;}
|
||||
#contentBox .ke-container.focus {box-shadow: unset; border-color: unset;}
|
||||
#contentBox .ke-toolbar {padding-left: 20px; width: 100%; height: 30px;}
|
||||
#contentBox .ke-edit {border-top: 1px solid rgb(220, 220, 220)}
|
||||
#contentBox .ke-edit, #contentBox .CodeMirror {margin: 8px 200px 0 200px; background: #fff;}
|
||||
#contentBox .kindeditor-ph {padding: 20px 20px 0 20px !important;}
|
||||
#contentBox .editor-toolbar {background: #fff; padding-left: 20px; border-right: unset; border-top: unset; height: 30px;}
|
||||
#contentBox .CodeMirror {padding: 20px 20px 0 20px;}
|
||||
#contentBox .CodeMirror.CodeMirror-wrap {border-left: 0; border-right: 0; border-bottom: 0;}
|
||||
#contentBox .ke-statusbar {display: none;}
|
||||
#contentBox .contentmarkdown {background: #efefef;}
|
||||
|
||||
.article-content {padding: 8px 20px;}
|
||||
|
||||
#noticeAcl {margin-left: 10px; vertical-align: middle;}
|
||||
|
||||
#basicInfoLink {border: unset;}
|
||||
|
||||
#modalBasicInfo .modal-dialog {width:800px;}
|
||||
#modalBasicInfo .modal-content {padding:0px;}
|
||||
#modalBasicInfo .modal-body {padding:10px 30px 10px 10px; overflow-x: hidden !important;}
|
||||
#modalBasicInfo .modal-body .close {position:fixed; right:15px; top:15px}
|
||||
#basicInfoBox{margin-bottom: 10px;}
|
||||
#basicInfoBox tfoot td {padding-bottom: 0;}
|
||||
.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,10 +1,9 @@
|
||||
.modal-dialog {width: 75%;}
|
||||
form {margin-bottom: 100px; padding-left: 65px;}
|
||||
form {margin-bottom: 50px;}
|
||||
table {width: 90% !important;}
|
||||
#mainContent table th {width: 70px;}
|
||||
|
||||
#whiteListBox div.input-group {margin-bottom: 2px;}
|
||||
|
||||
#product_chosen {width: 50% !important;}
|
||||
#execution_chosen {width: 50% !important;}
|
||||
|
||||
#groups_chosen.chosen-container .chosen-results, #users_chosen.chosen-container .chosen-results {max-height: 160px;}
|
||||
#aclBox > th {vertical-align: top; padding-top: 17px;}
|
||||
|
||||
@@ -1,3 +1,41 @@
|
||||
.doc-title {width:400px;}
|
||||
.doc-title input {border: unset; font-size: 18px; font-weight: bold; color: #3c4353; padding-left: 16px;}
|
||||
.doc-title .form-control:focus {border: unset; box-shadow: unset;}
|
||||
.doc-title input::-webkit-input-placeholder {color: #D8DBDE;}
|
||||
.doc-title.required:after {top: 4px; right: 0; left: 12px; display: inline-table;}
|
||||
#savePath {display:inline-block; width:320px; overflow:hidden; white-space: nowrap; height: 19px; padding-top: 4px; padding-right:8px;}
|
||||
.contenthtml.required:after {right:3px;}
|
||||
#headerBox {border-bottom: 1px solid #e3e3e3;}
|
||||
#headerBox td:last-child {padding-right: 24px;}
|
||||
#editorContent {padding: 0;}
|
||||
|
||||
#contentBox {padding: 0; width: 100%;}
|
||||
#contentBox .ke-container {overflow: visible;}
|
||||
#contentBox .ke-container, #contentBox .contenthtml {border: unset; background: #efefef;}
|
||||
#contentBox .ke-container.focus {box-shadow: unset; border-color: unset;}
|
||||
#contentBox .ke-toolbar {padding-left: 20px; width: 100%; height: 30px;}
|
||||
#contentBox .ke-edit {border-top: 1px solid rgb(220, 220, 220)}
|
||||
#contentBox .ke-edit, #contentBox .CodeMirror {margin: 8px 200px 0 200px; background: #fff;}
|
||||
#contentBox .kindeditor-ph {padding: 20px 20px 0 20px !important;}
|
||||
#contentBox .editor-toolbar {background: #fff; padding-left: 20px; border-right: unset; border-top: unset; height: 30px;}
|
||||
#contentBox .CodeMirror {padding: 20px 20px 0 20px;}
|
||||
#contentBox .CodeMirror.CodeMirror-wrap {border-left: 0; border-right: 0; border-bottom: 0;}
|
||||
#contentBox .ke-statusbar {display: none;}
|
||||
|
||||
.article-content {padding: 8px 20px;}
|
||||
|
||||
#noticeAcl {margin-left: 10px; vertical-align: middle;}
|
||||
|
||||
#basicInfoLink {border: unset;}
|
||||
|
||||
#modalBasicInfo .modal-dialog {width:800px;}
|
||||
#modalBasicInfo .modal-content {padding:0px;}
|
||||
#modalBasicInfo .modal-body {padding:10px 30px 10px 10px; overflow-x: hidden !important;}
|
||||
#basicInfoBox{margin-bottom: 10px;}
|
||||
#basicInfoBox tfoot td {padding-bottom: 0;}
|
||||
.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;}
|
||||
#mainContent .main-header h2 {width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
|
||||
.fullscreen-save, .markdown-fullscreen-save {position: fixed; top: 10px; right: 30px; z-index: 999999;}
|
||||
|
||||
@@ -3,5 +3,5 @@ form {margin-right: 30px;}
|
||||
#whiteListBox div.input-group {margin-bottom: 2px;}
|
||||
#whiteListBox .input-group:last-child {margin-top: 10px;}
|
||||
|
||||
.center-block {margin-top: 20px;}
|
||||
#groups_chosen.chosen-container .chosen-results, #users_chosen.chosen-container .chosen-results {max-height: 160px;}
|
||||
#aclBox > th {vertical-align: top; padding-top: 17px;}
|
||||
|
||||
@@ -1,3 +1,57 @@
|
||||
.c-id {width: 80px;}
|
||||
.c-source {width: 300px;}
|
||||
.c-size {width: 100px;}
|
||||
.c-type {width: 90px;}
|
||||
|
||||
.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;}
|
||||
|
||||
.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;}
|
||||
.no-content-button a:nth-child(2) {margin-left: 20px;}
|
||||
|
||||
.cell .detail .detail-title {padding-left: 5px; list-style: none;}
|
||||
.menu-actions {position: absolute; top: 7px; right: 45px; padding: 7px 8px;}
|
||||
.detail ul {position: relative;}
|
||||
.tail-info {position: absolute; right: 0; padding-left: 10px; padding-top: 1px;}
|
||||
.tail-info, .doc-title, span.item {background: #fff;}
|
||||
span.item>a {padding-left: 6px;}
|
||||
span.dotted-line+a {display: block;}
|
||||
#modules li.doc:before, .chapterNode:before, .independent:before {content: " "; width: 100%; border-bottom: 1px dashed #b5b9c5; position: absolute; top: 13px; right: 0; left: 30px;}
|
||||
.doc-title ,.item{display: inline-block !important; position: relative; padding-right: 10px; max-width:80%; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;}
|
||||
#modules i.icon-file-text {color: #D0D2D6; font-size: 14px;}
|
||||
|
||||
.sortable-sorting .module-name > a {cursor: move;}
|
||||
.sortable-sorting li >.tree-group {opacity: .5;}
|
||||
.sortable-sorting li:before {opacity: .3;}
|
||||
.sortable-sorting .drop-here .tree-group {background-color: #fff3e0;}
|
||||
.sortable-sorting .drop-here .tree-group > * {opacity: .1;}
|
||||
.sortable-sorting .drag-shadow .tree-group {opacity: 1!important;}
|
||||
.sortable-sorting .drag-shadow .tree-actions {visibility: hidden;}
|
||||
.is-sorting > li:before {opacity: 1;}
|
||||
.is-sorting > li > .tree-group {opacity: 1; border-radius: 4px;}
|
||||
.is-sorting > li ul {display: none!important;}
|
||||
li.drag-shadow ul {display: none!important;}
|
||||
|
||||
#bysearchTab::before {display: none;}
|
||||
#leftBar .selectBox #currentItem {width: 150px; display: flex; align-items: center;}
|
||||
[lang^=zh] #leftBar .selectBox #currentItem {width: 180px;}
|
||||
#leftBar .selectBox #currentItem > .text {overflow: hidden; text-align: left; flex: 0 1 100%;}
|
||||
#leftBar .selectBox + .searchBox {padding-left: 5px;}
|
||||
|
||||
@@ -1,7 +1,22 @@
|
||||
.main-content {padding-top: 0; padding-bottom: 0;}
|
||||
.main-content #createDropdown {display: inline-block;}
|
||||
.main-content #createDropdown ul {position: absolute;}
|
||||
.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;}
|
||||
#main {padding-bottom: 0;}
|
||||
.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;}
|
||||
|
||||
.no-content {width: 100px; height: 100px; margin: 0 auto;}
|
||||
.notice {text-align: center; padding-left: 15px; padding-top: 20px;}
|
||||
@@ -17,9 +32,7 @@ span.item>a {padding-left: 6px;}
|
||||
span.dotted-line+a {display: block;}
|
||||
#modules li.doc:before, .chapterNode:before, .independent:before {content: " "; width: 100%; border-bottom: 1px dashed #b5b9c5; position: absolute; top: 13px; right: 0; left: 30px;}
|
||||
.doc-title ,.item{display: inline-block !important; position: relative; padding-right: 10px; max-width:80%; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;}
|
||||
.tree li.has-list.open:before {content: unset;}
|
||||
#modules i.icon-file-text {color: #D0D2D6; font-size: 14px;}
|
||||
.tree li>a {max-width: 80%;}
|
||||
|
||||
.sortable-sorting .module-name > a {cursor: move;}
|
||||
.sortable-sorting li >.tree-group {opacity: .5;}
|
||||
@@ -33,6 +46,10 @@ span.dotted-line+a {display: block;}
|
||||
.is-sorting > li ul {display: none!important;}
|
||||
li.drag-shadow ul {display: none!important;}
|
||||
|
||||
.tree-group {position: relative;}
|
||||
.tree-group > .module-name {white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; display: block;}
|
||||
.tree li.has-list.open:before {left: 6px;}
|
||||
.table .c-name > .doc-title {display: inline-block; max-width: 90%; overflow: hidden; background: transparent; padding-right:0px;}
|
||||
.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.table > thead > tr {height: 32px;}
|
||||
|
||||
#bysearchTab::before {display: none;}
|
||||
#queryBox #groupAndOr {min-width: 60px;}
|
||||
|
||||
+87
-31
@@ -1,16 +1,31 @@
|
||||
/**
|
||||
* Load modules by libID.
|
||||
* Load modules by objectID and objectType.
|
||||
*
|
||||
* @param int $libID
|
||||
* @param string $objectType
|
||||
* @param int $objectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function loadModules(libID)
|
||||
function loadObjectModules(objectType, objectID)
|
||||
{
|
||||
var link = createLink('doc', 'ajaxGetModules', 'libID=' + libID);
|
||||
var link = createLink('doc', 'ajaxGetModules', 'objectType=' + objectType + '&objectID=' + objectID);
|
||||
$('#moduleBox').load(link, function(){$('#moduleBox').find('select').chosen()});
|
||||
}
|
||||
|
||||
/**
|
||||
* Load executions.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function loadExecutions(projectID)
|
||||
{
|
||||
var link = createLink('project', 'ajaxGetExecutions', "projectID=" + projectID + "&executionID=0&mode=multiple,leaf,noprefix");
|
||||
$('#executionBox').load(link, function(){$('#executionBox').find('select').attr('data-placeholder', holders.execution).attr('onchange', "loadObjectModules('execution', this.value)").chosen()});
|
||||
loadObjectModules('project', projectID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle acl.
|
||||
*
|
||||
@@ -22,35 +37,25 @@ function loadModules(libID)
|
||||
function toggleAcl(acl, type)
|
||||
{
|
||||
var libID = $('#lib').val();
|
||||
if(acl == 'custom')
|
||||
if($('#lib').length == 0 && $('#module').length > 0)
|
||||
{
|
||||
var moduleID = $('#module').val();
|
||||
if(moduleID.indexOf('_') >= 0) libID = moduleID.substr(0, moduleID.indexOf('_'));
|
||||
}
|
||||
if(acl == 'private')
|
||||
{
|
||||
$('#whiteListBox').removeClass('hidden');
|
||||
$('#groupBox').removeClass('hidden');
|
||||
if(type == 'doc') loadWhitelist(libID);
|
||||
}
|
||||
else if(acl == 'private')
|
||||
{
|
||||
$('#whiteListBox').removeClass('hidden');
|
||||
$('#groupBox').addClass('hidden');
|
||||
if(type == 'doc')
|
||||
{
|
||||
loadWhitelist(libID);
|
||||
$('#whiteListBox').addClass('hidden');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#whiteListBox').addClass('hidden');
|
||||
if(type == 'doc') loadWhitelist(libID);
|
||||
$('#groupBox').addClass('hidden');
|
||||
}
|
||||
|
||||
if(type == 'lib')
|
||||
{
|
||||
var libType = $('input[name="type"]:checked').val();
|
||||
var notice = typeof(noticeAcl[libType][acl]) != 'undefined' ? noticeAcl[libType][acl] : '';
|
||||
$('#noticeAcl').html(notice);
|
||||
|
||||
if((libType == 'custom' || libType == 'api' || libType == 'book') && acl == 'private') $('#whiteListBox').addClass('hidden');
|
||||
if(libType == 'book' && acl == 'private') $('#whiteListBox').addClass('hidden');
|
||||
|
||||
if(libType == 'project' && typeof(doclibID) != 'undefined')
|
||||
{
|
||||
@@ -63,10 +68,11 @@ function toggleAcl(acl, type)
|
||||
})
|
||||
}
|
||||
}
|
||||
else
|
||||
else if(type == 'doc')
|
||||
{
|
||||
var notice = typeof(noticeAcl[acl]) != 'undefined' ? noticeAcl[acl] : '';
|
||||
$('#noticeAcl').html(notice);
|
||||
$('#whiteListBox').toggleClass('hidden', acl == 'open');
|
||||
$('#groupBox').toggleClass('hidden', acl == 'open');
|
||||
loadWhitelist(libID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,9 +88,8 @@ function loadDocModule(libID)
|
||||
var link = createLink('doc', 'ajaxGetChild', 'libID=' + libID);
|
||||
$.post(link, function(data)
|
||||
{
|
||||
$('#module').replaceWith(data);
|
||||
$('#module_chosen').remove();
|
||||
$('#module').chosen();
|
||||
$('#moduleBox').html(data);
|
||||
$('#module').picker();
|
||||
});
|
||||
|
||||
loadWhitelist(libID);
|
||||
@@ -279,23 +284,74 @@ $(document).ready(function()
|
||||
}).on('click', function(e){e.stopPropagation()});
|
||||
}
|
||||
|
||||
$(document).on('mousedown', '.ajaxCollect', function (event) {
|
||||
$(document).on('mousedown', '.ajaxCollect', function (event)
|
||||
{
|
||||
var obj = $(this);
|
||||
var url = obj.data('url');
|
||||
$.get(url, function(response)
|
||||
{
|
||||
if(response.status == 'yes')
|
||||
{
|
||||
obj.children('i').removeClass().addClass('icon icon-star text-yellow');
|
||||
obj.children('img').attr('src', 'static/svg/star.svg');
|
||||
obj.parent().prev().children('.file-name').children('i').remove('.icon');
|
||||
obj.parent().prev().children('.file-name').prepend('<i class="icon icon-star text-yellow"></i> ');
|
||||
}
|
||||
else
|
||||
{
|
||||
obj.children('i').removeClass().addClass('icon icon-star-empty');
|
||||
obj.children('img').attr('src', 'static/svg/star-empty.svg');
|
||||
obj.parent().prev().children('.file-name').children('i').remove(".icon");
|
||||
}
|
||||
}, 'json');
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
function locateNewLib(type, objectID, libID)
|
||||
{
|
||||
location.href = createLink('doc', 'tableContents', 'type=' + type + '&objectID=' + objectID + '&libID=' + libID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set save path.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function setSavePath()
|
||||
{
|
||||
savePath = defaultSave;
|
||||
if($('#modalBasicInfo #product').length == 1)
|
||||
{
|
||||
savePath += $('#modalBasicInfo #product option:checked').text() + '/';
|
||||
}
|
||||
else if($('#modalBasicInfo #project').length == 1 && $('#modalBasicInfo #execution').length == 0)
|
||||
{
|
||||
savePath += $('#modalBasicInfo #project option:checked').text() + '/';
|
||||
}
|
||||
else if($('#modalBasicInfo #project').length == 1 && $('#modalBasicInfo #execution').length == 1)
|
||||
{
|
||||
if($('#modalBasicInfo #execution').val() == '') savePath += $('#modalBasicInfo #project option:checked').text() + '/';
|
||||
if($('#modalBasicInfo #execution').val() != '') savePath += $('#modalBasicInfo #execution option:checked').text() + '/';
|
||||
}
|
||||
else if($('#modalBasicInfo #execution').length == 1)
|
||||
{
|
||||
savePath += $('#modalBasicInfo #execution option:checked').text() + '/';
|
||||
}
|
||||
savePath += $('#modalBasicInfo #module option:checked').text();
|
||||
|
||||
$('#savePath').html(savePath).attr('title', savePath);
|
||||
}
|
||||
|
||||
/**
|
||||
* Submit form.
|
||||
*
|
||||
* @param object $object
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function submit(object)
|
||||
{
|
||||
$(object).attr('type', 'submit');
|
||||
$('#dataform').submit();
|
||||
setTimeout(function(){$(object).attr('type', 'button').removeAttr('disabled')}, 2000);
|
||||
}
|
||||
|
||||
+50
-94
@@ -1,21 +1,56 @@
|
||||
$(function()
|
||||
{
|
||||
toggleAcl($('input[name="acl"]:checked').val(), 'doc');
|
||||
setTimeout(function(){initPage(docType)}, 50);
|
||||
$('input[name="type"]').change(function()
|
||||
/* Set editor content height. */
|
||||
var contentHeight = $(document).height() - 92;
|
||||
setTimeout(function(){$('.ke-edit-iframe, .ke-edit, .ke-edit-textarea').height(contentHeight);}, 100);
|
||||
setTimeout(function(){$('.CodeMirror').height($(document).height() - 112);}, 100);
|
||||
$('iframe.ke-edit-iframe').contents().find('.article-content').css('padding', '20px 20px 0 20px');
|
||||
|
||||
setSavePath();
|
||||
|
||||
/* Change for show create error. */
|
||||
$('#contentBox #content').attr('id', 'contentHTML');
|
||||
/* Copy doc title to modal title. */
|
||||
$('#modalBasicInfo').on('show.zui.modal', function()
|
||||
{
|
||||
var type = $(this).val();
|
||||
if(type == 'text')
|
||||
{
|
||||
$('#contentBox').removeClass('hidden');
|
||||
$('#urlBox').addClass('hidden');
|
||||
}
|
||||
else if(type == 'url')
|
||||
{
|
||||
$('#contentBox').addClass('hidden');
|
||||
$('#urlBox').removeClass('hidden');
|
||||
}
|
||||
$('#modalBasicInfo #copyTitle').html($('.doc-title #editorTitle').val().replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"));
|
||||
});
|
||||
$('#modalBasicInfo').on('hide.zui.modal', function(){setSavePath();});
|
||||
|
||||
$('#saveDraft').click(function()
|
||||
{
|
||||
if($('#editorTitle').val() == '')
|
||||
{
|
||||
bootbox.alert(titleNotEmpty);
|
||||
return false;
|
||||
}
|
||||
$('#status').val('draft');
|
||||
submit(this);
|
||||
});
|
||||
$('#releaseBtn').click(function(){submit(this);});
|
||||
$('#basicInfoLink').click(function()
|
||||
{
|
||||
if($('#editorTitle').val() == '')
|
||||
{
|
||||
bootbox.alert(titleNotEmpty);
|
||||
return false;
|
||||
}
|
||||
if(requiredFields.indexOf('content') >= 0)
|
||||
{
|
||||
var contentType = $('#contentType').val();
|
||||
var content = '';
|
||||
if(contentType == 'html') content = $('#contentHTML').val();
|
||||
if(contentType == 'markdown')content = $('#contentMarkdown').val();
|
||||
if(content == '')
|
||||
{
|
||||
bootbox.alert(contentNotEmpty);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
$('#status').val('normal');
|
||||
});
|
||||
|
||||
setTimeout(function(){initPage(docType)}, 50);
|
||||
if(typeof(window.editor) != 'undefined')
|
||||
{
|
||||
$('.ke-toolbar .ke-outline:last').after("<span data-name='unlink' class='ke-outline' title='Markdown' onclick='toggleEditor(\"markdown\")' style='font-size: unset; line-height: unset;'>Markdown</span>");
|
||||
@@ -61,68 +96,6 @@ $(function()
|
||||
});
|
||||
|
||||
if($(".createCustomLib").length == 1) $(".createCustomLib").click(); // Fix bug #15139.
|
||||
|
||||
if(!fromGlobal && textType.indexOf(docType) != -1 && from == 'doc')
|
||||
{
|
||||
var basicInfo = JSON.parse(sessionStorage.getItem('docBasicInfo'));
|
||||
|
||||
var libID = 0;
|
||||
var moduleID = 0;
|
||||
var title = '';
|
||||
var keywords = '';
|
||||
var type = '';
|
||||
var acl = '';
|
||||
var contentType = '';
|
||||
var fileNames = [];
|
||||
var mailto = [];
|
||||
var groups = [];
|
||||
var users = [];
|
||||
|
||||
$.each(basicInfo, function(index, value)
|
||||
{
|
||||
switch(value.name)
|
||||
{
|
||||
case 'lib':
|
||||
libID = value.value;
|
||||
break;
|
||||
case 'module':
|
||||
moduleID = value.value;
|
||||
break;
|
||||
case 'title':
|
||||
title = value.value;
|
||||
break;
|
||||
case 'keywords':
|
||||
keywords = value.value;
|
||||
break;
|
||||
case 'type':
|
||||
type = value.value;
|
||||
break;
|
||||
case 'acl':
|
||||
acl = value.value;
|
||||
break;
|
||||
case 'contentType':
|
||||
contentType = value.value;
|
||||
break;
|
||||
case 'mailto[]':
|
||||
mailto.push(value.value);
|
||||
break;
|
||||
case 'groups[]':
|
||||
groups.push(value.value);
|
||||
break;
|
||||
case 'users[]':
|
||||
users.push(value.value);
|
||||
break;
|
||||
}
|
||||
})
|
||||
|
||||
$('#title').val(title);
|
||||
$('#modalBasicInfo #keywords').val(keywords);
|
||||
$('#modalBasicInfo #mailto').data('zui.picker').setValue(mailto);
|
||||
$('#modalBasicInfo input:radio[value='+ acl +']').attr('checked', 'checked');
|
||||
toggleAcl($('input[name="acl"]:checked').val(), 'doc');
|
||||
setTimeout(function(){$('#modalBasicInfo #groups').data('zui.picker').setValue(groups)}, 1000);
|
||||
setTimeout(function(){$('#modalBasicInfo #users').data('zui.picker').setValue(users)}, 1000);
|
||||
}
|
||||
})
|
||||
|
||||
function toggleEditor(type)
|
||||
@@ -187,25 +160,8 @@ function loadWhitelist(libID)
|
||||
|
||||
$.post(userLink, function(users)
|
||||
{
|
||||
if(users == 'private')
|
||||
if(users != 'private')
|
||||
{
|
||||
$('#aclopen').parent('.radio-inline').addClass('hidden');
|
||||
$('#aclcustom').parent('.radio-inline').addClass('hidden');
|
||||
$('#whiteListBox').addClass('hidden');
|
||||
$('#aclprivate').prop('checked', true);
|
||||
}
|
||||
else if(users == 'project')
|
||||
{
|
||||
$('#aclprivate').parent('.radio-inline').addClass('hidden');
|
||||
$('#aclcustom').parent('.radio-inline').addClass('hidden');
|
||||
$('#whiteListBox').addClass('hidden');
|
||||
$('#aclopen').prop('checked', true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#aclopen').parent('.radio-inline').removeClass('hidden');
|
||||
$('#aclcustom').parent('.radio-inline').removeClass('hidden');
|
||||
|
||||
$('#users').replaceWith(users);
|
||||
$('#users').next('.picker').remove();
|
||||
$('#users').picker();
|
||||
|
||||
+21
-131
@@ -1,143 +1,33 @@
|
||||
$(function()
|
||||
$('#project').change(function()
|
||||
{
|
||||
$('input[name="type"]').change(function()
|
||||
$.get(createLink('doc', 'ajaxGetExecution', 'projectID=' + $(this).val()), function(data)
|
||||
{
|
||||
var libType = $(this).val();
|
||||
changeByLibType(libType);
|
||||
})
|
||||
changeByLibType($('input[name="type"]:checked').val());
|
||||
toggleAcl($('form [name=acl]:checked').val(), 'lib');
|
||||
if(data)
|
||||
{
|
||||
$('#execution').replaceWith(data);
|
||||
$('#execution_chosen').remove();
|
||||
$('#execution').chosen();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Change form by lib type.
|
||||
*
|
||||
* @param string libType
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function changeByLibType(libType)
|
||||
{
|
||||
if(libType == 'product')
|
||||
{
|
||||
$('table tr.product').removeClass('hidden');
|
||||
$('#product').attr('disabled', false);
|
||||
|
||||
$('table tr.project').addClass('hidden');
|
||||
$('#project').attr('disabled', true);
|
||||
|
||||
$('table tr.execution').addClass('hidden');
|
||||
$('#execution').attr('disabled', true);
|
||||
|
||||
$('.normalLib').removeClass('hidden');
|
||||
$('.normalLib input').attr('disabled', false);
|
||||
|
||||
$('table tr.apilib').addClass('hidden');
|
||||
$('.apilib input, #desc, #baseUrl').attr('disabled', true);
|
||||
|
||||
$('form').removeAttr('action');
|
||||
|
||||
changeDoclibAcl(libType);
|
||||
}
|
||||
else if(libType == 'project')
|
||||
{
|
||||
$('table tr.project').removeClass('hidden');
|
||||
$('#project').attr('disabled', false);
|
||||
|
||||
$('table tr.product').addClass('hidden');
|
||||
$('#product').attr('disabled', true);
|
||||
|
||||
$('table tr.execution').addClass('hidden');
|
||||
$('#execution').attr('disabled', true);
|
||||
|
||||
$('.normalLib').removeClass('hidden');
|
||||
$('.normalLib input').attr('disabled', false);
|
||||
|
||||
$('table tr.apilib').addClass('hidden');
|
||||
$('.apilib input, #desc, #baseUrl').attr('disabled', true);
|
||||
|
||||
$('form').removeAttr('action');
|
||||
|
||||
changeDoclibAcl(libType);
|
||||
}
|
||||
else if(libType == 'execution')
|
||||
{
|
||||
$('table tr.execution').removeClass('hidden');
|
||||
$('#execution').attr('disabled', false);
|
||||
|
||||
$('table tr.product').addClass('hidden');
|
||||
$('#product').attr('disabled', true);
|
||||
|
||||
$('table tr.project').addClass('hidden');
|
||||
$('#project').attr('disabled', true);
|
||||
|
||||
$('.normalLib').removeClass('hidden');
|
||||
$('.normalLib input').attr('disabled', false);
|
||||
|
||||
$('table tr.apilib').addClass('hidden');
|
||||
$('.apilib input, #desc, #baseUrl').attr('disabled', true);
|
||||
|
||||
$('form').removeAttr('action');
|
||||
|
||||
changeDoclibAcl(libType);
|
||||
}
|
||||
else if(libType == 'api')
|
||||
{
|
||||
$('table tr.product').addClass('hidden');
|
||||
$('#product').attr('disabled', true);
|
||||
|
||||
$('table tr.project').addClass('hidden');
|
||||
$('#project').attr('disabled', true);
|
||||
|
||||
$('table tr.execution').addClass('hidden');
|
||||
$('#execution').attr('disabled', true);
|
||||
|
||||
$('.normalLib').addClass('hidden');
|
||||
$('.normalLib input').attr('disabled', true);
|
||||
|
||||
$('table tr.apilib').removeClass('hidden');
|
||||
$('.apilib input, #desc, #baseUrl').attr('disabled', false);
|
||||
|
||||
$('form').attr('action', createLink('api', 'createLib'));
|
||||
|
||||
changeDoclibAcl(libType);
|
||||
}
|
||||
else
|
||||
{
|
||||
$('table tr.product').addClass('hidden');
|
||||
$('#product').attr('disabled', true);
|
||||
|
||||
$('table tr.project').addClass('hidden');
|
||||
$('#project').attr('disabled', true);
|
||||
|
||||
$('table tr.execution').addClass('hidden');
|
||||
$('#execution').attr('disabled', true);
|
||||
|
||||
$('.normalLib').removeClass('hidden');
|
||||
$('.normalLib input').attr('disabled', false);
|
||||
|
||||
$('table tr.apilib').addClass('hidden');
|
||||
$('.apilib input, #desc, #baseUrl').attr('disabled', true);
|
||||
|
||||
$('form').removeAttr('action');
|
||||
|
||||
changeDoclibAcl(libType);
|
||||
}
|
||||
|
||||
var acl = $('form [name=acl]').val();
|
||||
var notice = typeof(noticeAcl[libType][acl]) != 'undefined' ? noticeAcl[libType][acl] : '';
|
||||
$('#noticeAcl').html(notice);
|
||||
$('#whiteListBox').addClass('hidden');
|
||||
}
|
||||
|
||||
function changeDoclibAcl(libType)
|
||||
{
|
||||
if(libType == 'product' || libType == 'execution')
|
||||
if(libType == 'api')
|
||||
{
|
||||
$('form input[name="acl"]').closest('td').find('span:first').html($('#aclBoxA td').html());
|
||||
$('.apilib').removeClass('hidden');
|
||||
$('#mainContent table th').css('width', '100px');
|
||||
$('#aclBox').find('td').html($('#aclAPIBox td').html());
|
||||
|
||||
$('.executionBox').addClass('hidden');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('form input[name="acl"]').closest('td').find('span:first').html($('#aclBoxB td').html());
|
||||
$('.apilib').addClass('hidden');
|
||||
$('#mainContent table th').css('width', '70px');
|
||||
$('#aclBox').find('td').html($('#aclOtherBox td').html());
|
||||
|
||||
$('.executionBox').removeClass('hidden');
|
||||
}
|
||||
$('#whiteListBox').addClass('hidden');
|
||||
}
|
||||
|
||||
+27
-33
@@ -1,5 +1,31 @@
|
||||
$(function()
|
||||
{
|
||||
/* Set editor content height. */
|
||||
var contentHeight = $(document).height() - 92;
|
||||
setTimeout(function(){$('.ke-edit-iframe, .ke-edit, .ke-edit-textarea').height(contentHeight);}, 100);
|
||||
setTimeout(function(){$('.CodeMirror').height($(document).height() - 112);}, 100);
|
||||
$('iframe.ke-edit-iframe').contents().find('.article-content').css('padding', '20px 20px 0 20px');
|
||||
|
||||
setSavePath();
|
||||
$('#modalBasicInfo').on('hide.zui.modal', function(){setSavePath();});
|
||||
|
||||
$('#saveDraft').click(function()
|
||||
{
|
||||
if($('#editorTitle').val() == '')
|
||||
{
|
||||
bootbox.alert(titleNotEmpty);
|
||||
return false;
|
||||
}
|
||||
|
||||
$('#status').val('draft');
|
||||
submit(this);
|
||||
});
|
||||
$('#saveRelease').click(function()
|
||||
{
|
||||
$('#status').val('normal');
|
||||
submit(this);
|
||||
});
|
||||
|
||||
setTimeout(function()
|
||||
{
|
||||
if(needUpdateContent && confirm(confirmUpdateContent))
|
||||
@@ -16,21 +42,6 @@ $(function()
|
||||
$(this).addClass('disabled');
|
||||
$('form').submit();
|
||||
})
|
||||
toggleAcl($('input[name="acl"]:checked').val(), 'doc');
|
||||
$('input[name="type"]').change(function()
|
||||
{
|
||||
var type = $(this).val();
|
||||
if(type == 'text')
|
||||
{
|
||||
$('#contentBox').removeClass('hidden');
|
||||
$('#urlBox').addClass('hidden');
|
||||
}
|
||||
else if(type == 'url')
|
||||
{
|
||||
$('#contentBox').addClass('hidden');
|
||||
$('#urlBox').removeClass('hidden');
|
||||
}
|
||||
});
|
||||
|
||||
$('#subNavbar li[data-id="doc"]').addClass('active');
|
||||
|
||||
@@ -149,25 +160,8 @@ function loadWhitelist(libID)
|
||||
|
||||
$.post(userLink, function(users)
|
||||
{
|
||||
if(users == 'private')
|
||||
if(users != 'private')
|
||||
{
|
||||
$('#aclopen').parent('.radio-inline').addClass('hidden');
|
||||
$('#aclcustom').parent('.radio-inline').addClass('hidden');
|
||||
$('#whiteListBox').addClass('hidden');
|
||||
$('#aclprivate').prop('checked', true);
|
||||
}
|
||||
else if(users == 'project')
|
||||
{
|
||||
$('#aclprivate').parent('.radio-inline').addClass('hidden');
|
||||
$('#aclcustom').parent('.radio-inline').addClass('hidden');
|
||||
$('#whiteListBox').addClass('hidden');
|
||||
$('#aclopen').prop('checked', true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#aclopen').parent('.radio-inline').removeClass('hidden');
|
||||
$('#aclcustom').parent('.radio-inline').removeClass('hidden');
|
||||
|
||||
$('#users').replaceWith(users);
|
||||
$('#users').next('.picker').remove();
|
||||
$('#users').picker();
|
||||
|
||||
@@ -14,15 +14,20 @@ $(function()
|
||||
*/
|
||||
function redirectParentWindow(objectType, libID, docType)
|
||||
{
|
||||
config.onlybody = 'no';
|
||||
if(objectType == 'api')
|
||||
{
|
||||
var link = createLink('api', 'create', 'libID=' + libID) + '#app=doc';
|
||||
}
|
||||
else
|
||||
{
|
||||
var link = createLink('doc', 'create', 'objectType=' + objectType + '&objectID=0&libID=' + libID + '&moduleID=0&docType=' + docType + '&fromGlobal=true') + '#app=doc';
|
||||
parent.$.closeModal(function()
|
||||
{
|
||||
new parent.$.zui.ModalTrigger({
|
||||
iframe : createLink('api', 'create', 'libID=' + libID),
|
||||
width: '85%'
|
||||
}).show();
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
config.onlybody = 'no';
|
||||
var link = createLink('doc', 'create', 'objectType=' + objectType + '&objectID=0&libID=' + libID + '&moduleID=0&docType=' + docType) + '#app=doc';
|
||||
window.parent.$.apps.open(link);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
$(function()
|
||||
{
|
||||
if(tab != 'doc') return;
|
||||
$('#leftBar .searchBox #title').keypress(function(e)
|
||||
{
|
||||
if(e.which == 13)
|
||||
{
|
||||
$(this).closest('form').attr('action', searchLink.replace('%s', $(this).val()));
|
||||
}
|
||||
});
|
||||
|
||||
$('#navbar .nav li').removeClass('active');
|
||||
$("#navbar .nav li[data-id=" + type + ']').addClass('active');
|
||||
});
|
||||
$('#leftBar .searchBox #submit').click(function(e)
|
||||
{
|
||||
var searchTitle = $(this).prev('#title').val();
|
||||
$(this).closest('form').attr('action', searchLink.replace('%s', searchTitle));
|
||||
});
|
||||
})
|
||||
|
||||
@@ -1,98 +1,11 @@
|
||||
$(function()
|
||||
{
|
||||
if(!moduleTree || moduleTree.length == 0)
|
||||
$('#docListForm .table .c-name').each(function()
|
||||
{
|
||||
var contentHeight = $('.no-content').parent().innerHeight();
|
||||
var titleHeight = $('.cell div:nth-child(1)').innerHeight();
|
||||
|
||||
var height = $(document).height() - $('#header').height() - parent.$('#appsBar').height() - (2 * parseInt($('#main').css('padding-top')));
|
||||
$('.main-content .cell').height(height);
|
||||
$('.no-content').parent().css('padding-top', (height - contentHeight)/2 - titleHeight + 'px');
|
||||
}
|
||||
|
||||
$('#main .main-content li.has-list').addClass('open in');
|
||||
|
||||
$('.menu-actions > a').click(function()
|
||||
{
|
||||
$(this).parent().hasClass('open') ? $(this).css('background', 'none') : $(this).css('background', '#f1f1f1');
|
||||
})
|
||||
|
||||
$('.menu-actions > a').blur(function() {$(this).css('background', 'none');})
|
||||
|
||||
/* Make modules tree sortable. */
|
||||
$('#modules').sortable(
|
||||
{
|
||||
trigger: '.module-name>a.sort-module, .tree-actions>.sortModule>.icon-move, a.sortDoc, .tree-actions>.sortDoc>.icon-move',
|
||||
dropToClass: 'sort-to',
|
||||
stopPropagation: true,
|
||||
nested: true,
|
||||
selector: 'li',
|
||||
dragCssClass: 'drop-here',
|
||||
canMoveHere: function($ele, $target)
|
||||
{
|
||||
var maxTop = $('.side-col > .cell > ul').height() - $ele.height();
|
||||
if(parseFloat($('.drag-shadow').css('top')) < 0) $('.drag-shadow').css('top', '0');
|
||||
if(parseFloat($('.drag-shadow').css('left')) != 0) $('.drag-shadow').css('left', '0');
|
||||
if(parseFloat($('.drag-shadow').css('top')) > maxTop) $('.drag-shadow').css('top', maxTop + 'px');
|
||||
return true;
|
||||
},
|
||||
targetSelector: function($ele, $root)
|
||||
{
|
||||
var $ul = $ele.closest('ul');
|
||||
setTimeout(function()
|
||||
{
|
||||
if($('#modules').hasClass('sortable-sorting')) $ul.addClass('is-sorting');
|
||||
}, 100);
|
||||
|
||||
if($ele.hasClass('sortDoc'))
|
||||
{
|
||||
return $ul.children('li.sortDoc');
|
||||
}
|
||||
else
|
||||
{
|
||||
return $ul.children('li.catalog');
|
||||
}
|
||||
},
|
||||
always: function()
|
||||
{
|
||||
$('#modules,#modules .is-sorting').removeClass('is-sorting');
|
||||
},
|
||||
finish: function(e)
|
||||
{
|
||||
if(!e.changed) return;
|
||||
|
||||
var orders = {};
|
||||
var link = '';
|
||||
var elementClass = e.list.context.className;
|
||||
if(elementClass.indexOf('sortDoc') >= 0)
|
||||
{
|
||||
$('#modules').find('li.sortDoc').each(function()
|
||||
{
|
||||
var $li = $(this);
|
||||
|
||||
var item = $li.data();
|
||||
orders['orders[' + item.id + ']'] = $li.attr('data-order') || item.order;
|
||||
});
|
||||
|
||||
link = createLink('doc', 'updateOrder');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#modules').find('li.can-sort').each(function()
|
||||
{
|
||||
var $li = $(this);
|
||||
|
||||
var item = $li.data();
|
||||
'<?php echo $type;?>' == 'book' ? orders['sort[' + item.id + ']'] = $li.attr('data-order') || item.order : orders['orders[' + item.id + ']'] = $li.attr('data-order') || item.order;
|
||||
});
|
||||
|
||||
link = createLink('tree', 'updateOrder');
|
||||
}
|
||||
|
||||
$.post(link, orders, function(data){}).error(function()
|
||||
{
|
||||
bootbox.alert(lang.timeout);
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
var $this = $(this);
|
||||
if($this.find('.draft').length > 0)
|
||||
{
|
||||
$this.find('.doc-title').css('max-width', parseInt($this.width()) - parseInt($this.find('.draft').width()) - parseInt($this.find('.ajaxCollect').width()) - parseInt($this.find('.file-icon').width()) - 24);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
+73
-27
@@ -19,7 +19,14 @@ $lang->doclib->all = 'Alle Bibliotheken';
|
||||
$lang->doclib->select = 'Auswahl';
|
||||
$lang->doclib->execution = $lang->executionCommon . ' Bibliothek';
|
||||
$lang->doclib->product = $lang->productCommon . ' Bibliothek';
|
||||
$lang->doclib->apiLibName = 'Api Library Name';
|
||||
$lang->doclib->apiLibName = 'Library Name';
|
||||
$lang->doclib->privateACL = "Private <span class='acl-tip'>(Only creators and whitelisted users with %s permissions can access it)</span>";
|
||||
|
||||
$lang->doclib->tip = new stdclass();
|
||||
$lang->doclib->tip->selectExecution = "When execution is empty, the library created is the {$lang->projectCommon} library";
|
||||
|
||||
$lang->doclib->type['wiki'] = 'WIKI';
|
||||
$lang->doclib->type['api'] = 'API';
|
||||
|
||||
$lang->doclib->aclListA = array();
|
||||
$lang->doclib->aclListA['default'] = 'Default';
|
||||
@@ -29,6 +36,11 @@ $lang->doclib->aclListB['open'] = 'Public';
|
||||
$lang->doclib->aclListB['custom'] = 'Custom';
|
||||
$lang->doclib->aclListB['private'] = 'Private';
|
||||
|
||||
$lang->doclib->aclList = array();
|
||||
$lang->doclib->aclList['open'] = "Public <span class='acl-tip'>(Users who can access doccan access it)</span>";
|
||||
$lang->doclib->aclList['default'] = "Default <span class='acl-tip'>(Users who can access the selected %s or users in the whiltelist can access it)</span>";
|
||||
$lang->doclib->aclList['private'] = "Private <span class='acl-tip'>(Only the one who created it or users in the whiltelist can access it)</span>";
|
||||
|
||||
$lang->doclib->create['product'] = 'Create ' . $lang->productCommon . ' Library';
|
||||
$lang->doclib->create['execution'] = 'Create ' . $lang->executionCommon . ' Library';
|
||||
$lang->doclib->create['custom'] = 'Create Custom Library';
|
||||
@@ -43,6 +55,11 @@ $lang->doclib->tabList['custom'] = 'Custom';
|
||||
|
||||
$lang->doclib->nameList['custom'] = 'Custom Name';
|
||||
|
||||
$lang->doclib->apiNameUnique = array();
|
||||
$lang->doclib->apiNameUnique['product'] = 'In the api library of the same ' . $lang->productCommon . ', ';
|
||||
$lang->doclib->apiNameUnique['project'] = 'In the api library of the same ' . $lang->projectCommon . ', ';
|
||||
$lang->doclib->apiNameUnique['nolink'] = 'In the no linked api library, ';
|
||||
|
||||
/* Fields. */
|
||||
$lang->doc->common = 'Dok';
|
||||
$lang->doc->id = 'ID';
|
||||
@@ -51,6 +68,7 @@ $lang->doc->project = $lang->projectCommon;
|
||||
$lang->doc->execution = $lang->execution->common;
|
||||
$lang->doc->lib = 'Bibliothek';
|
||||
$lang->doc->module = 'Modul';
|
||||
$lang->doc->libAndModule = 'Bibliothek & Modul';
|
||||
$lang->doc->object = 'Object';
|
||||
$lang->doc->title = 'Titel';
|
||||
$lang->doc->digest = 'Zusammenfassung';
|
||||
@@ -58,13 +76,14 @@ $lang->doc->comment = 'Bemerkung';
|
||||
$lang->doc->type = 'Typ';
|
||||
$lang->doc->content = 'Text';
|
||||
$lang->doc->keywords = 'Tags';
|
||||
$lang->doc->status = 'Status';
|
||||
$lang->doc->url = 'URL';
|
||||
$lang->doc->files = 'Datei';
|
||||
$lang->doc->addedBy = 'Angelegt von';
|
||||
$lang->doc->addedByAB = 'Added';
|
||||
$lang->doc->addedDate = 'Angelegt am';
|
||||
$lang->doc->addedByAB = 'CreatedBy';
|
||||
$lang->doc->addedDate = 'CreatedDate';
|
||||
$lang->doc->editedBy = 'Bearbeitet von';
|
||||
$lang->doc->editedDate = 'Bearbeitet am';
|
||||
$lang->doc->editedDate = 'UpdatedDate';
|
||||
$lang->doc->lastEditedBy = 'Last Editor';
|
||||
$lang->doc->version = 'Version';
|
||||
$lang->doc->basicInfo = 'Basis Info';
|
||||
@@ -97,6 +116,9 @@ $lang->doc->order = 'Order';
|
||||
$lang->doc->doc = 'Document';
|
||||
$lang->doc->updateOrder = 'Update Order';
|
||||
$lang->doc->nextStep = 'Next';
|
||||
$lang->doc->closed = 'Closed';
|
||||
$lang->doc->saveDraft = 'Save Draft';
|
||||
$lang->doc->defaultSave = 'Default Save: ';
|
||||
|
||||
$lang->doc->moduleDoc = 'Nach Modulen';
|
||||
$lang->doc->searchDoc = 'Suche';
|
||||
@@ -136,27 +158,30 @@ $lang->doc->collect = 'Favorit hinzufügen';
|
||||
$lang->doc->cancelCollection = 'Favorit entfernen';
|
||||
$lang->doc->deleteFile = 'Delete File';
|
||||
$lang->doc->menuTitle = 'Menu';
|
||||
$lang->doc->api = 'API';
|
||||
|
||||
$lang->doc->collectAction = 'Add Favorite';
|
||||
|
||||
$lang->doc->libName = 'Name';
|
||||
$lang->doc->libType = 'Kategorie';
|
||||
$lang->doc->custom = 'Eigene Dok Bibliothek';
|
||||
$lang->doc->customAB = 'Eigene Bibliothek';
|
||||
$lang->doc->createLib = 'Document Library';
|
||||
$lang->doc->allLibs = 'Bibliothek';
|
||||
$lang->doc->objectLibs = "{$lang->productCommon}/{$lang->executionCommon} Bibliothek Liste";
|
||||
$lang->doc->showFiles = 'Dok Bibliothek';
|
||||
$lang->doc->editLib = 'Edit Document Library';
|
||||
$lang->doc->deleteLib = 'Bibliothek löschen';
|
||||
$lang->doc->fixedMenu = 'Im Menü fixieren';
|
||||
$lang->doc->removeMenu = 'Vom Menü entfernen';
|
||||
$lang->doc->search = 'Suche';
|
||||
$lang->doc->allCollections = 'All Collections';
|
||||
$lang->doc->keywordsTips = 'Please use commas to separate multiple keywords.';
|
||||
$lang->doc->sortLibs = 'Sort Libs';
|
||||
$lang->doc->titlePlaceholder = 'Please enter the title';
|
||||
$lang->doc->confirm = 'Confirm';
|
||||
$lang->doc->libName = 'Name';
|
||||
$lang->doc->libType = 'Kategorie';
|
||||
$lang->doc->custom = 'Eigene Dok Bibliothek';
|
||||
$lang->doc->customAB = 'Eigene Bibliothek';
|
||||
$lang->doc->createLib = 'Create Library';
|
||||
$lang->doc->allLibs = 'Bibliothek';
|
||||
$lang->doc->objectLibs = "{$lang->productCommon}/{$lang->executionCommon} Bibliothek Liste";
|
||||
$lang->doc->showFiles = 'Dok Bibliothek';
|
||||
$lang->doc->editLib = 'Edit Document Library';
|
||||
$lang->doc->deleteLib = 'Bibliothek löschen';
|
||||
$lang->doc->fixedMenu = 'Im Menü fixieren';
|
||||
$lang->doc->removeMenu = 'Vom Menü entfernen';
|
||||
$lang->doc->search = 'Suche';
|
||||
$lang->doc->allCollections = 'All Collections';
|
||||
$lang->doc->keywordsTips = 'Please use commas to separate multiple keywords.';
|
||||
$lang->doc->sortLibs = 'Sort Libs';
|
||||
$lang->doc->titlePlaceholder = 'Please enter the title';
|
||||
$lang->doc->confirm = 'Confirm';
|
||||
$lang->doc->docSummary = 'Total: <strong>%s</strong>.';
|
||||
$lang->doc->docCheckedSummary = 'Seleted: <strong>%total%</strong>.';
|
||||
|
||||
global $config;
|
||||
/* Query condition list. */
|
||||
@@ -179,9 +204,12 @@ $lang->doc->libIconList['custom'] = 'icon-folder-o';
|
||||
$lang->doc->systemLibs['product'] = $lang->productCommon . 'Dok Bibliothek';
|
||||
$lang->doc->systemLibs['execution'] = $lang->executionCommon . 'Dok Bibliothek';
|
||||
|
||||
$lang->doc->aclList['open'] = 'Öffentlich';
|
||||
$lang->doc->aclList['custom'] = 'Eigene';
|
||||
$lang->doc->aclList['private'] = 'Privat';
|
||||
$lang->doc->statusList[''] = "";
|
||||
$lang->doc->statusList['normal'] = "Released";
|
||||
$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->typeList['html'] = 'Html';
|
||||
$lang->doc->typeList['markdown'] = 'Markdown';
|
||||
@@ -190,6 +218,12 @@ $lang->doc->typeList['word'] = 'Word';
|
||||
$lang->doc->typeList['ppt'] = 'PPT';
|
||||
$lang->doc->typeList['excel'] = 'Excel';
|
||||
|
||||
$lang->doc->createList['html'] = 'Create Document';
|
||||
$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';
|
||||
|
||||
@@ -237,7 +271,7 @@ $lang->doc->accessDenied = "Zugriff verweigert!";
|
||||
$lang->doc->versionNotFount = 'Existiert nicht in diesem Build.';
|
||||
$lang->doc->noDoc = 'Keine Dokumente. ';
|
||||
$lang->doc->noArticle = 'No articles.';
|
||||
$lang->doc->noLib = 'No libraries. ';
|
||||
$lang->doc->noLib = 'No libraries.';
|
||||
$lang->doc->noBook = 'The WIKI library has not created a manual, please create a new one :)';
|
||||
$lang->doc->cannotCreateOffice = 'Sorry, %s file can only be created in ZenTao Biz Series or above. Contact Philip@easysoft.ltd to know more about ZenTao Biz Series and ZenTao Max Series.';
|
||||
$lang->doc->notSetOffice = "<p>To create a %s document, you need to configure <a href='%s' target='_parent'>office convert</a>.<p>";
|
||||
@@ -271,8 +305,20 @@ $lang->doc->noticeAcl['doc']['custom'] = 'Users in the whiltelist can access it
|
||||
$lang->doc->noticeAcl['doc']['private'] = 'Only the one who created it can access it.';
|
||||
|
||||
$lang->doc->placeholder = new stdclass();
|
||||
$lang->doc->placeholder->url = 'Url';
|
||||
$lang->doc->placeholder->url = 'URL';
|
||||
$lang->doc->placeholder->execution = 'When the execution is empty, the document is created in the project library';
|
||||
|
||||
$lang->doc->summary = "Total files on this page: <strong>%s</strong> , total size: <strong>%s</strong>, <strong>%s</strong>.";
|
||||
$lang->doc->ge = ':';
|
||||
$lang->doc->point = '.';
|
||||
|
||||
$lang->doc->libDropdown['editLib'] = 'Edit Library';
|
||||
$lang->doc->libDropdown['deleteLib'] = 'Delete Library';
|
||||
$lang->doc->libDropdown['addModule'] = 'Add Directory';
|
||||
$lang->doc->libDropdown['addSameModule'] = 'Add Same Directory';
|
||||
$lang->doc->libDropdown['addSubModule'] = 'Add Sub Directory';
|
||||
$lang->doc->libDropdown['editModule'] = 'Edit Directory';
|
||||
$lang->doc->libDropdown['delModule'] = 'Delete Directory';
|
||||
|
||||
$lang->doc->featureBar['tableContents']['all'] = 'All';
|
||||
$lang->doc->featureBar['tableContents']['draft'] = 'Draft';
|
||||
|
||||
+73
-27
@@ -19,7 +19,14 @@ $lang->doclib->all = 'All Libraries';
|
||||
$lang->doclib->select = 'Select';
|
||||
$lang->doclib->execution = $lang->executionCommon . ' Library';
|
||||
$lang->doclib->product = $lang->productCommon . ' Library';
|
||||
$lang->doclib->apiLibName = 'Api Library Name';
|
||||
$lang->doclib->apiLibName = 'Library Name';
|
||||
$lang->doclib->privateACL = "Private <span class='acl-tip'>(Only creators and whitelisted users with %s permissions can access it)</span>";
|
||||
|
||||
$lang->doclib->tip = new stdclass();
|
||||
$lang->doclib->tip->selectExecution = "When execution is empty, the library created is the {$lang->projectCommon} library";
|
||||
|
||||
$lang->doclib->type['wiki'] = 'WIKI';
|
||||
$lang->doclib->type['api'] = 'API';
|
||||
|
||||
$lang->doclib->aclListA = array();
|
||||
$lang->doclib->aclListA['default'] = 'Default';
|
||||
@@ -29,6 +36,11 @@ $lang->doclib->aclListB['open'] = 'Public';
|
||||
$lang->doclib->aclListB['custom'] = 'Custom';
|
||||
$lang->doclib->aclListB['private'] = 'Private';
|
||||
|
||||
$lang->doclib->aclList = array();
|
||||
$lang->doclib->aclList['open'] = "Public <span class='acl-tip'>(Users who can access doccan access it)</span>";
|
||||
$lang->doclib->aclList['default'] = "Default <span class='acl-tip'>(Users who can access the selected %s or users in the whiltelist can access it)</span>";
|
||||
$lang->doclib->aclList['private'] = "Private <span class='acl-tip'> (Only the one who created it or users in the whiltelist can access it)</span>";
|
||||
|
||||
$lang->doclib->create['product'] = 'Create ' . $lang->productCommon . ' Library';
|
||||
$lang->doclib->create['execution'] = 'Create ' . $lang->executionCommon . ' Library';
|
||||
$lang->doclib->create['custom'] = 'Create Custom Library';
|
||||
@@ -43,6 +55,11 @@ $lang->doclib->tabList['custom'] = 'Custom';
|
||||
|
||||
$lang->doclib->nameList['custom'] = 'Custom Name';
|
||||
|
||||
$lang->doclib->apiNameUnique = array();
|
||||
$lang->doclib->apiNameUnique['product'] = 'In the api library of the same ' . $lang->productCommon . ', ';
|
||||
$lang->doclib->apiNameUnique['project'] = 'In the api library of the same ' . $lang->projectCommon . ', ';
|
||||
$lang->doclib->apiNameUnique['nolink'] = 'In the no linked api library, ';
|
||||
|
||||
/* Fields. */
|
||||
$lang->doc->common = 'Document';
|
||||
$lang->doc->id = 'ID';
|
||||
@@ -51,6 +68,7 @@ $lang->doc->project = $lang->projectCommon;
|
||||
$lang->doc->execution = $lang->execution->common;
|
||||
$lang->doc->lib = 'Library';
|
||||
$lang->doc->module = 'Catalog';
|
||||
$lang->doc->libAndModule = 'Library & Catalog';
|
||||
$lang->doc->object = 'Object';
|
||||
$lang->doc->title = 'Name';
|
||||
$lang->doc->digest = 'Summary';
|
||||
@@ -58,13 +76,14 @@ $lang->doc->comment = 'Comment';
|
||||
$lang->doc->type = 'Type';
|
||||
$lang->doc->content = 'Text';
|
||||
$lang->doc->keywords = 'Tags';
|
||||
$lang->doc->status = 'Status';
|
||||
$lang->doc->url = 'URL';
|
||||
$lang->doc->files = 'Files';
|
||||
$lang->doc->addedBy = 'Author';
|
||||
$lang->doc->addedByAB = 'Added';
|
||||
$lang->doc->addedDate = 'Added';
|
||||
$lang->doc->addedByAB = 'CreatedBy';
|
||||
$lang->doc->addedDate = 'CreatedDate';
|
||||
$lang->doc->editedBy = 'UpdatedBy';
|
||||
$lang->doc->editedDate = 'Updated';
|
||||
$lang->doc->editedDate = 'UpdatedDate';
|
||||
$lang->doc->lastEditedBy = 'Last Editor';
|
||||
$lang->doc->version = 'Version';
|
||||
$lang->doc->basicInfo = 'Basic Information';
|
||||
@@ -97,6 +116,9 @@ $lang->doc->order = 'Order';
|
||||
$lang->doc->doc = 'Document';
|
||||
$lang->doc->updateOrder = 'Update Order';
|
||||
$lang->doc->nextStep = 'Next';
|
||||
$lang->doc->closed = 'Closed';
|
||||
$lang->doc->saveDraft = 'Save Draft';
|
||||
$lang->doc->defaultSave = 'Default Save: ';
|
||||
|
||||
$lang->doc->moduleDoc = 'By Module';
|
||||
$lang->doc->searchDoc = 'Search';
|
||||
@@ -136,27 +158,30 @@ $lang->doc->collect = 'Add Favorite';
|
||||
$lang->doc->cancelCollection = 'Remove Favorite';
|
||||
$lang->doc->deleteFile = 'Delete File';
|
||||
$lang->doc->menuTitle = 'Direcotory';
|
||||
$lang->doc->api = 'API';
|
||||
|
||||
$lang->doc->collectAction = 'Add Favorite';
|
||||
|
||||
$lang->doc->libName = 'Document Library';
|
||||
$lang->doc->libType = 'Category';
|
||||
$lang->doc->custom = 'Custom Document Library';
|
||||
$lang->doc->customAB = 'Custom Doc Lib';
|
||||
$lang->doc->createLib = 'Document Library';
|
||||
$lang->doc->allLibs = 'Library List';
|
||||
$lang->doc->objectLibs = "Document View of Library";
|
||||
$lang->doc->showFiles = 'Attachments';
|
||||
$lang->doc->editLib = 'Edit Document Library';
|
||||
$lang->doc->deleteLib = 'Delete Document Library';
|
||||
$lang->doc->fixedMenu = 'Fix to Menu';
|
||||
$lang->doc->removeMenu = 'Remove from Menu';
|
||||
$lang->doc->search = 'Search';
|
||||
$lang->doc->allCollections = 'All Collections';
|
||||
$lang->doc->keywordsTips = 'Please use commas to separate keywords.';
|
||||
$lang->doc->sortLibs = 'Sort Libs';
|
||||
$lang->doc->titlePlaceholder = 'Please enter the title';
|
||||
$lang->doc->confirm = 'Confirm';
|
||||
$lang->doc->libName = 'Document Library';
|
||||
$lang->doc->libType = 'Category';
|
||||
$lang->doc->custom = 'Custom Document Library';
|
||||
$lang->doc->customAB = 'Custom Doc Lib';
|
||||
$lang->doc->createLib = 'Create Library';
|
||||
$lang->doc->allLibs = 'Library List';
|
||||
$lang->doc->objectLibs = "Document View of Library";
|
||||
$lang->doc->showFiles = 'Attachments';
|
||||
$lang->doc->editLib = 'Edit Document Library';
|
||||
$lang->doc->deleteLib = 'Delete Document Library';
|
||||
$lang->doc->fixedMenu = 'Fix to Menu';
|
||||
$lang->doc->removeMenu = 'Remove from Menu';
|
||||
$lang->doc->search = 'Search';
|
||||
$lang->doc->allCollections = 'All Collections';
|
||||
$lang->doc->keywordsTips = 'Please use commas to separate keywords.';
|
||||
$lang->doc->sortLibs = 'Sort Libs';
|
||||
$lang->doc->titlePlaceholder = 'Please enter the title';
|
||||
$lang->doc->confirm = 'Confirm';
|
||||
$lang->doc->docSummary = 'Total: <strong>%s</strong>.';
|
||||
$lang->doc->docCheckedSummary = 'Seleted: <strong>%total%</strong>.';
|
||||
|
||||
global $config;
|
||||
/* Query condition list. */
|
||||
@@ -179,9 +204,12 @@ $lang->doc->libIconList['custom'] = 'icon-folder-o';
|
||||
$lang->doc->systemLibs['product'] = $lang->productCommon;
|
||||
$lang->doc->systemLibs['execution'] = $lang->executionCommon;
|
||||
|
||||
$lang->doc->aclList['open'] = 'Public';
|
||||
$lang->doc->aclList['custom'] = 'Custom';
|
||||
$lang->doc->aclList['private'] = 'Private';
|
||||
$lang->doc->statusList[''] = "";
|
||||
$lang->doc->statusList['normal'] = "Released";
|
||||
$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->typeList['html'] = 'Html';
|
||||
$lang->doc->typeList['markdown'] = 'Markdown';
|
||||
@@ -190,6 +218,12 @@ $lang->doc->typeList['word'] = 'Word';
|
||||
$lang->doc->typeList['ppt'] = 'PPT';
|
||||
$lang->doc->typeList['excel'] = 'Excel';
|
||||
|
||||
$lang->doc->createList['html'] = 'Create Document';
|
||||
$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';
|
||||
|
||||
@@ -237,7 +271,7 @@ $lang->doc->accessDenied = "Access is denied!";
|
||||
$lang->doc->versionNotFount = 'It does not exist in this build.';
|
||||
$lang->doc->noDoc = 'No documents. ';
|
||||
$lang->doc->noArticle = 'No articles.';
|
||||
$lang->doc->noLib = 'No libraries. ';
|
||||
$lang->doc->noLib = 'No libraries.';
|
||||
$lang->doc->noBook = 'The WIKI library has not created a manual, please create a new one :)';
|
||||
$lang->doc->cannotCreateOffice = 'Sorry, %s file can only be created in ZenTao Biz Series or above. Contact Philip@easysoft.ltd to know more about ZenTao Biz Series and ZenTao Max Series.';
|
||||
$lang->doc->notSetOffice = "<p>To create a %s document, you need to configure <a href='%s'>office convert</a>.<p>";
|
||||
@@ -271,8 +305,20 @@ $lang->doc->noticeAcl['doc']['custom'] = 'Users in the whiltelist can access it
|
||||
$lang->doc->noticeAcl['doc']['private'] = 'Only the one who created it can access it.';
|
||||
|
||||
$lang->doc->placeholder = new stdclass();
|
||||
$lang->doc->placeholder->url = 'URL';
|
||||
$lang->doc->placeholder->url = 'URL';
|
||||
$lang->doc->placeholder->execution = 'When the execution is empty, the document is created in the project library';
|
||||
|
||||
$lang->doc->summary = "Total files on this page: <strong>%s</strong> , total size: <strong>%s</strong>, <strong>%s</strong>.";
|
||||
$lang->doc->ge = ':';
|
||||
$lang->doc->point = '.';
|
||||
|
||||
$lang->doc->libDropdown['editLib'] = 'Edit Library';
|
||||
$lang->doc->libDropdown['deleteLib'] = 'Delete Library';
|
||||
$lang->doc->libDropdown['addModule'] = 'Add Directory';
|
||||
$lang->doc->libDropdown['addSameModule'] = 'Add Same Directory';
|
||||
$lang->doc->libDropdown['addSubModule'] = 'Add Sub Directory';
|
||||
$lang->doc->libDropdown['editModule'] = 'Edit Directory';
|
||||
$lang->doc->libDropdown['delModule'] = 'Delete Directory';
|
||||
|
||||
$lang->doc->featureBar['tableContents']['all'] = 'All';
|
||||
$lang->doc->featureBar['tableContents']['draft'] = 'Draft';
|
||||
|
||||
+74
-27
@@ -19,7 +19,14 @@ $lang->doclib->all = 'Toutes les Libraries';
|
||||
$lang->doclib->select = 'Sélect.';
|
||||
$lang->doclib->execution = 'Bibliothèque ' . $lang->executionCommon;
|
||||
$lang->doclib->product = $lang->productCommon . ' Library';
|
||||
$lang->doclib->apiLibName = 'Api Library Name';
|
||||
$lang->doclib->apiLibName = 'Library Name';
|
||||
$lang->doclib->privateACL = "Private <span class='acl-tip'>(Only creators and whitelisted users with %s permissions can access it)</span>";
|
||||
|
||||
$lang->doclib->tip = new stdclass();
|
||||
$lang->doclib->tip->selectExecution = "When execution is empty, the library created is the {$lang->projectCommon} library";
|
||||
|
||||
$lang->doclib->type['wiki'] = 'WIKI';
|
||||
$lang->doclib->type['api'] = 'API';
|
||||
|
||||
$lang->doclib->aclListA = array();
|
||||
$lang->doclib->aclListA['default'] = 'Défaut';
|
||||
@@ -29,6 +36,11 @@ $lang->doclib->aclListB['open'] = 'Public';
|
||||
$lang->doclib->aclListB['custom'] = 'Person.';
|
||||
$lang->doclib->aclListB['private'] = 'Privée';
|
||||
|
||||
$lang->doclib->aclList = array();
|
||||
$lang->doclib->aclList['open'] = "Public <span class='acl-tip'>(Users who can access doccan access it)</span>";
|
||||
$lang->doclib->aclList['default'] = "Default <span class='acl-tip'>(Users who can access the selected %s or users in the whiltelist can access it)</span>";
|
||||
$lang->doclib->aclList['private'] = "Private <span class='acl-tip'> (Only the one who created it or users in the whiltelist can access it)</span>";
|
||||
|
||||
$lang->doclib->create['product'] = 'Créer ' . $lang->productCommon . ' Library';
|
||||
$lang->doclib->create['execution'] = 'Créer ' . 'Bibliothèque ' . $lang->executionCommon;
|
||||
$lang->doclib->create['custom'] = 'Créer Bibliothèque Personnelle';
|
||||
@@ -43,6 +55,11 @@ $lang->doclib->tabList['custom'] = 'Personnelle';
|
||||
|
||||
$lang->doclib->nameList['custom'] = 'Nom personnalisé';
|
||||
|
||||
$lang->doclib->apiNameUnique = array();
|
||||
$lang->doclib->apiNameUnique['product'] = 'In the api library of the same ' . $lang->productCommon . ', ';
|
||||
$lang->doclib->apiNameUnique['project'] = 'In the api library of the same ' . $lang->projectCommon . ', ';
|
||||
$lang->doclib->apiNameUnique['nolink'] = 'In the no linked api library, ';
|
||||
|
||||
/* Fields. */
|
||||
$lang->doc->common = 'Gestion Documentaire';
|
||||
$lang->doc->id = 'ID';
|
||||
@@ -51,6 +68,7 @@ $lang->doc->project = $lang->projectCommon;
|
||||
$lang->doc->execution = $lang->execution->common;
|
||||
$lang->doc->lib = 'Bibliothèque';
|
||||
$lang->doc->module = 'Catégorie';
|
||||
$lang->doc->libAndModule = 'Library & Catalog';
|
||||
$lang->doc->object = 'Object';
|
||||
$lang->doc->title = 'Nom';
|
||||
$lang->doc->digest = 'Résumé';
|
||||
@@ -58,13 +76,14 @@ $lang->doc->comment = 'Commentaire';
|
||||
$lang->doc->type = 'Type';
|
||||
$lang->doc->content = 'Texte';
|
||||
$lang->doc->keywords = 'Tags';
|
||||
$lang->doc->status = 'Status';
|
||||
$lang->doc->url = 'URL';
|
||||
$lang->doc->files = 'Fichiers';
|
||||
$lang->doc->addedBy = 'Auteur';
|
||||
$lang->doc->addedByAB = 'Added';
|
||||
$lang->doc->addedDate = 'Ajouté le';
|
||||
$lang->doc->addedByAB = 'CreatedBy';
|
||||
$lang->doc->addedDate = 'CreatedDate';
|
||||
$lang->doc->editedBy = 'Màj par';
|
||||
$lang->doc->editedDate = 'Màj le';
|
||||
$lang->doc->editedDate = 'UpdatedDate';
|
||||
$lang->doc->lastEditedBy = 'Last Editor';
|
||||
$lang->doc->version = 'Version';
|
||||
$lang->doc->basicInfo = 'Infos de Base';
|
||||
@@ -97,6 +116,9 @@ $lang->doc->order = 'Order';
|
||||
$lang->doc->doc = 'Document';
|
||||
$lang->doc->updateOrder = 'Update Order';
|
||||
$lang->doc->nextStep = 'Next';
|
||||
$lang->doc->closed = 'Closed';
|
||||
$lang->doc->saveDraft = 'Save Draft';
|
||||
$lang->doc->defaultSave = 'Default Save: ';
|
||||
|
||||
$lang->doc->moduleDoc = 'Par Module';
|
||||
$lang->doc->searchDoc = 'Rechercher';
|
||||
@@ -136,27 +158,30 @@ $lang->doc->collect = 'Ajouter aux Favoris';
|
||||
$lang->doc->cancelCollection = 'Retirer des Favoris';
|
||||
$lang->doc->deleteFile = 'Supprimer Fichier';
|
||||
$lang->doc->menuTitle = 'Menu';
|
||||
$lang->doc->api = 'API';
|
||||
|
||||
$lang->doc->collectAction = 'Add Favorite';
|
||||
|
||||
$lang->doc->libName = 'Bibliothèque de Documents';
|
||||
$lang->doc->libType = 'Catégorie';
|
||||
$lang->doc->custom = 'Personnaliser Bibliothèque de Documents';
|
||||
$lang->doc->customAB = 'Person. Bib Doc';
|
||||
$lang->doc->createLib = 'Document Library';
|
||||
$lang->doc->allLibs = 'Liste des Bibliothèque';
|
||||
$lang->doc->objectLibs = "{$lang->productCommon}/{$lang->executionCommon} Bibliothèque";
|
||||
$lang->doc->showFiles = 'Pièces Jointes';
|
||||
$lang->doc->editLib = 'Edit Document Library';
|
||||
$lang->doc->deleteLib = 'Supprimer Bibliothèque';
|
||||
$lang->doc->fixedMenu = 'Coller au Menu';
|
||||
$lang->doc->removeMenu = 'Décoller du Menu';
|
||||
$lang->doc->search = 'Rechercher';
|
||||
$lang->doc->allCollections = 'All Collections';
|
||||
$lang->doc->keywordsTips = 'Please use commas to separate multiple keywords.';
|
||||
$lang->doc->sortLibs = 'Sort Libs';
|
||||
$lang->doc->titlePlaceholder = 'Veuillez saisir le titre';
|
||||
$lang->doc->confirm = 'Confirm';
|
||||
$lang->doc->libName = 'Bibliothèque de Documents';
|
||||
$lang->doc->libType = 'Catégorie';
|
||||
$lang->doc->custom = 'Personnaliser Bibliothèque de Documents';
|
||||
$lang->doc->customAB = 'Person. Bib Doc';
|
||||
$lang->doc->createLib = 'Create Library';
|
||||
$lang->doc->allLibs = 'Liste des Bibliothèque';
|
||||
$lang->doc->objectLibs = "{$lang->productCommon}/{$lang->executionCommon} Bibliothèque";
|
||||
$lang->doc->showFiles = 'Pièces Jointes';
|
||||
$lang->doc->editLib = 'Edit Document Library';
|
||||
$lang->doc->deleteLib = 'Supprimer Bibliothèque';
|
||||
$lang->doc->fixedMenu = 'Coller au Menu';
|
||||
$lang->doc->removeMenu = 'Décoller du Menu';
|
||||
$lang->doc->search = 'Rechercher';
|
||||
$lang->doc->allCollections = 'All Collections';
|
||||
$lang->doc->keywordsTips = 'Please use commas to separate multiple keywords.';
|
||||
$lang->doc->sortLibs = 'Sort Libs';
|
||||
$lang->doc->titlePlaceholder = 'Veuillez saisir le titre';
|
||||
$lang->doc->confirm = 'Confirm';
|
||||
$lang->doc->docSummary = 'Total: <strong>%s</strong>.';
|
||||
$lang->doc->docCheckedSummary = 'Seleted: <strong>%total%</strong>.';
|
||||
|
||||
global $config;
|
||||
/* Query condition list. */
|
||||
@@ -179,9 +204,12 @@ $lang->doc->libIconList['custom'] = 'icon-folder-o';
|
||||
$lang->doc->systemLibs['product'] = $lang->productCommon;
|
||||
$lang->doc->systemLibs['execution'] = $lang->executionCommon;
|
||||
|
||||
$lang->doc->aclList['open'] = 'Public';
|
||||
$lang->doc->aclList['custom'] = 'Person.';
|
||||
$lang->doc->aclList['private'] = 'Privé';
|
||||
$lang->doc->statusList[''] = "";
|
||||
$lang->doc->statusList['normal'] = "Released";
|
||||
$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->typeList['html'] = 'Html';
|
||||
$lang->doc->typeList['markdown'] = 'Markdown';
|
||||
@@ -190,6 +218,13 @@ $lang->doc->typeList['word'] = 'Word';
|
||||
$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';
|
||||
|
||||
@@ -237,7 +272,7 @@ $lang->doc->accessDenied = "Access is denied !";
|
||||
$lang->doc->versionNotFount = "N'existe pas dans ce build.";
|
||||
$lang->doc->noDoc = 'Aucun documents. ';
|
||||
$lang->doc->noArticle = 'No articles.';
|
||||
$lang->doc->noLib = 'No libraries. ';
|
||||
$lang->doc->noLib = 'No libraries.';
|
||||
$lang->doc->noBook = 'The WIKI library has not created a manual, please create a new one :)';
|
||||
$lang->doc->cannotCreateOffice = 'Désolé, %s peut seulement être créé dans Série ZenTao Biz ou plus. Coordonnées Philip@easysoft.ltd En savoir plus sur les séries zentao biz et zentao Max.';
|
||||
$lang->doc->notSetOffice = "<p>To create a %s document, you need to configure <a href='%s' target='_parent'>office convert</a>.<p>";
|
||||
@@ -271,8 +306,20 @@ $lang->doc->noticeAcl['doc']['custom'] = 'Les utilisateurs de la Liste Blanche
|
||||
$lang->doc->noticeAcl['doc']['private'] = 'Seulement celui qui a ajouté le document peut y accéder.';
|
||||
|
||||
$lang->doc->placeholder = new stdclass();
|
||||
$lang->doc->placeholder->url = 'URL';
|
||||
$lang->doc->placeholder->url = 'URL';
|
||||
$lang->doc->placeholder->execution = 'When the execution is empty, the document is created in the project library';
|
||||
|
||||
$lang->doc->summary = "Total files on this page: <strong>%s</strong> , total size: <strong>%s</strong>, <strong>%s</strong>.";
|
||||
$lang->doc->ge = ':';
|
||||
$lang->doc->point = '.';
|
||||
|
||||
$lang->doc->libDropdown['editLib'] = 'Edit Library';
|
||||
$lang->doc->libDropdown['deleteLib'] = 'Delete Library';
|
||||
$lang->doc->libDropdown['addModule'] = 'Add Directory';
|
||||
$lang->doc->libDropdown['addSameModule'] = 'Add Same Directory';
|
||||
$lang->doc->libDropdown['addSubModule'] = 'Add Sub Directory';
|
||||
$lang->doc->libDropdown['editModule'] = 'Edit Directory';
|
||||
$lang->doc->libDropdown['delModule'] = 'Delete Directory';
|
||||
|
||||
$lang->doc->featureBar['tableContents']['all'] = 'All';
|
||||
$lang->doc->featureBar['tableContents']['draft'] = 'Draft';
|
||||
|
||||
+76
-30
@@ -10,7 +10,7 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
$lang->doclib = new stdclass();
|
||||
$lang->doclib->name = '文档库名称';
|
||||
$lang->doclib->name = '库名称';
|
||||
$lang->doclib->control = '访问控制';
|
||||
$lang->doclib->group = '分组';
|
||||
$lang->doclib->user = '用户';
|
||||
@@ -19,7 +19,14 @@ $lang->doclib->all = '所有文档库';
|
||||
$lang->doclib->select = '选择文档库';
|
||||
$lang->doclib->execution = $lang->executionCommon . '库';
|
||||
$lang->doclib->product = $lang->productCommon . '库';
|
||||
$lang->doclib->apiLibName = '接口库名称';
|
||||
$lang->doclib->apiLibName = '库名称';
|
||||
$lang->doclib->privateACL = "私有 <span class='acl-tip'>(仅创建者和有%s权限的白名单用户可访问)</span>";
|
||||
|
||||
$lang->doclib->tip = new stdclass();
|
||||
$lang->doclib->tip->selectExecution = "执行为空时,创建的库为{$lang->projectCommon}库";
|
||||
|
||||
$lang->doclib->type['wiki'] = 'WIKI文档库';
|
||||
$lang->doclib->type['api'] = '接口库';
|
||||
|
||||
$lang->doclib->aclListA = array();
|
||||
$lang->doclib->aclListA['default'] = '默认';
|
||||
@@ -29,6 +36,11 @@ $lang->doclib->aclListB['open'] = '公开';
|
||||
$lang->doclib->aclListB['custom'] = '自定义';
|
||||
$lang->doclib->aclListB['private'] = '私有';
|
||||
|
||||
$lang->doclib->aclList = array();
|
||||
$lang->doclib->aclList['open'] = "公开 <span class='acl-tip'>(有文档视图权限即可访问)</span>";
|
||||
$lang->doclib->aclList['default'] = "默认 <span class='acl-tip'>(有所选%s访问权限用户可以访问)</span>";
|
||||
$lang->doclib->aclList['private'] = "私有 <span class='acl-tip'>(仅创建者和白名单用户可访问)</span>";
|
||||
|
||||
$lang->doclib->create['product'] = '创建' . $lang->productCommon . '文档库';
|
||||
$lang->doclib->create['execution'] = '创建' . $lang->executionCommon . '文档库';
|
||||
$lang->doclib->create['custom'] = '创建自定义文档库';
|
||||
@@ -43,14 +55,20 @@ $lang->doclib->tabList['custom'] = '自定义';
|
||||
|
||||
$lang->doclib->nameList['custom'] = '自定义文档库名称';
|
||||
|
||||
$lang->doclib->apiNameUnique = array();
|
||||
$lang->doclib->apiNameUnique['product'] = '同一' . $lang->productCommon . '下的接口库中';
|
||||
$lang->doclib->apiNameUnique['project'] = '同一' . $lang->projectCommon . '下的接口库中';
|
||||
$lang->doclib->apiNameUnique['nolink'] = '无关联接口库中';
|
||||
|
||||
/* 字段列表。*/
|
||||
$lang->doc->common = '文档';
|
||||
$lang->doc->id = '文档编号';
|
||||
$lang->doc->id = 'ID';
|
||||
$lang->doc->product = '所属' . $lang->productCommon;
|
||||
$lang->doc->project = "所属{$lang->projectCommon}";
|
||||
$lang->doc->execution = '所属' . $lang->execution->common;
|
||||
$lang->doc->lib = '所属文档库';
|
||||
$lang->doc->lib = '所属库';
|
||||
$lang->doc->module = '所属目录';
|
||||
$lang->doc->libAndModule = '所属库&目录';
|
||||
$lang->doc->object = '所属对象';
|
||||
$lang->doc->title = '文档标题';
|
||||
$lang->doc->digest = '文档摘要';
|
||||
@@ -58,13 +76,14 @@ $lang->doc->comment = '文档备注';
|
||||
$lang->doc->type = '文档类型';
|
||||
$lang->doc->content = '文档正文';
|
||||
$lang->doc->keywords = '关键字';
|
||||
$lang->doc->status = '文档状态';
|
||||
$lang->doc->url = '文档URL';
|
||||
$lang->doc->files = '附件';
|
||||
$lang->doc->addedBy = '由谁添加';
|
||||
$lang->doc->addedByAB = '创建者';
|
||||
$lang->doc->addedDate = '添加时间';
|
||||
$lang->doc->editedBy = '由谁更新';
|
||||
$lang->doc->editedDate = '更新时间';
|
||||
$lang->doc->addedDate = '创建时间';
|
||||
$lang->doc->editedBy = '修改者';
|
||||
$lang->doc->editedDate = '修改日期';
|
||||
$lang->doc->lastEditedBy = '最后更新者';
|
||||
$lang->doc->version = '版本号';
|
||||
$lang->doc->basicInfo = '基本信息';
|
||||
@@ -97,6 +116,9 @@ $lang->doc->order = '排序';
|
||||
$lang->doc->doc = '文档';
|
||||
$lang->doc->updateOrder = '更新排序';
|
||||
$lang->doc->nextStep = '下一步';
|
||||
$lang->doc->closed = '已关闭';
|
||||
$lang->doc->saveDraft = '存为草稿';
|
||||
$lang->doc->defaultSave = '默认存入:';
|
||||
|
||||
$lang->doc->moduleDoc = '按模块浏览';
|
||||
$lang->doc->searchDoc = '搜索';
|
||||
@@ -136,27 +158,30 @@ $lang->doc->collect = '收藏';
|
||||
$lang->doc->cancelCollection = '取消收藏';
|
||||
$lang->doc->deleteFile = '删除附件';
|
||||
$lang->doc->menuTitle = '目录';
|
||||
$lang->doc->api = '接口';
|
||||
|
||||
$lang->doc->collectAction = '收藏文档';
|
||||
|
||||
$lang->doc->libName = '文档库名称';
|
||||
$lang->doc->libType = '文档库类型';
|
||||
$lang->doc->custom = '自定义文档库';
|
||||
$lang->doc->customAB = '自定义库';
|
||||
$lang->doc->createLib = '创建文档库';
|
||||
$lang->doc->allLibs = '文档库列表';
|
||||
$lang->doc->objectLibs = "文档库文档详情";
|
||||
$lang->doc->showFiles = '附件库';
|
||||
$lang->doc->editLib = '编辑文档库';
|
||||
$lang->doc->deleteLib = '删除文档库';
|
||||
$lang->doc->fixedMenu = '固定到菜单栏';
|
||||
$lang->doc->removeMenu = '从菜单栏移除';
|
||||
$lang->doc->search = '搜索';
|
||||
$lang->doc->allCollections = '查看全部收藏文档';
|
||||
$lang->doc->keywordsTips = '多个关键字请用逗号分隔。';
|
||||
$lang->doc->sortLibs = '文档库排序';
|
||||
$lang->doc->titlePlaceholder = '请输入标题';
|
||||
$lang->doc->confirm = '确认';
|
||||
$lang->doc->libName = '库名称';
|
||||
$lang->doc->libType = '库类型';
|
||||
$lang->doc->custom = '自定义文档库';
|
||||
$lang->doc->customAB = '自定义库';
|
||||
$lang->doc->createLib = '创建库';
|
||||
$lang->doc->allLibs = '库列表';
|
||||
$lang->doc->objectLibs = "库文档详情";
|
||||
$lang->doc->showFiles = '附件库';
|
||||
$lang->doc->editLib = '编辑库';
|
||||
$lang->doc->deleteLib = '删除库';
|
||||
$lang->doc->fixedMenu = '固定到菜单栏';
|
||||
$lang->doc->removeMenu = '从菜单栏移除';
|
||||
$lang->doc->search = '搜索';
|
||||
$lang->doc->allCollections = '查看全部收藏文档';
|
||||
$lang->doc->keywordsTips = '多个关键字请用逗号分隔。';
|
||||
$lang->doc->sortLibs = '文档库排序';
|
||||
$lang->doc->titlePlaceholder = '请输入标题';
|
||||
$lang->doc->confirm = '确认';
|
||||
$lang->doc->docSummary = '本页共 <strong>%s</strong> 个文档。';
|
||||
$lang->doc->docCheckedSummary = '共选中 <strong>%total%</strong> 个文档。';
|
||||
|
||||
global $config;
|
||||
/* 查询条件列表 */
|
||||
@@ -179,9 +204,12 @@ $lang->doc->libIconList['custom'] = 'icon-folder-o';
|
||||
$lang->doc->systemLibs['product'] = $lang->productCommon;
|
||||
$lang->doc->systemLibs['execution'] = $lang->executionCommon;
|
||||
|
||||
$lang->doc->aclList['open'] = '公开';
|
||||
$lang->doc->aclList['custom'] = '自定义';
|
||||
$lang->doc->aclList['private'] = '私有';
|
||||
$lang->doc->statusList[''] = "";
|
||||
$lang->doc->statusList['normal'] = "已发布";
|
||||
$lang->doc->statusList['draft'] = "草稿";
|
||||
|
||||
$lang->doc->aclList['open'] = "公开<span class='text-gray'>(有所属库权限即可访问)</span>";
|
||||
$lang->doc->aclList['private'] = "私有<span class='text-gray'>(仅创建者和白名单用户可访问)</span>";
|
||||
|
||||
$lang->doc->typeList['html'] = '富文本';
|
||||
$lang->doc->typeList['markdown'] = 'Markdown';
|
||||
@@ -190,6 +218,12 @@ $lang->doc->typeList['word'] = 'Word';
|
||||
$lang->doc->typeList['ppt'] = 'PPT';
|
||||
$lang->doc->typeList['excel'] = 'Excel';
|
||||
|
||||
$lang->doc->createList['html'] = '创建文档';
|
||||
$lang->doc->createList['template'] = '由模板创建';
|
||||
$lang->doc->createList['word'] = 'Word';
|
||||
$lang->doc->createList['ppt'] = 'PPT';
|
||||
$lang->doc->createList['excel'] = 'Excel';
|
||||
|
||||
$lang->doc->types['text'] = '文档';
|
||||
$lang->doc->types['url'] = '链接';
|
||||
|
||||
@@ -237,7 +271,7 @@ $lang->doc->accessDenied = "您没有权限访问!";
|
||||
$lang->doc->versionNotFount = '该版本文档不存在';
|
||||
$lang->doc->noDoc = '暂时没有文档。';
|
||||
$lang->doc->noArticle = '暂时没有文章。';
|
||||
$lang->doc->noLib = '暂时没有文档库。';
|
||||
$lang->doc->noLib = '暂时没有库。';
|
||||
$lang->doc->noBook = 'WIKI库还未创建手册,请新建 :)';
|
||||
$lang->doc->cannotCreateOffice = '<p>对不起,企业版才能创建%s文档。<p><p>试用企业版,请联系我们:4006-8899-23 0532-86893032。</p>';
|
||||
$lang->doc->notSetOffice = "创建%s文档,需要配置<a href='%s'>Office转换设置</a>。";
|
||||
@@ -271,8 +305,20 @@ $lang->doc->noticeAcl['doc']['custom'] = '白名单的用户可以访问。';
|
||||
$lang->doc->noticeAcl['doc']['private'] = '只有创建者自己可以访问。';
|
||||
|
||||
$lang->doc->placeholder = new stdclass();
|
||||
$lang->doc->placeholder->url = '相应的链接地址';
|
||||
$lang->doc->placeholder->url = '相应的链接地址';
|
||||
$lang->doc->placeholder->execution = '执行为空时,创建文件在项目库下';
|
||||
|
||||
$lang->doc->summary = "本页共 <strong>%s</strong> 个附件,共计 <strong>%s</strong>,其中<strong>%s</strong>。";
|
||||
$lang->doc->ge = '个';
|
||||
$lang->doc->point = '、';
|
||||
|
||||
$lang->doc->libDropdown['editLib'] = '编辑库';
|
||||
$lang->doc->libDropdown['deleteLib'] = '删除库';
|
||||
$lang->doc->libDropdown['addModule'] = '添加目录';
|
||||
$lang->doc->libDropdown['addSameModule'] = '添加同级目录';
|
||||
$lang->doc->libDropdown['addSubModule'] = '添加子目录';
|
||||
$lang->doc->libDropdown['editModule'] = '编辑目录';
|
||||
$lang->doc->libDropdown['delModule'] = '删除目录';
|
||||
|
||||
$lang->doc->featureBar['tableContents']['all'] = '全部';
|
||||
$lang->doc->featureBar['tableContents']['draft'] = '草稿';
|
||||
|
||||
+455
-430
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,126 @@
|
||||
<style>
|
||||
#tabContent {margin-top: 5px; max-width: 220px}
|
||||
.objectTree ul {list-style: none; margin: 0}
|
||||
.objectTree .objects>ul>li>div {display: flex; flex-flow: row nowrap; justify-content: flex-start; align-items: center;}
|
||||
.objectTree li>a, div.hide-in-search>a {display: block; padding: 2px 10px 2px 5px; overflow: hidden; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; border-radius: 4px;}
|
||||
.objectTree .tree li>.list-toggle {line-height: 24px;}
|
||||
.objectTree .tree li.has-list.open:before {content: unset;}
|
||||
|
||||
#swapper li>div.hide-in-search>a:focus, #swapper li>div.hide-in-search>a:hover {color: #838a9d; cursor: default;}
|
||||
#swapper li > a {margin-top: 4px; margin-bottom: 4px;}
|
||||
#swapper li {padding-top: 0; padding-bottom: 0;}
|
||||
#swapper .tree li>.list-toggle {top: -1px;}
|
||||
|
||||
#closed {width: 90px; height: 25px; line-height: 25px; background-color: #ddd; color: #3c495c; text-align: center; margin-left: 15px; border-radius: 2px;}
|
||||
#gray-line {width: 230px;height: 1px; margin-left: 10px; margin-bottom:2px; background-color: #ddd;}
|
||||
#dropMenu.has-search-text .hide-in-search {display: flex;}
|
||||
#swapper li>.selected {color: #0c64eb!important; background: #e9f2fb!important;}
|
||||
</style>
|
||||
<?php
|
||||
$normalObjectsHtml = '<ul class="tree noProgram">';
|
||||
$closedObjectsHtml = '<ul class="tree noProgram">';
|
||||
$link = $this->createLink($module, $method, "type=$objectType&objectID=%s");
|
||||
foreach($normalObjects as $normalObjectID => $normalObjectName)
|
||||
{
|
||||
$selected = $normalObjectID == $objectID ? 'selected' : '';
|
||||
$normalObjectsHtml .= '<li>' . html::a(sprintf($link, $normalObjectID), $normalObjectName, '', "class='$selected clickable' title='{$normalObjectName}' data-key='" . zget($objectsPinYin, $normalObjectName, '') . "'") . '</li>';
|
||||
}
|
||||
|
||||
foreach($closedObjects as $closedObjectID => $closedObjectName)
|
||||
{
|
||||
$selected = $closedObjectID == $objectID ? 'selected' : '';
|
||||
$closedObjectsHtml .= '<li>' . html::a(sprintf($link, $closedObjectID), $closedObjectName, '', "class='$selected clickable' title='{$closedObjectName}' data-key='" . zget($objectsPinYin, $closedObjectName, '') . "'") . '</li>';
|
||||
}
|
||||
|
||||
$normalObjectsHtml .= '</ul>';
|
||||
$closedObjectsHtml .= '</ul>';
|
||||
?>
|
||||
|
||||
<div class="table-row">
|
||||
<div class="table-col col-left">
|
||||
<div class='list-group'>
|
||||
<div class="tab-content objectTree" id="tabContent">
|
||||
<div class="tab-pane objects active">
|
||||
<?php echo $normalObjectsHtml;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-footer">
|
||||
<a class='pull-right toggle-right-col not-list-item'><?php echo $lang->doc->closed?><i class='icon icon-angle-right'></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="gray-line" hidden></div>
|
||||
<div id="closed" hidden><?php echo $lang->doc->closed?></div>
|
||||
<div class="table-col col-right objectTree">
|
||||
<div class='list-group objects'><?php echo $closedObjectsHtml;?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('#swapper [data-ride="tree"]').tree('expand');
|
||||
|
||||
<?php if(isset($closedObjects[$objectID])):?>
|
||||
$('.col-footer .toggle-right-col').click(function(){ scrollToSelected(); })
|
||||
<?php else:?>
|
||||
scrollToSelected();
|
||||
<?php endif;?>
|
||||
|
||||
$('.nav-tabs li span').hide();
|
||||
$('.nav-tabs li.active').find('span').show();
|
||||
|
||||
$('.nav-tabs>li a').click(function()
|
||||
{
|
||||
if($('#swapper input[type="search"]').val() == '')
|
||||
{
|
||||
$(this).siblings().show();
|
||||
$(this).parent().siblings('li').find('span').hide();
|
||||
}
|
||||
})
|
||||
|
||||
$('#swapper #dropMenu .search-box').on('onSearchChange', function(event, value)
|
||||
{
|
||||
if(value != '')
|
||||
{
|
||||
$('div.hide-in-search').siblings('i').addClass('hide-in-search');
|
||||
$('.nav-tabs li span').hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
$('div.hide-in-search').siblings('i').removeClass('hide-in-search');
|
||||
$('li.has-list div.hide-in-search').removeClass('hidden');
|
||||
$('.nav-tabs li.active').find('span').show();
|
||||
}
|
||||
|
||||
if($('.form-control.search-input').val().length > 0)
|
||||
{
|
||||
$('#closed').attr("hidden", false);
|
||||
$('#gray-line').attr("hidden", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#closed').attr("hidden", true);
|
||||
$('#gray-line').attr("hidden", true);
|
||||
}
|
||||
});
|
||||
|
||||
$('#swapper #dropMenu').on('onSearchComplete', function()
|
||||
{
|
||||
var listItem = $(this).find('.has-list');
|
||||
listItem.each(function()
|
||||
{
|
||||
$(this).css('display','')
|
||||
var $hidden = $(this).find('.hidden');
|
||||
var $item = $(this).find('.search-list-item');
|
||||
if($hidden.length == $item.length) $(this).css('display','none');
|
||||
});
|
||||
|
||||
if($('.list-group.objects').height() == 0)
|
||||
{
|
||||
$('#closed').attr("hidden", true);
|
||||
$('#gray-line').attr("hidden", true);
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
@@ -47,7 +47,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($docs as $doc):?>
|
||||
<?php $star = strpos($doc->collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
|
||||
<?php $star = strpos($doc->collector, ',' . $this->app->user->account . ',') !== false ? 'star' : 'star-empty';?>
|
||||
<?php $collectTitle = strpos($doc->collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
|
||||
<tr>
|
||||
<?php if($browseType !== 'bySearch'):?>
|
||||
@@ -77,12 +77,12 @@
|
||||
<?php endif;?>
|
||||
<td class="c-num"><?php echo $doc->fileSize ? $doc->fileSize : '-';?></td>
|
||||
<td class="c-user"><?php echo zget($users, $doc->addedBy);?></td>
|
||||
<td class="c-datetime"><?php echo formatTime($doc->addedDate, 'y-m-d');?></td>
|
||||
<td class="c-datetime"><?php echo formatTime($doc->editedDate, 'y-m-d');?></td>
|
||||
<td class="c-datetime"><?php echo formatTime($doc->addedDate, 'Y-m-d');?></td>
|
||||
<td class="c-datetime"><?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'><i class='icon <?php echo $star;?>'></i></a>
|
||||
<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;?>
|
||||
<?php common::printLink('doc', 'edit', "docID=$doc->id&comment=false", "<i class='icon icon-edit'></i>", '', "title='{$lang->edit}' class='btn btn-link'", true, false)?>
|
||||
<?php common::printLink('doc', 'delete', "docID=$doc->id&confirm=no", "<i class='icon icon-trash'></i>", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?>
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
}
|
||||
?>
|
||||
<?php if(common::hasPriv('doc', 'collect')):?>
|
||||
<?php $star = strpos($doc->collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
|
||||
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$doc->id&objectType=doc");?>" title="<?php echo $lang->doc->collect;?>" class='ajaxCollect btn btn-link'><i class='icon <?php echo $star;?>'></i></a>
|
||||
<?php $star = strpos($doc->collector, ',' . $this->app->user->account . ',') !== false ? 'star' : 'star-empty';?>
|
||||
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$doc->id&objectType=doc");?>" title="<?php echo $lang->doc->collect;?>" class='ajaxCollect btn btn-link'><?php echo html::image("static/svg/{$star}.svg", "class='$star'");?></a>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if($this->config->edition == 'max' and $this->app->tab == 'project'):?>
|
||||
|
||||
@@ -10,10 +10,6 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php js::set('from', $from);?>
|
||||
<?php if(strpos($config->doc->textTypes, $docType) !== false and $from == 'doc'):?>
|
||||
<?php include 'createtexttype.html.php';?>
|
||||
<?php else:?>
|
||||
<?php if($docType != '' and strpos($config->doc->officeTypes, $docType) !== false):?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<div id="mainContent" class="main-content">
|
||||
@@ -39,115 +35,5 @@ $("a[href^='###']").click(function()
|
||||
</body>
|
||||
</html>
|
||||
<?php else:?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php include '../../common/view/markdown.html.php';?>
|
||||
<?php js::set('holders', $lang->doc->placeholder);?>
|
||||
<?php js::set('type', 'doc');?>
|
||||
<div id="mainContent" class="main-content">
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->doc->create;?></h2>
|
||||
</div>
|
||||
<?php if($objectType == 'custom' and empty($libs)):?>
|
||||
<?php echo html::a(helper::createLink('doc', 'createLib', "type=custom&objectID=$objectID"), '<i class="icon icon-plus"></i> ' . $lang->doc->createLib, '', 'class="iframe hidden createCustomLib"');?>
|
||||
<?php endif;?>
|
||||
<form class="load-indicator main-form form-ajax" id="dataform" method='post' enctype='multipart/form-data'>
|
||||
<table class='table table-form'>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class='w-110px'><?php echo $lang->doc->lib;?></th>
|
||||
<td> <?php echo html::select('lib', $libs, $libID, "class='form-control chosen' onchange=loadDocModule(this.value)");?> </td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->module;?></th>
|
||||
<td>
|
||||
<span id='moduleBox'><?php echo html::select('module', $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></span>
|
||||
</td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->title;?></th>
|
||||
<td colspan='2'><?php echo html::input('title', '', "class='form-control' required");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->keywords;?></th>
|
||||
<td colspan='2'><?php echo html::input('keywords', '', "class='form-control' placeholder='{$lang->doc->keywordsTips}'");?></td>
|
||||
</tr>
|
||||
<tr id='contentBox'>
|
||||
<th><?php echo $lang->doc->content;?></th>
|
||||
<td colspan='2'>
|
||||
<div class='contenthtml'><?php echo html::textarea('content', '', "style='width:100%;height:200px'");?></div>
|
||||
<div class='contentmarkdown hidden'><?php echo html::textarea('contentMarkdown', '', "style='width:100%;height:200px'");?></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class='hidden'>
|
||||
<th><?php echo $lang->doc->type;?></th>
|
||||
<?php
|
||||
$typeKeyList = array();
|
||||
foreach($lang->doc->types as $typeKey => $typeName) $typeKeyList[$typeKey] = $typeKey;
|
||||
?>
|
||||
<td><?php echo html::radio('type', $lang->doc->types, zget($typeKeyList, $docType, 'text'));?></td>
|
||||
</tr>
|
||||
<tr id='urlBox' class='hidden'>
|
||||
<th><?php echo $lang->doc->url;?></th>
|
||||
<td colspan='2'><?php echo html::input('url', '', "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr id='fileBox'>
|
||||
<th><?php echo $lang->doc->files;?></th>
|
||||
<td colspan='2'><?php echo $this->fetch('file', 'buildform');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->mailto;?></th>
|
||||
<td colspan="2">
|
||||
<div class="input-group">
|
||||
<?php
|
||||
echo html::select('mailto[]', $users, '', "multiple class='form-control picker-select' data-drop-direction='top'");
|
||||
echo $this->fetch('my', 'buildContactLists');
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doclib->control;?></th>
|
||||
<td colspan='2'>
|
||||
<?php $acl = $lib->acl == 'default' ? 'open' : $lib->acl;?>
|
||||
<?php $acl = ($lib->type == 'project' and $acl == 'private') ? 'open' : $acl;?>
|
||||
<?php echo html::radio('acl', $lang->doc->aclList, $acl, "onchange='toggleAcl(this.value, \"doc\")'");?>
|
||||
<span class='text-info' id='noticeAcl'><?php echo $lang->doc->noticeAcl['doc'][$acl];?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='whiteListBox' class='hidden'>
|
||||
<th><?php echo $lang->doc->whiteList;?></th>
|
||||
<td colspan='2'>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon groups-addon'><?php echo $lang->doclib->group?></span>
|
||||
<?php echo html::select('groups[]', $groups, '', "class='form-control picker-select' multiple data-drop-direction='top'")?>
|
||||
</div>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon'><?php echo $lang->doclib->user?></span>
|
||||
<?php echo html::select('users[]', $users, '', "class='form-control picker-select' multiple data-drop-direction='top'")?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='3' class='text-center form-actions'>
|
||||
<?php echo html::hidden('contentType', 'html');?>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php if($config->showMainMenu):?>
|
||||
<?php if(empty($gobackLink)) echo html::backButton($lang->goback, "data-app='{$app->tab}'");?>
|
||||
<?php if(!empty($gobackLink)) echo html::a($gobackLink, $lang->goback, '', "class='btn btn-back btn-wide'");?>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php js::set('textType', $config->doc->textTypes);?>
|
||||
<?php js::set('docType', $docType);?>
|
||||
<?php js::set('fromGlobal', $fromGlobal);?>
|
||||
<?php js::set('noticeAcl', $lang->doc->noticeAcl['doc']);?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?php endif;?>
|
||||
<?php include './createtexttype.html.php';?>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->title;?></th>
|
||||
<td colspan='2'><?php echo html::input('title', '', "class='form-control'");?></td>
|
||||
<td colspan='2' class='required'><?php echo html::input('title', '', "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->keywords;?></th>
|
||||
|
||||
@@ -12,6 +12,11 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php include '../../common/view/chosen.html.php';?>
|
||||
<?php js::set('libType', $type);?>
|
||||
<style> tr > td.form-actions {padding-bottom: 30px !important;}</style>
|
||||
<?php if($type == 'execution'):?>
|
||||
<style> tr > td.form-actions {padding-bottom: 60px !important;}</style>
|
||||
<?php endif;?>
|
||||
<div id="main">
|
||||
<div class="container">
|
||||
<div id='mainContent' class='main-content'>
|
||||
@@ -19,49 +24,43 @@
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->doc->createLib;?></h2>
|
||||
</div>
|
||||
<form method='post' target='hiddenwin' class='no-stash'>
|
||||
<form method='post' class='main-form form-ajax no-stash' enctype='multipart/form-data' >
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-110px'><?php echo $lang->doc->libType?></th>
|
||||
<?php if($this->app->tab != 'doc'):?>
|
||||
<?php
|
||||
foreach($libTypeList as $key => $libType)
|
||||
{
|
||||
if($this->app->tab != $key) unset($libTypeList[$key]);
|
||||
}
|
||||
?>
|
||||
<?php endif;?>
|
||||
<td><?php echo html::radio('type', $libTypeList, $type ? $type : key($libTypeList))?></td>
|
||||
<?php if(in_array($type, array('product', 'project', 'execution'))):?>
|
||||
<tr class='objectBox'>
|
||||
<th><?php echo $lang->doc->{$type}?></th>
|
||||
<td class='required'><?php echo html::select($type, $objects, $objectID, "class='form-control chosen' data-drop-direction='down'")?></td>
|
||||
</tr>
|
||||
<tr class='product'>
|
||||
<th><?php echo $lang->doc->product?></th>
|
||||
<td><?php echo html::select('product', $products, $type == 'product' ? $objectID : '', "class='form-control chosen' data-drop_direction='down'")?></td>
|
||||
</tr>
|
||||
<tr class='project hidden'>
|
||||
<th><?php echo $lang->doc->project?></th>
|
||||
<td><?php echo html::select('project', $projects, $type == 'project' ? $objectID : '', "class='form-control chosen' data-drop_direction='down'")?></td>
|
||||
</tr>
|
||||
<tr class='execution hidden'>
|
||||
<?php if($app->tab == 'doc' and $type == 'project'):?>
|
||||
<tr class='executionBox'>
|
||||
<th><?php echo $lang->doc->execution?></th>
|
||||
<td><?php echo html::select('execution', $executions, $type == 'execution' ? $objectID : '', "class='form-control chosen' data-drop_direction='down'")?></td>
|
||||
<td>
|
||||
<?php $disabled = $project->multiple ? '' : 'disabled';?>
|
||||
<?php echo html::select('execution', $executionPairs, 0, "class='form-control chosen' data-drop-direction='down' data-placeholder='{$lang->doclib->tip->selectExecution}' $disabled")?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if(in_array($type, array('product', 'project'))):?>
|
||||
<tr <?php if($config->vision == 'lite') echo 'class="hidden"'?>>
|
||||
<th><?php echo $lang->doc->libType;?></th>
|
||||
<td>
|
||||
<span><?php echo html::radio('libType', $lang->doclib->type, 'wiki', "onchange='changeDoclibAcl(this.value)'")?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
<tr class="normalLib">
|
||||
<th><?php echo $lang->doclib->name?></th>
|
||||
<td><?php echo html::input('name', '', "class='form-control'")?></td>
|
||||
</tr>
|
||||
<tr class='apilib hidden'>
|
||||
<th><?php echo $lang->api->name?></th>
|
||||
<td><?php echo html::input('name', '', "class='form-control'")?></td>
|
||||
</tr>
|
||||
<tr class="apilib hidden">
|
||||
<th><?php echo $lang->api->baseUrl?></th>
|
||||
<td><?php echo html::input('baseUrl', '', "class='form-control' placeholder='" . $lang->api->baseUrlDesc . "'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr id="aclBox">
|
||||
<th><?php echo $lang->doclib->control;?></th>
|
||||
<td>
|
||||
<span><?php echo html::radio('acl', $lang->doc->aclList, 'open', "onchange='toggleAcl(this.value, \"lib\")'")?></span>
|
||||
<span class='text-info' id='noticeAcl'><?php echo $lang->doc->noticeAcl['lib']['product']['default'];?></span>
|
||||
<?php echo html::radio('acl', $lang->doclib->aclList, $type == 'custom' ? 'open' : 'default', "onchange='toggleAcl(this.value, \"lib\")'", 'block')?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='whiteListBox' class='hidden'>
|
||||
@@ -74,17 +73,15 @@
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon'><?php echo $lang->doclib->user?></span>
|
||||
<?php echo html::select('users[]', $users, '', "class='form-control picker-select' multiple")?>
|
||||
<?php echo $this->fetch('my', 'buildContactLists', "dropdownName=users&attr=data-drop_direction='up'");?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="apilib hidden">
|
||||
<th><?php echo $lang->api->desc;?></th>
|
||||
<td>
|
||||
<?php echo html::textarea('desc', '', "rows='8' class='form-control kindeditor' hidefocus='true' tabindex=''");?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='text-center form-actions' colspan='2'><?php echo html::submitButton();?></td>
|
||||
<td class='text-center form-actions' colspan='2'>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php echo html::hidden('type', $type);?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
@@ -94,19 +91,18 @@
|
||||
</div>
|
||||
<div class='hidden'>
|
||||
<table>
|
||||
<tr id='aclBoxA'>
|
||||
<tr id='aclAPIBox'>
|
||||
<th><?php echo $lang->doclib->control;?></th>
|
||||
<td>
|
||||
<?php echo html::radio('acl', $lang->doclib->aclListA, 'default', "onchange='toggleAcl(this.value, \"lib\")'")?>
|
||||
<?php echo html::radio('acl', $lang->api->aclList, 'open', "onchange='toggleAcl(this.value, \"lib\")'", 'block')?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='aclBoxB'>
|
||||
<tr id='aclOtherBox'>
|
||||
<th><?php echo $lang->doclib->control;?></th>
|
||||
<td>
|
||||
<?php echo html::radio('acl', $lang->doclib->aclListB, 'open', "onchange='toggleAcl(this.value, \"lib\")'")?>
|
||||
<?php echo html::radio('acl', $lang->doclib->aclList, 'default', "onchange='toggleAcl(this.value, \"lib\")'", 'block')?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php js::set('noticeAcl', $lang->doc->noticeAcl['lib']);?>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
|
||||
@@ -10,76 +10,41 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php include '../../common/view/markdown.html.php';?>
|
||||
<?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));?>
|
||||
<?php js::set('keywordsNotEmpty', sprintf($lang->error->notempty, $lang->doc->keywords));?>
|
||||
<style>
|
||||
#main {padding: 0;}
|
||||
.container {padding: 0 !important;}
|
||||
#mainContent {padding: 0 !important;}
|
||||
.doc-title input {border: unset; font-size: 18px; font-weight: bold; color: #3c4353; padding-left: 16px;}
|
||||
.doc-title .form-control:focus {border: unset; box-shadow: unset;}
|
||||
.doc-title input::-webkit-input-placeholder {color: #D8DBDE;}
|
||||
.doc-title.required:after {top: 4px; right: 0; left: 12px; display: inline-table;}
|
||||
#submit {margin-right: 16px;}
|
||||
#headerBox {border-bottom: 1px solid #e3e3e3;}
|
||||
#headerBox td:last-child {padding-right: 24px;}
|
||||
#editorContent {padding: 0;}
|
||||
|
||||
#contentBox {padding: 0; width: 100%;}
|
||||
.ke-container {overflow: visible;}
|
||||
.ke-container, .contenthtml {border: unset; background: #efefef;}
|
||||
.ke-container.focus {box-shadow: unset; border-color: unset;}
|
||||
.ke-toolbar {padding-left: 20px; width: 100%; height: 30px;}
|
||||
.ke-edit {border-top: 1px solid rgb(220, 220, 220)}
|
||||
.ke-edit, .CodeMirror {margin: 8px 200px 0 200px; background: #fff;}
|
||||
.kindeditor-ph {padding: 20px 20px 0 20px !important;}
|
||||
.editor-toolbar {background: #fff; padding-left: 20px; border-right: unset; border-top: unset; height: 30px;}
|
||||
.CodeMirror {padding: 20px 20px 0 20px;}
|
||||
.CodeMirror.CodeMirror-wrap {border-left: 0; border-right: 0; border-bottom: 0;}
|
||||
.ke-statusbar {display: none;}
|
||||
.contentmarkdown {background: #efefef;}
|
||||
|
||||
.article-content {padding: 8px 20px;}
|
||||
|
||||
#noticeAcl {margin-left: 10px; vertical-align: middle;}
|
||||
|
||||
#basicInfoLink {border: unset;}
|
||||
|
||||
#modalBasicInfo .modal-content {overflow-x: hidden; overflow-y: scroll;}
|
||||
#modalBasicInfo .modal-body {padding-bottom: 10px;}
|
||||
.modal-title {font-size: 14px !important; font-weight: 700 !important;}
|
||||
#basicInfoBox tfoot td {padding-bottom: 0;}
|
||||
</style>
|
||||
<?php if($objectType == 'custom' and empty($libs)):?>
|
||||
<?php echo html::a(helper::createLink('doc', 'createLib', "type=custom&objectID=$objectID"), '<i class="icon icon-plus"></i> ' . $lang->doc->createLib, '', 'class="iframe hidden createCustomLib"');?>
|
||||
<?php endif;?>
|
||||
<?php $backLink = $this->createLink('doc', 'tableContents', "type=$objectType&objectID=$objectID&libID=$libID");?>
|
||||
<?php $backLink = $this->createLink('doc', 'tableContents', "type=$linkType&objectID=$objectID&libID=$libID");?>
|
||||
<div id="mainContent" class="main-content">
|
||||
<form class="load-indicator main-form form-ajax" id="dataform" method='post' enctype='multipart/form-data'>
|
||||
<table class='table table-form'>
|
||||
<tbody>
|
||||
<tr id='headerBox'>
|
||||
<td width='90px'><?php echo html::a($backLink, '<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', "class='btn btn-secondary' id='backBtn'");?></td>
|
||||
<td class="doc-title" colspan='3'><?php echo html::input('title', '', "placeholder='{$lang->doc->titlePlaceholder}' class='form-control' required");?></td>
|
||||
<td class="text-right">
|
||||
<?php echo html::submitButton('', "data-placement='bottom'", 'btn btn-primary');?>
|
||||
<?php echo html::a('#modalBasicInfo', "<i class='icon icon-cog-outline'></i> " . $lang->settings, '', "data-toggle='modal' id='basicInfoLink' class='btn'");?>
|
||||
<td width='90px'><?php echo html::a($backLink, "<i class='icon icon-back icon-sm'></i> " . $lang->goback, '', "id='backBtn' class='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="text-right btn-tools">
|
||||
<span id='savePath' class='text-gray'></span>
|
||||
<?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'");?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='5' id="editorContent">
|
||||
<div class="main-row fade in">
|
||||
<div id='contentBox' class="main-col">
|
||||
<div class='contenthtml'><?php echo html::textarea('content', '', "style='width:100%;'");?></div>
|
||||
<div class='contentmarkdown hidden'><?php echo html::textarea('contentMarkdown', '', "style='width:100%;'");?></div>
|
||||
<?php $contentRequired = strpos($config->doc->create->requiredFields, 'content') !== false ? 'required' : '';?>
|
||||
<div class='contenthtml <?php echo $contentRequired?>'><?php echo html::textarea('content', '', "style='width:100%;'");?></div>
|
||||
<div class='contentmarkdown <?php echo $contentRequired;?> hidden'><?php echo html::textarea('contentMarkdown', '', "style='width:100%;'");?></div>
|
||||
<?php echo html::hidden('contentType', 'html');?>
|
||||
<?php echo html::hidden('type', 'text');?>
|
||||
<?php echo html::hidden('status', 'normal');?>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@@ -87,36 +52,55 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class='modal fade modal-basic' id='modalBasicInfo' data-scroll-inside='true'>
|
||||
<div class='modal fade modal-basic' id='modalBasicInfo'>
|
||||
<div class='modal-dialog'>
|
||||
<div class='modal-content with-padding'>
|
||||
<div class='modal-header'>
|
||||
<h2 class='modal-title'><?php echo $lang->doc->basicInfo;?></h2>
|
||||
</div>
|
||||
<div class='modal-content'>
|
||||
<div class='modal-body'>
|
||||
<button type='button' class='close' data-dismiss='modal'>
|
||||
<i class="icon icon-close"></i>
|
||||
</button>
|
||||
<table class='table table-form' id="basicInfoBox">
|
||||
<tbody>
|
||||
<tr><th class='w-100px'></th><td></td><th class='w-100px'></th><td></td></tr>
|
||||
<tr>
|
||||
<th class='w-100px'><?php echo $lang->doc->lib;?></th>
|
||||
<td colspan="2"><?php echo html::select('lib', $libs, $libID, "class='form-control chosen' onchange=loadDocModule(this.value)");?></td>
|
||||
<th><?php echo $lang->doc->title?></th>
|
||||
<td colspan='3' id='copyTitle'></td>
|
||||
</tr>
|
||||
<?php if($objectType == 'project'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->module;?></th>
|
||||
<td colspan="2">
|
||||
<span id='moduleBox'><?php echo html::select('module', $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></span>
|
||||
</td>
|
||||
<th><?php echo $lang->doc->project;?></th>
|
||||
<td class='required'><?php echo html::select('project', $objects, $objectID, "class='form-control chosen' onchange=loadExecutions(this.value)");?></td>
|
||||
<?php if($this->app->tab == 'doc'):?>
|
||||
<th><?php echo $lang->doc->execution?></th>
|
||||
<td id='executionBox'><?php echo html::select('execution', $executions, '', "class='form-control chosen' data-placeholder='{$lang->doc->placeholder->execution}' onchange='loadObjectModules(\"execution\", this.value)'")?></td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php elseif($objectType == 'execution'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->execution;?></th>
|
||||
<td class='required'><?php echo html::select('execution', $objects, $objectID, "class='form-control chosen' onchange='loadObjectModules(\"execution\", this.value)'");?></td>
|
||||
</tr>
|
||||
<?php elseif($objectType == 'product'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->product;?></th>
|
||||
<td class='required'><?php echo html::select('product', $objects, $objectID, "class='form-control chosen' onchange='loadObjectModules(\"product\", this.value)'");?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th class='w-100px'><?php echo $lang->doc->libAndModule?></th>
|
||||
<td colspan='3' class='required'><span id='moduleBox'><?php echo html::select('module', $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->keywords;?></th>
|
||||
<td colspan='2'><?php echo html::input('keywords', '', "class='form-control' placeholder='{$lang->doc->keywordsTips}'");?></td>
|
||||
<td colspan='3' class='<?php if(strpos($config->doc->edit->requiredFields, 'keywords') !== false) echo 'required'?>'><?php echo html::input('keywords', '', "id='modalKeywords' class='form-control' placeholder='{$lang->doc->keywordsTips}'");?></td>
|
||||
</tr>
|
||||
<tr id='fileBox'>
|
||||
<th><?php echo $lang->doc->files;?></th>
|
||||
<td colspan='2'><?php echo $this->fetch('file', 'buildform');?></td>
|
||||
<td colspan='3'><?php echo $this->fetch('file', 'buildform');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->mailto;?></th>
|
||||
<td colspan="2">
|
||||
<td colspan="3">
|
||||
<div class="input-group">
|
||||
<?php
|
||||
echo html::select('mailto[]', $users, '', "multiple class='form-control picker-select' data-drop-direction='top'");
|
||||
@@ -126,17 +110,14 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="th-control"><?php echo $lang->doclib->control;?></th>
|
||||
<td colspan='2'>
|
||||
<?php $acl = $lib->acl == 'default' ? 'open' : $lib->acl;?>
|
||||
<?php $acl = ($lib->type == 'project' and $acl == 'private') ? 'open' : $acl;?>
|
||||
<?php echo html::radio('acl', $lang->doc->aclList, $acl, "onchange='toggleAcl(this.value, \"doc\")'");?>
|
||||
<span class='text-info' id='noticeAcl'><?php echo $lang->doc->noticeAcl['doc'][$acl];?></span>
|
||||
<th class="th-control text-top"><?php echo $lang->doclib->control;?></th>
|
||||
<td colspan='3' class='aclBox'>
|
||||
<?php echo html::radio('acl', $lang->doc->aclList, 'open', "onchange='toggleAcl(this.value, \"doc\")'");?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='whiteListBox' class='hidden'>
|
||||
<th><?php echo $lang->doc->whiteList;?></th>
|
||||
<td colspan='2'>
|
||||
<td colspan='3'>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon groups-addon'><?php echo $lang->doclib->group?></span>
|
||||
<?php echo html::select('groups[]', $groups, '', "class='form-control picker-select' multiple data-drop-direction='top'")?>
|
||||
@@ -144,13 +125,17 @@
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon'><?php echo $lang->doclib->user?></span>
|
||||
<?php echo html::select('users[]', $users, '', "class='form-control picker-select' multiple data-drop-direction='top'")?>
|
||||
<?php echo $this->fetch('my', 'buildContactLists', "dropdownName=users");?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='3' class='text-center'><?php echo html::a('javascript:void(0)', $lang->doc->confirm, '', "id='saveBtn' class='btn btn-primary btn-wide'");?></td>
|
||||
<td colspan='4' class='text-center'>
|
||||
<?php echo html::commonButton($lang->release->common, "id='releaseBtn'", 'btn btn-primary btn-wide');?>
|
||||
<?php echo html::commonButton($lang->cancel, "data-dismiss='modal'", "btn btn-wide");?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
@@ -160,32 +145,15 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
var contentHeight = $(document).height() - 120;
|
||||
setTimeout(function(){$('.ke-edit-iframe, .ke-edit, .ke-edit-textarea, .CodeMirror').height(contentHeight);}, 100);
|
||||
$('#modalBasicInfo .modal-content').css('max-height', contentHeight);
|
||||
|
||||
$('iframe.ke-edit-iframe').contents().find('.article-content').css('padding', '20px 20px 0 20px');
|
||||
|
||||
$('#saveBtn').click(function()
|
||||
{
|
||||
var requiredArr = ['lib', 'keywords'];
|
||||
for(var i = 0; i < 3; i++)
|
||||
{
|
||||
if(requiredFields.indexOf(',' + requiredArr[i] + ',') != -1 && !$('#' + requiredArr[i]).val().trim())
|
||||
{
|
||||
alert(eval(requiredArr[i] + 'NotEmpty'));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
$(document).on('click', '#modalBasicInfo tfoot .btn', function() {$('#modalBasicInfo').modal('hide');});
|
||||
});
|
||||
})
|
||||
</script>
|
||||
<?php js::set('textType', $config->doc->textTypes);?>
|
||||
<?php js::set('docType', $docType);?>
|
||||
<?php js::set('fromGlobal', $fromGlobal);?>
|
||||
<?php js::set('noticeAcl', $lang->doc->noticeAcl['doc']);?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
<?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));?>
|
||||
<?php js::set('keywordsNotEmpty', sprintf($lang->error->notempty, $lang->doc->keywords));?>
|
||||
<?php js::set('from', $from);?>
|
||||
<?php js::set('defaultSave', $lang->doc->defaultSave);?>
|
||||
<?php js::set('titleNotEmpty', sprintf($lang->error->notempty, $lang->doc->title));?>
|
||||
<?php js::set('contentNotEmpty', sprintf($lang->error->notempty, $lang->doc->content));?>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
<?php
|
||||
/**
|
||||
* The allLibs view file of doc module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
|
||||
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
||||
* @author Shujie Tian <tianshujie@easycorp.ltd>
|
||||
* @package doc
|
||||
* @version $Id$
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<style>
|
||||
body {margin-bottom: 25px;}
|
||||
#docListForm th.c-id {width: 72px;}
|
||||
#docListForm th.c-user {width: 80px;}
|
||||
#docListForm th.c-actions {width: 84px; padding-left: 15px;}
|
||||
#docListForm .checkbox-primary {line-height: 16px;}
|
||||
#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;}
|
||||
</style>
|
||||
<?php if(common::checkNotCN()):?>
|
||||
<style>
|
||||
#docListForm th.c-date {width: 108px;}
|
||||
#docListForm th.c-user {width: 102px !important;}
|
||||
</style>
|
||||
<?php endif;?>
|
||||
<?php if(empty($docs)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->doc->noDoc;?></span>
|
||||
<?php
|
||||
if($browseType != 'bySearch' and $libID and (common::hasPriv('doc', 'create') or (common::hasPriv('api', 'create') and !$apiLibID)))
|
||||
{
|
||||
echo $this->doc->printCreateBtn($lib, $type, $objectID, $moduleID, 'list');
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<?php $vars = "type=$type&objectID=$objectID&$libID=$libID&moduleID=$moduleID&browseType=$browseType&orderBy=%s¶m=$param&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
|
||||
<div>
|
||||
<form class='main-table' method='post' id='docListForm'>
|
||||
<table class="table table-files has-sort-head">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="c-id">
|
||||
<?php if($canExport):?>
|
||||
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
|
||||
<label></label>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB, '', 'tableContents');?>
|
||||
</th>
|
||||
<th class="c-name"><?php common::printOrderLink('title', $orderBy, $vars, $lang->doc->title, '', 'tableContents');?></th>
|
||||
<th class="c-user"><?php common::printOrderLink('addedBy', $orderBy, $vars, $lang->doc->addedByAB, '', 'tableContents');?></th>
|
||||
<th class="c-date"><?php common::printOrderLink('addedDate', $orderBy, $vars, $lang->doc->addedDate, '', 'tableContents');?></th>
|
||||
<th class="c-user"><?php common::printOrderLink('editedBy', $orderBy, $vars, $lang->doc->editedBy, '', 'tableContents');?></th>
|
||||
<th class="c-date"><?php common::printOrderLink('editedDate', $orderBy, $vars, $lang->doc->editedDate, '', 'tableContents');?></th>
|
||||
<th class="c-actions"><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($docs as $doc):?>
|
||||
<?php $star = strpos($doc->collector, ',' . $this->app->user->account . ',') !== false ? 'star' : 'star-empty';?>
|
||||
<?php $collectTitle = strpos($doc->collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
|
||||
<tr>
|
||||
<?php $objectID = isset($doc->{$type}) ? $doc->{$type} : 0;?>
|
||||
<td class="c-id" title='<?php echo $doc->id?>'>
|
||||
<?php if($canExport):?>
|
||||
<div class="checkbox-primary">
|
||||
<input type='checkbox' name='docIDList[]' value='<?php echo $doc->id;?>'/>
|
||||
<label></label>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php printf('%03d', $doc->id);?>
|
||||
</td>
|
||||
</td>
|
||||
<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', 'objectLibs'))
|
||||
{
|
||||
echo html::a($this->createLink('doc', 'objectLibs', "type=$type&objectID=$objectID&libID=$doc->lib&docID=$doc->id"), $icon . $doc->title, '', "title='{$doc->title}' class='doc-title' data-app='{$this->app->tab}'");
|
||||
}
|
||||
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') and $libType and $libType != 'api'):?>
|
||||
<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-user"><?php echo zget($users, $doc->addedBy);?></td>
|
||||
<td class="c-datetime"><?php echo formatTime($doc->addedDate, 'Y-m-d');?></td>
|
||||
<td class="c-user"><?php echo zget($users, $doc->editedBy);?></td>
|
||||
<td class="c-datetime"><?php echo formatTime($doc->editedDate, 'Y-m-d');?></td>
|
||||
<td class="c-actions">
|
||||
<?php if(common::canBeChanged('doc', $doc)):?>
|
||||
<?php common::printLink('doc', 'edit', "docID=$doc->id&comment=false", "<i class='icon icon-edit'></i>", '', "title='{$lang->edit}' class='btn'", true, false)?>
|
||||
<?php common::printLink('doc', 'delete', "docID=$doc->id&confirm=no", "<i class='icon icon-trash'></i>", 'hiddenwin', "title='{$lang->delete}' class='btn'")?>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if(!empty($docs)):?>
|
||||
<div class='table-footer'>
|
||||
<?php if($canExport):?>
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<?php endif;?>
|
||||
<div class="table-statistic"><?php echo sprintf($lang->doc->docSummary, count($docs));?></div>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<form>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
var pageSummary = '<?php echo sprintf($lang->doc->docSummary, count($docs));?>';
|
||||
var checkedSummary = '<?php echo $lang->doc->docCheckedSummary?>';
|
||||
$('#docListForm').table(
|
||||
{
|
||||
replaceId: 'docIDList',
|
||||
statisticCreator: function(table)
|
||||
{
|
||||
var $table = table.getTable();
|
||||
var $checkedRows = $table.find('tbody>tr.checked');
|
||||
var checkedTotal = $checkedRows.length;
|
||||
return checkedTotal ? checkedSummary.replace('%total%', checkedTotal) : pageSummary;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -28,16 +28,10 @@
|
||||
</div>
|
||||
<form method='post' class='load-indicator main-form form-ajax'>
|
||||
<table class='table table-form'>
|
||||
<?php if(!empty($lib->product)):?>
|
||||
<?php if(in_array($lib->type, array('product', 'project', 'execution'))):?>
|
||||
<tr>
|
||||
<th class='w-130px'><?php echo $lang->doc->product?></th>
|
||||
<td><?php echo $product->name?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if(!empty($lib->execution)):?>
|
||||
<tr>
|
||||
<th class='w-130px'><?php echo $lang->doc->execution?></th>
|
||||
<td><?php echo $execution->name?></td>
|
||||
<th class='w-130px'><?php echo $lang->doc->{$lib->type};?></th>
|
||||
<td><?php echo $object->name?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
@@ -47,19 +41,13 @@
|
||||
<span class='hidden'><?php echo html::radio('type', $lang->doc->libTypeList, $lib->type);?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr id="aclBox">
|
||||
<th><?php echo $lang->doclib->control;?></th>
|
||||
<?php if($lib->type == 'product' or $lib->type == 'execution'):?>
|
||||
<td>
|
||||
<?php echo html::radio('acl', $lang->doclib->aclListA, $lib->acl, "onchange='toggleAcl(this.value, \"lib\")'")?>
|
||||
<span class='text-info' id='noticeAcl'><?php echo $lang->doc->noticeAcl['lib'][$lib->type][$lib->acl];?></span>
|
||||
<?php if($lib->type != 'api' and empty($lib->main)) echo html::radio('acl', $lang->doclib->aclList, $lib->acl, "onchange='toggleAcl(this.value, \"lib\")'", 'block')?>
|
||||
<?php if($lib->type == 'api' and empty($lib->main)) echo html::radio('acl', $lang->api->aclList, $lib->acl, "onchange='toggleAcl(this.value, \"lib\")'", 'block')?>
|
||||
<?php if(!empty($lib->main)) echo html::radio('acl', $lang->doclib->aclList, 'default', "onchange='toggleAcl(this.value, \"lib\")'", 'block');;?>
|
||||
</td>
|
||||
<?php else:?>
|
||||
<td>
|
||||
<?php echo html::radio('acl', $lang->doclib->aclListB, $lib->acl, "onchange='toggleAcl(this.value, \"lib\")'")?>
|
||||
<span class='text-info' id='noticeAcl'><?php echo $lang->doc->noticeAcl['lib'][$lib->type][$lib->acl];?></span>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<tr id='whiteListBox' class='hidden'>
|
||||
<th><?php echo $lang->doc->whiteList?></th>
|
||||
@@ -71,6 +59,7 @@
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon'><?php echo $lang->doclib->user?></span>
|
||||
<?php echo html::select('users[]', $users, $lib->users, "class='form-control picker-select' multiple")?>
|
||||
<?php echo $this->fetch('my', 'buildContactLists', "dropdownName=users&attr=data-drop_direction='up'");?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -13,48 +13,10 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php if($doc->contentType == 'html') include '../../common/view/kindeditor.html.php';?>
|
||||
<?php if($doc->contentType == 'markdown') include '../../common/view/markdown.html.php';?>
|
||||
<?php js::set('needUpdateContent', $doc->content != $doc->draft);?>
|
||||
<?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');?>
|
||||
<style>
|
||||
#main {padding: 0;}
|
||||
.container {padding: 0 !important;}
|
||||
#mainContent {padding: 0 !important;}
|
||||
.doc-title input {border: unset; font-size: 18px; font-weight: bold; color: #3c4353; padding-left: 16px;}
|
||||
.doc-title .form-control:focus {border: unset; box-shadow: unset;}
|
||||
.doc-title input::-webkit-input-placeholder {color: #D8DBDE;}
|
||||
.doc-title.required:after {top: 4px; right: 0; left: 12px; display: inline-table;}
|
||||
#submit {margin-right: 16px;}
|
||||
#headerBox {border-bottom: 1px solid #e3e3e3;}
|
||||
#headerBox td:last-child {padding-right: 24px;}
|
||||
#editorContent {padding: 0;}
|
||||
|
||||
#contentBox {padding: 0; width: 100%;}
|
||||
.ke-container {overflow: visible;}
|
||||
.ke-container, .contenthtml {border: unset; background: #efefef;}
|
||||
.ke-container.focus {box-shadow: unset; border-color: unset;}
|
||||
.ke-toolbar {padding-left: 20px; width: 100%; height: 30px;}
|
||||
.ke-edit {border-top: 1px solid rgb(220, 220, 220)}
|
||||
.ke-edit, .CodeMirror {margin: 8px 200px 0 200px; background: #fff;}
|
||||
.kindeditor-ph {padding: 20px 20px 0 20px !important;}
|
||||
.editor-toolbar {background: #fff; padding-left: 20px; border-right: unset; border-top: unset; height: 30px;}
|
||||
.CodeMirror {padding: 20px 20px 0 20px;}
|
||||
.CodeMirror.CodeMirror-wrap {border-left: 0; border-right: 0; border-bottom: 0;}
|
||||
.ke-statusbar {display: none;}
|
||||
|
||||
.article-content {padding: 8px 20px;}
|
||||
|
||||
#noticeAcl {margin-left: 10px; vertical-align: middle;}
|
||||
|
||||
#basicInfoLink {border: unset;}
|
||||
|
||||
#modalBasicInfo .modal-content {overflow-x: hidden; overflow-y: scroll;}
|
||||
#modalBasicInfo .modal-body {padding-bottom: 10px;}
|
||||
.modal-title {font-size: 14px !important; font-weight: 700 !important;}
|
||||
#basicInfoBox tfoot td {padding-bottom: 0;}
|
||||
</style>
|
||||
<?php $backLink = $app->session->docList ? $app->session->docList : $this->createLink('doc', 'objectlibs', "type=$type&objectID=$objectID&libID={$lib->id}&docID={$doc->id}") . "#app={$this->app->tab}";?>
|
||||
<div id="mainContent" class="main-content">
|
||||
@@ -63,9 +25,15 @@
|
||||
<tbody>
|
||||
<tr id='headerBox'>
|
||||
<td width='90px'><?php echo html::a($backLink, "<i class='icon icon-back icon-sm'></i> " . $lang->goback, '', "id='backBtn' class='btn btn-secondary'");?></td>
|
||||
<td class="doc-title" colspan='3'><?php echo html::input('title', $doc->title, "placeholder='{$lang->doc->titlePlaceholder}' class='form-control' required");?></td>
|
||||
<td class="text-right">
|
||||
<?php echo html::submitButton('', "data-placement='bottom'", 'btn btn-primary');?>
|
||||
<td class="doc-title" colspan='3'><?php echo html::input('title', $doc->title, "placeholder='{$lang->doc->titlePlaceholder}'' id='editorTitle' class='form-control' required");?></td>
|
||||
<td class="text-right btn-tools">
|
||||
<?php if($doc->status == 'draft'):?>
|
||||
<span id='savePath' class='text-gray'></span>
|
||||
<?php echo html::commonButton($lang->doc->saveDraft, "id='saveDraft'", "btn btn-secondary");?>
|
||||
<?php echo html::commonButton($lang->release->common, "id='saveRelease'", "btn btn-primary");?>
|
||||
<?php else:?>
|
||||
<?php echo html::submitButton($lang->release->common, "", "btn btn-primary");?>
|
||||
<?php endif;?>
|
||||
<?php echo html::a('#modalBasicInfo', "<i class='icon icon-cog-outline'></i> " . $lang->settings, '', "data-toggle='modal' id='basicInfoLink' class='btn'");?>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -77,6 +45,7 @@
|
||||
<?php echo html::hidden('contentType', $doc->contentType);?>
|
||||
<?php echo html::hidden('type', 'text');?>
|
||||
<?php echo html::hidden('editedDate', $doc->editedDate);?>
|
||||
<?php echo html::hidden('status', $doc->status);?>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@@ -84,67 +53,73 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class='modal fade modal-basic' id='modalBasicInfo' data-scroll-inside='true'>
|
||||
<div class='modal fade modal-basic' id='modalBasicInfo'>
|
||||
<div class='modal-dialog'>
|
||||
<div class='modal-content with-padding'>
|
||||
<div class='modal-content'>
|
||||
<div class='modal-header'>
|
||||
<h2 class='modal-title'><?php echo $lang->doc->basicInfo;?></h2>
|
||||
<h2 class='modal-title'>
|
||||
<?php echo $lang->doc->basicInfo;?>
|
||||
<button type='button' class='close' data-dismiss='modal'>
|
||||
<i class="icon icon-close"></i>
|
||||
</button>
|
||||
</h2>
|
||||
</div>
|
||||
<div class='modal-body'>
|
||||
<table class='table table-form' id="basicInfoBox">
|
||||
<tr>
|
||||
<th class='w-100px'><?php echo $lang->doc->lib;?></th>
|
||||
<td colspan="2" class="required"><?php echo html::select('lib', $libs, $doc->lib, "class='form-control chosen' onchange=loadDocModule(this.value)");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->module;?></th>
|
||||
<td colspan="2">
|
||||
<span id='moduleBox'><?php echo html::select('module', $moduleOptionMenu, $doc->module, "class='form-control chosen'");?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->keywords;?></th>
|
||||
<td colspan='2'><?php echo html::input('keywords', $doc->keywords, "class='form-control' placeholder='{$lang->doc->keywordsTips}'");?></td>
|
||||
</tr>
|
||||
<tr id='fileBox'>
|
||||
<th><?php echo $lang->doc->files;?></th>
|
||||
<td colspan='2'><?php echo $this->fetch('file', 'buildform');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->mailto;?></th>
|
||||
<td colspan="2">
|
||||
<div class="input-group">
|
||||
<?php
|
||||
echo html::select('mailto[]', $users, $doc->mailto, "multiple class='form-control picker-select' data-drop-direction='top'");
|
||||
echo $this->fetch('my', 'buildContactLists');
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="th-control"><?php echo $lang->doclib->control;?></th>
|
||||
<td colspan='2'>
|
||||
<?php $acl = $lib->acl == 'private' ? 'private' : $doc->acl;?>
|
||||
<?php echo html::radio('acl', $lang->doc->aclList, $acl, "onchange='toggleAcl(this.value, \"doc\")'")?>
|
||||
<span class='text-info' id='noticeAcl'><?php echo $lang->doc->noticeAcl['doc'][$acl];?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='whiteListBox' class='hidden'>
|
||||
<th><?php echo $lang->doc->whiteList;?></th>
|
||||
<td colspan='2'>
|
||||
<div class='input-group w-p100'>
|
||||
<span class='input-group-addon groups-addon'><?php echo $lang->doclib->group?></span>
|
||||
<?php echo html::select('groups[]', $groups, $doc->groups, "class='form-control picker-select' multiple data-drop-direction='top'")?>
|
||||
</div>
|
||||
<div class='input-group w-p100'>
|
||||
<span class='input-group-addon'><?php echo $lang->doclib->user?></span>
|
||||
<?php echo html::select('users[]', $users, $doc->users, "class='form-control picker-select' multiple data-drop-direction='top'")?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tbody>
|
||||
<?php if(strpos('product|project|execution', $type) !== false):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->project;?></th>
|
||||
<td class='required'><?php echo html::select($type, $objects, $objectID, "class='form-control chosen' onchange='loadObjectModules(\"{$type}\", this.value)'");?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th class='w-100px'><?php echo $lang->doc->libAndModule?></th>
|
||||
<td colspan='3' class='required'><span id='moduleBox'><?php echo html::select('module', $moduleOptionMenu, $doc->lib . '_' . $doc->module, "class='form-control chosen'");?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->keywords;?></th>
|
||||
<td colspan='3' class='<?php if(strpos($config->doc->edit->requiredFields, 'keywords') !== false) echo 'required'?>'><?php echo html::input('keywords', $doc->keywords, "id='modalKeywords' class='form-control' placeholder='{$lang->doc->keywordsTips}'");?></td>
|
||||
</tr>
|
||||
<tr id='fileBox'>
|
||||
<th><?php echo $lang->doc->files;?></th>
|
||||
<td colspan='3'><?php echo $this->fetch('file', 'buildform');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->doc->mailto;?></th>
|
||||
<td colspan="3">
|
||||
<div class="input-group">
|
||||
<?php
|
||||
echo html::select('mailto[]', $users, $doc->mailto, "multiple class='form-control picker-select' data-drop-direction='top'");
|
||||
echo $this->fetch('my', 'buildContactLists');
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="th-control text-top"><?php echo $lang->doclib->control;?></th>
|
||||
<td colspan='3' class='aclBox'>
|
||||
<?php echo html::radio('acl', $lang->doc->aclList, $doc->acl, "onchange='toggleAcl(this.value, \"doc\")'")?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='whiteListBox' class='<?php if($doc->acl == 'open') echo 'hidden';?>'>
|
||||
<th><?php echo $lang->doc->whiteList;?></th>
|
||||
<td colspan='3'>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon groups-addon'><?php echo $lang->doclib->group?></span>
|
||||
<?php echo html::select('groups[]', $groups, $doc->groups, "class='form-control picker-select' multiple data-drop-direction='top'")?>
|
||||
</div>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon'><?php echo $lang->doclib->user?></span>
|
||||
<?php echo html::select('users[]', $users, $doc->users, "class='form-control picker-select' multiple data-drop-direction='top'")?>
|
||||
<?php echo $this->fetch('my', 'buildContactLists', "dropdownName=users");?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='3' class='text-center'><?php echo html::a('javascript:void(0)', $lang->doc->confirm, '', "class='btn btn-primary btn-wide'");?></td>
|
||||
<td colspan='4' class='text-center'><?php echo html::commonButton($lang->doc->confirm, "data-dismiss='modal'", "btn btn-primary btn-wide");?></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
@@ -154,17 +129,12 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
var contentHeight = $(document).height() - 100;
|
||||
setTimeout(function(){$('.ke-edit-iframe, .ke-edit, .ke-edit-textarea, .CodeMirror').height(contentHeight);}, 100);
|
||||
$('#modalBasicInfo .modal-content').css('max-height', contentHeight);
|
||||
|
||||
$(document).on('click', '#modalBasicInfo tfoot .btn', function() {$('#modalBasicInfo').modal('hide');});
|
||||
|
||||
$('iframe.ke-edit-iframe').contents().find('.article-content').css('padding', '20px 20px 0 20px');
|
||||
})
|
||||
</script>
|
||||
<?php js::set('noticeAcl', $lang->doc->noticeAcl['doc']);?>
|
||||
<?php js::set('needUpdateContent', $doc->content != $doc->draft);?>
|
||||
<?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));?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -0,0 +1,508 @@
|
||||
<style>
|
||||
.tree-group {position: relative;}
|
||||
.tree-group > .module-name {white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; display: block;}
|
||||
.tree li.has-list.open:before {left: 6px;}
|
||||
.main-table-content {display: flex; gap: 20px;}
|
||||
.main-table-content > .side {flex: 0 0 300px;}
|
||||
.main-table-content > .content {flex: 1;}
|
||||
#main {margin-bottom: 0;}
|
||||
|
||||
/* css for mian */
|
||||
#mainContent > #sideBar {flex: 0 0 150px; overflow-x: auto; padding-right: 5px;}
|
||||
[lang^=zh] #mainContent > #sideBar {flex: 0 0 180px;}
|
||||
|
||||
/* css for tree */
|
||||
#fileTree .title {font-size: 16px; height: 20px; margin-top: 5px; margin-bottom: 5px;}
|
||||
.tree li.has-list.open:before {content: unset;}
|
||||
.tree li > a {max-width: 100%; padding: 2px;}
|
||||
.file-tree a {height: 30px;}
|
||||
.flex-between {display: flex; align-items: center; justify-content: space-between;}
|
||||
.flex-center {display: flex; align-items: center; justify-content: center;}
|
||||
.flex-start {display: flex; align-items: center;}
|
||||
.tree li > .list-toggle {top: 4px;}
|
||||
.input-tree {width: 120px;}
|
||||
.tree-icon {position: absolute; right: 0;}
|
||||
.tree li.has-input {overflow: hidden;}
|
||||
.img-lib {flex: 0 0 14px; height: 14px;}
|
||||
.tree-icon {position: absolute; right: 0;}
|
||||
.tree li > a {max-width: 100%; padding: 2px;}
|
||||
.file-tree a.show-icon > div {padding-right: 15px;}
|
||||
.tree li.has-input {overflow: hidden;}
|
||||
.tree-text {margin-left: 5px; overflow: hidden;}
|
||||
i.btn-info, i.btn-info:hover {border: none; background: #fff; box-shadow: unset;}
|
||||
.tree-version-trigger {padding: 0 10px; width: 54px;}
|
||||
|
||||
/* css for sidebar */
|
||||
.sidebar-toggle {flex: 0 0 16px;}
|
||||
.sidebar-toggle > .icon {width: 12px; height: 30px; margin-top: -10px; line-height: 30px; color: #fff; text-align: center; background: #7dcdfe; border-radius: 6px; cursor: pointer; padding-left: 0; padding-top: 0;}
|
||||
|
||||
.spliter {flex: 0 0 12px;}
|
||||
.spliter-btn {height: 28px; width: 10px; background: #fff; position: absolute; top: 30%; left: -1px; border: 1px solid #D9D9D9; border-radius: 2px;}
|
||||
.spliter-btn > .spliter-inner {width: 4px; height: 12px; border-left: 1px solid #D9D9D9; border-right: 1px solid #D9D9D9;}
|
||||
|
||||
#mainContent .table-empty-tip > p, #createDocs {display: inline-block;}
|
||||
.createDropdown a.btn-primary, .createDropdown a.btn-info {border-right: 1px solid rgba(255,255,255,0.2);}
|
||||
.createDropdown button.dropdown-toggle.btn-primary, .createDropdown button.dropdown-toggle.btn-info {padding: 6px;}
|
||||
.createDropdown ul > li {text-align: left;}
|
||||
.createDropdown .btn.btn-info:hover {box-shadow: none;}
|
||||
|
||||
#leftBar .selectBox #currentItem {width: 150px; display: flex; align-items: center;}
|
||||
[lang^=zh] #leftBar .selectBox #currentItem {width: 180px;}
|
||||
#leftBar .selectBox #currentItem > .text {overflow: hidden; text-align: left; flex: 0 1 100%;}
|
||||
</style>
|
||||
|
||||
<?php
|
||||
/* Release used for api space. */
|
||||
js::set('release', isset($release) ? $release : 0);
|
||||
js::set('versionLang', $lang->build->common);
|
||||
|
||||
|
||||
/* ObjectType and objectID used for other space. */
|
||||
js::set('objectType', isset($type) ? $type : '');
|
||||
js::set('objectID', isset($objectID) ? $objectID : '');
|
||||
?>
|
||||
|
||||
<div id="fileTree" class="file-tree">
|
||||
<?php if(isset($type) and $type == 'project'):?>
|
||||
<div class="project-tree">
|
||||
<div class="title"><i class="icon icon-project btn-info"> </i><?php echo $lang->projectCommon?></div>
|
||||
<div id="projectTree" data-id="project"></div>
|
||||
</div>
|
||||
<div class="execution-tree">
|
||||
<div class="title"><i class="icon icon-run btn-info"> </i><?php echo $lang->execution->common?></div>
|
||||
<div id="executionTree" data-id="execution"></div>
|
||||
</div>
|
||||
<div class="annex-tree">
|
||||
<div class="title"><i class="icon icon-paper-clip btn-info"> </i><?php echo $lang->files?></div>
|
||||
<div id="annexTree" data-id="annex"></div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
|
||||
<!-- Code for dropdown menu. -->
|
||||
<?php js::set('hasLibPriv', common::hasPriv('tree', 'browse') || common::hasPriv($app->rawModule, 'editLib') || common::hasPriv($app->rawModule, 'deleteLib'));?>
|
||||
<?php js::set('hasModulePriv', common::hasPriv('tree', 'browse'));?>
|
||||
<div class='hidden' id='dropDownData'>
|
||||
<ul class='libDorpdown'>
|
||||
<?php if(common::hasPriv('tree', 'browse')):?>
|
||||
<li data-method="addCataLib" data-has-children='%hasChildren%' data-libid='%libID%' data-moduleid="%moduleID%" data-type="add"><a><i class="icon icon-icon-add-directory"></i><?php echo $lang->doc->libDropdown['addModule'];?></a></li>
|
||||
<?php endif;?>
|
||||
<?php if(common::hasPriv($app->rawModule, 'editLib')):?>
|
||||
<li data-method="editLib"><a href='<?php echo inlink('editLib', 'libID=%libID%');?>' data-toggle='modal' data-type='iframe'><i class="icon icon-edit"></i><?php echo $lang->doc->libDropdown['editLib'];?></a></li>
|
||||
<?php endif;?>
|
||||
<?php if(common::hasPriv($app->rawModule, 'deleteLib')):?>
|
||||
<li data-method="deleteLib"><a href='<?php echo inlink('deleteLib', 'libID=%libID%');?>' target='hiddenwin'><i class="icon icon-trash"></i><?php echo $lang->doc->libDropdown['deleteLib'];?></a></li>
|
||||
<?php endif;?>
|
||||
</ul>
|
||||
<ul class='moduleDorpdown'>
|
||||
<?php if(common::hasPriv('tree', 'browse')):?>
|
||||
<li data-method="addCataBro" data-type="add" data-id="%moduleID%"><a><i class="icon icon-icon-add-directory"></i><?php echo $lang->doc->libDropdown['addSameModule'];?></a></li>
|
||||
<li data-method="addCataChild" data-type="add" data-id="%moduleID%" data-has-children='%hasChildren%'><a><i class="icon icon-icon-add-directory"></i><?php echo $lang->doc->libDropdown['addSubModule'];?></a></li>
|
||||
<li data-method="editCata" class='edit-module'><a data-href='<?php echo helper::createLink('tree', 'edit', "moduleID=%moduleID%&type=$app->rawModule");?>'><i class="icon icon-edit"></i><?php echo $lang->doc->libDropdown['editModule'];?></a></li>
|
||||
<li data-method="deleteCata"><a href='<?php echo helper::createLink('tree', 'delete', 'rootID=%libID%&moduleID=%moduleID%');?>' target='hiddenwin'><i class="icon icon-trash"></i><?php echo $lang->doc->libDropdown['delModule'];?></a></li>
|
||||
<?php endif;?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class='hidden' data-id="ulTreeModal">
|
||||
<ul data-id="liTreeModal" class="menu-active-primary menu-hover-primary has-input">
|
||||
<li data-id="insert" class="has-input flex-start">
|
||||
<input data-target="%target%" class="form-control input-tree overflow-hidden"></input>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
if(typeof linkParams == 'undefined') linkParams = '%s';
|
||||
|
||||
var moduleData = {
|
||||
"name" : "",
|
||||
"createType" : "",
|
||||
"libID" : "",
|
||||
"parentID" : "",
|
||||
"objectID" : "",
|
||||
"moduleType" : "",
|
||||
"order" : "",
|
||||
"isUpdate" : ""
|
||||
};
|
||||
|
||||
var versionsData = {};
|
||||
|
||||
/**
|
||||
* Render Dropdown dom.
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
function renderDropdown(option)
|
||||
{
|
||||
var libClass = '.libDorpdown';
|
||||
if(option.type != 'dropDownLibrary') libClass = '.moduleDorpdown';
|
||||
if($(libClass).find('li').length == 0) return '';
|
||||
var dropdown = '<ul class="dropdown-menu dropdown-in-tree" id="' + option.type + '" style="display: unset; left:' + option.left + 'px; top:' + option.top + 'px;">';
|
||||
dropdown += $(libClass).html().replace(/%libID%/g, option.libID).replace(/%moduleID%/g, option.moduleID).replace(/%hasChildren%/g, option.hasChildren);
|
||||
dropdown += '</ul>';
|
||||
|
||||
if(typeof(option.moduleType) != 'undefined' && option.moduleType == 'api') dropdown = dropdown.replace(/doc/g, 'api');
|
||||
return dropdown;
|
||||
}
|
||||
|
||||
/*
|
||||
* Redner version dropdown dom.
|
||||
*
|
||||
* @param versions array
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
function renderDropVersion(option)
|
||||
{
|
||||
var versions = option.versions;
|
||||
if (!versions || !versions.length)
|
||||
{
|
||||
$dropdown = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
var libId;
|
||||
var $lis = '<li><a href="###" data-id=0>' + versionLang + '</a></li>';
|
||||
for(i = 0; i< versions.length; i++)
|
||||
{
|
||||
var version = versions[i];
|
||||
$lis += '<li><a href="###" data-id="' + version.id + '">' + version.version+ '</a></li>';
|
||||
libId = version.lib;
|
||||
}
|
||||
var $dropdown = '<ul id="versionSwitcher" data-lib-id = "' + libId + '" class="dropdown-menu dropdown-in-tree" style="display: unset; left:' + option.left + 'px; top:' + option.top + 'px;">';
|
||||
$dropdown += $lis;
|
||||
$dropdown += '</ul>';
|
||||
}
|
||||
return $dropdown;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render tree dom.
|
||||
*
|
||||
* @param string treee
|
||||
* @param array treeeData
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function initTree(ele, treeData)
|
||||
{
|
||||
var imgObj = {
|
||||
'annex': 'annex',
|
||||
'api': 'interface',
|
||||
'lib': 'wiki-file-lib',
|
||||
'execution': 'wiki-file-lib'
|
||||
};
|
||||
ele.tree(
|
||||
{
|
||||
data: treeData,
|
||||
initialState: 'active',
|
||||
itemCreator: function($li, item)
|
||||
{
|
||||
var objectType = config.currentModule == 'api' ? item.objectType : item.type;
|
||||
var libClass = ['lib', 'annex', 'api', 'execution'].indexOf(objectType) !== -1 ? 'lib' : '';
|
||||
var hasChild = item.children ? !!item.children.length : false;
|
||||
var link = item.type != 'execution' || item.hasAction ? '###' : '#';
|
||||
var $item = '<a href="' + link + '" style="position: relative" data-has-children="' + hasChild + '" title="' + item.name + '" data-id="' + item.id + '" class="' + libClass + '" data-type="' + item.type + '" data-action="' + item.hasAction + '">';
|
||||
|
||||
$item += '<div class="text h-full w-full flex-start overflow-hidden">';
|
||||
if(libClass == 'lib') $item += '<div class="img-lib" style="background-image:url(static/svg/' + imgObj[item.type || 'lib'] + '.svg)"></div>';
|
||||
$item += '<div class="tree-text">';
|
||||
$item += item.name;
|
||||
$item += '</div>';
|
||||
|
||||
if(libClass == 'lib' && item.versions && item.versions.length)
|
||||
{
|
||||
var versionName = '';
|
||||
for(var i = 0; i < item.versions.length; i++)
|
||||
{
|
||||
if(item.versions[i].id == release) versionName = item.versions[i].version
|
||||
}
|
||||
$item += '<div class="tree-version-trigger" data-id="' + item.id + '">' + (versionName || versionLang) + '<span class="caret"></span></div>';
|
||||
}
|
||||
if((libClass != 'lib' && hasModulePriv) || (libClass == 'lib' && hasLibPriv)) $item += '<i class="icon icon-drop icon-ellipsis-v hidden tree-icon" data-isCatalogue="' + (libClass ? false : true) + '"></i>';
|
||||
$item += '</div>';
|
||||
$item += '</a>';
|
||||
if(item.versions) versionsData[item.id] = item.versions;
|
||||
|
||||
$li.append($item);
|
||||
$li.addClass(libClass);
|
||||
if(item.active) $li.addClass('active');
|
||||
}
|
||||
});
|
||||
|
||||
ele.on('click', '.icon-drop', function(e)
|
||||
{
|
||||
$('.dropdown-in-tree').css('display', 'none');
|
||||
var isCatalogue = $(this).attr('data-isCatalogue') === 'false' ? false : true;
|
||||
var dropDownID = isCatalogue ? 'dropDownCatalogue' : 'dropDownLibrary';
|
||||
var libID = 0;
|
||||
var moduleID = 0;
|
||||
var parentID = 0;
|
||||
var $module = $(this).closest('a');
|
||||
var hasChildren = $module.data('has-children');
|
||||
var moduleType = '';
|
||||
if($module.hasClass('lib'))
|
||||
{
|
||||
libID = $module.data('id');
|
||||
parentID = libID;
|
||||
moduleID = libID;
|
||||
moduleType = $module.data('type');
|
||||
}
|
||||
else
|
||||
{
|
||||
moduleID = $module.data('id');
|
||||
libID = $module.closest('.lib').data('id');
|
||||
moduleType = $module.closest('.lib').data('type');
|
||||
parentID = $module.closest('ul').closest('.lib').data('id');
|
||||
}
|
||||
|
||||
moduleData = {
|
||||
"libID" : libID,
|
||||
"parentID" : parentID,
|
||||
"objectID" : moduleID,
|
||||
"moduleType": ['lib', 'execution'].indexOf(moduleType) !== -1 ? 'doc' : moduleType,
|
||||
};
|
||||
|
||||
var option = {
|
||||
left : e.pageX,
|
||||
top : e.pageY,
|
||||
type : dropDownID,
|
||||
libID : libID,
|
||||
moduleID : moduleID,
|
||||
hasChildren : hasChildren,
|
||||
moduleType : moduleType
|
||||
};
|
||||
|
||||
var dropDown = renderDropdown(option);
|
||||
$(this).closest('body').append(dropDown);
|
||||
|
||||
e.stopPropagation();
|
||||
}).on('click', '.tree-version-trigger', function(e)
|
||||
{
|
||||
$('.dropdown-in-tree').css('display', 'none');
|
||||
var option = {
|
||||
left : e.pageX,
|
||||
top : e.pageY,
|
||||
versions : versionsData[$(this).data('id')]
|
||||
};
|
||||
var dropDown = renderDropVersion(option);
|
||||
$(this).closest('body').append(dropDown);
|
||||
e.stopPropagation();
|
||||
});
|
||||
}
|
||||
|
||||
if(Array.isArray(treeData))
|
||||
{
|
||||
initTree($('#fileTree'), treeData);
|
||||
}
|
||||
else
|
||||
{
|
||||
initTree($('#projectTree'), treeData.project);
|
||||
initTree($('#annexTree'), treeData.annex);
|
||||
if(treeData.execution&& treeData.execution.length)
|
||||
{
|
||||
initTree($('#executionTree'), treeData.execution);
|
||||
}
|
||||
else
|
||||
{
|
||||
$('.execution-tree').remove();
|
||||
}
|
||||
}
|
||||
|
||||
$('li.has-list > ul, #fileTree').addClass("menu-active-primary menu-hover-primary");
|
||||
|
||||
$('#fileTree').on('mousemove', 'a', function()
|
||||
{
|
||||
if($(this).data('type') == 'annex') return;
|
||||
if(!$(this).data('action')) return;
|
||||
|
||||
var libClass = '.libDorpdown';
|
||||
if(!$(this).hasClass('lib')) libClass = '.moduleDorpdown';
|
||||
|
||||
$(this).find('.icon').removeClass('hidden');
|
||||
$(this).addClass('show-icon'); if($(libClass).find('li').length == 0) return false;
|
||||
|
||||
}).on('mouseout', 'a', function()
|
||||
{
|
||||
$(this).find('.icon').addClass('hidden');
|
||||
$(this).removeClass('show-icon');
|
||||
}).on('click', 'a', function()
|
||||
{
|
||||
if(!$(this).data('action')) return;
|
||||
var isLib = $(this).hasClass('lib');
|
||||
var moduleID = $(this).data('id');
|
||||
var libID = 0;
|
||||
|
||||
if(isLib)
|
||||
{
|
||||
if($(this).data('type') == 'annex' && !canViewFiles) return false;
|
||||
|
||||
libID = moduleID;
|
||||
moduleID = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
libID = $(this).closest('.lib').data('id');
|
||||
}
|
||||
|
||||
console.log(libID, moduleID);
|
||||
return lcatePage(libID, moduleID, $(this).data('type'));
|
||||
});
|
||||
|
||||
/**
|
||||
* Lcate page.
|
||||
*
|
||||
* @param int libID
|
||||
* @param int moduleID
|
||||
* @param string type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function lcatePage(libID, moduleID, type)
|
||||
{
|
||||
|
||||
linkParams = linkParams.replace('%s', '&libID=' + libID + '&moduleID=' + moduleID);
|
||||
if(config.currentModule == 'api') linkParams = linkParams.substring(1);
|
||||
|
||||
location.href = type == 'annex' ? createLink(config.currentModule, 'showFiles', 'type=' + objectType + '&objectID=' + objectID) : createLink(config.currentModule, config.currentModule == 'api' ? 'index' : 'tableContents', linkParams);
|
||||
}
|
||||
|
||||
$('body').on('click', function()
|
||||
{
|
||||
$('.dropdown-in-tree').remove();
|
||||
}).on('click', '.sidebar-toggle', function()
|
||||
{
|
||||
var $icon = $(this).find('.icon');
|
||||
if($('#sideBar').hasClass('hidden'))
|
||||
{
|
||||
$icon.addClass('icon-angle-left');
|
||||
$icon.removeClass('icon-angle-right');
|
||||
$('#sideBar').removeClass('hidden');
|
||||
}
|
||||
else
|
||||
{
|
||||
$icon.addClass('icon-angle-right');
|
||||
$icon.removeClass('icon-angle-left');
|
||||
$('#sideBar').addClass('hidden');
|
||||
}
|
||||
|
||||
var $docListForm = $('#docListForm').data('zui.table');
|
||||
$docListForm.fixHeader();
|
||||
$docListForm.fixFooter();
|
||||
}).on('click', '.dropdown-in-tree li', function(e)
|
||||
{
|
||||
var item = $(this).data();
|
||||
if($(this).hasClass('edit-module'))
|
||||
{
|
||||
var link = $(this).find('a').data('href');
|
||||
if(typeof(moduleData.moduleType) != 'undefined' && moduleData.moduleType == 'api') link = link.replace('doc', 'api');
|
||||
new $.zui.ModalTrigger({
|
||||
keyboard : true,
|
||||
type : 'ajax',
|
||||
url : link
|
||||
}).show();
|
||||
}
|
||||
if(item.type !== 'add') return;
|
||||
|
||||
var $item = $(this);
|
||||
moduleData.parentID = 0;
|
||||
moduleData.isUpdate = false;
|
||||
moduleData.createType = 'child';
|
||||
switch(item.method)
|
||||
{
|
||||
case 'addCataLib' :
|
||||
if(item.hasChildren)
|
||||
{
|
||||
var $input = $('[data-id=liTreeModal]').html();
|
||||
var $rootDom = $('[data-id=' + item.moduleid + ']a + ul');
|
||||
$rootDom.append($input);
|
||||
$rootDom.closest('.tree').data('zui.tree').expand($('li[data-id="' + item.libid + '"]'));
|
||||
}
|
||||
else
|
||||
{
|
||||
var $input = $('[data-id=ulTreeModal]').html();
|
||||
var $rootDom = $('[data-id=' + item.libid + ']a');
|
||||
var $li = $rootDom.parent();
|
||||
moduleData.isUpdate = true;
|
||||
$rootDom.after($input);
|
||||
$li.addClass('open in has-list');
|
||||
}
|
||||
$rootDom.parent().find('input').focus();
|
||||
break;
|
||||
case 'addCataBro' :
|
||||
moduleData.createType = 'same';
|
||||
var $input = $('[data-id=liTreeModal]').html();
|
||||
var $rootDom = $('#fileTree li[data-id=' + item.id + ']');
|
||||
$rootDom.after($input);
|
||||
$rootDom.closest('ul').find('.has-input').css('padding-left', '0');
|
||||
$('#fileTree').find('input').focus();
|
||||
break;
|
||||
case 'addCataChild' :
|
||||
moduleData.parentID = item.id;
|
||||
if(item.hasChildren)
|
||||
{
|
||||
var $input = $('[data-id=liTreeModal]').html();
|
||||
var $rootDom = $('#fileTree [data-id=' + item.id + ']a + ul');
|
||||
var $rootDom = $('#fileTree [data-id=' + item.id + ']a + ul');
|
||||
$rootDom.closest('.tree').data('zui.tree').expand($('li[data-id="' + item.id + '"]'));
|
||||
}
|
||||
else
|
||||
{
|
||||
var $input = $('[data-id=ulTreeModal]').html();
|
||||
var $rootDom = $('#fileTree [data-id=' + item.id + ']li');
|
||||
moduleData.isUpdate = true;
|
||||
$rootDom.addClass('open in has-list');
|
||||
}
|
||||
|
||||
$rootDom.append($input);
|
||||
$rootDom.find('input').focus();
|
||||
break;
|
||||
}
|
||||
}).on('click', '#versionSwitcher a', function()
|
||||
{
|
||||
var $item = $(this);
|
||||
linkParams = linkParams.replace('%s', '&libID=' + $item.closest('ul').data('libId') + '&moduleID=0&apiID=0&version=0&release=' + $item.data('id'));
|
||||
location.href = createLink(config.currentModule, 'index', linkParams);
|
||||
}).on('blur', '.file-tree input.input-tree', function()
|
||||
{
|
||||
var $input = $(this);
|
||||
var $tree = $input.closest('.tree');
|
||||
var value = $input.val();
|
||||
if(!value)
|
||||
{
|
||||
$input.closest('[data-id=insert]').remove();
|
||||
$('.file-tree [data-id="liTreeModal"]').remove();
|
||||
return;
|
||||
}
|
||||
|
||||
moduleData.name = value;
|
||||
$.post(createLink('tree', 'ajaxCreateModule'), moduleData, function(result)
|
||||
{
|
||||
result = JSON.parse(result);
|
||||
if(result.result == 'fail')
|
||||
{
|
||||
bootbox.alert(
|
||||
result.message[0],
|
||||
function()
|
||||
{
|
||||
setTimeout(function()
|
||||
{
|
||||
$('.file-tree .input-tree').focus()
|
||||
}, 10)
|
||||
}
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
var module = result.module;
|
||||
return lcatePage(module.root, module.id, 'doc');
|
||||
});
|
||||
}).on('keydown', '.file-tree input.input-tree', function(e)
|
||||
{
|
||||
if(e.keyCode == 13) $(this).trigger('blur');
|
||||
});
|
||||
})
|
||||
</script>
|
||||
@@ -11,12 +11,47 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class="main-row fade" id="mainRow">
|
||||
<div class="main-col" data-min-width="400">
|
||||
<?php js::set('treeData', $libTree);?>
|
||||
<?php js::set('linkParams', "type=$type&objectID=$objectID%s");?>
|
||||
<?php js::set('docLang', $lang->doc);?>
|
||||
<?php js::set('libType', 'annex');?>
|
||||
<?php js::set('canViewFiles', common::hasPriv('doc', 'showfiles'));?>
|
||||
<?php js::set('type', $type);?>
|
||||
<?php js::set('tab', $this->app->tab);?>
|
||||
<?php js::set('searchLink', helper::createLink('doc', 'showFiles', "type=$type&objectID=$objectID&viewType=$viewType&orderBy=id_desc&recTotal=0&recPerPage=20&pageID=1&searchTitle=%s"));?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div id="leftBar" class="btn-toolbar pull-left">
|
||||
<?php echo $objectDropdown;?>
|
||||
<div class='btn-group searchBox'>
|
||||
<form class="input-control has-icon-right table-col not-watch" method="post">
|
||||
<?php echo html::input('title', $searchTitle, "class='form-control' placeholder='{$lang->doc->fileTitle}'");?>
|
||||
<?php echo html::submitButton("<i class='icon icon-search'></i>", '', "btn btn-icon btn-link input-control-icon-right");?>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<div class='btn-group'>
|
||||
<?php echo html::a(inlink('showFiles', "type=$type&objectID=$objectID&viewType=list&orderBy=$orderBy&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}&searchTitle=$searchTitle"), "<i class='icon icon-bars'></i>", '', "title={$this->lang->doc->browseTypeList['list']} class='btn btn-icon" . ($viewType == 'list' ? ' text-primary' : '') . "' data-app='{$this->app->tab}'");?>
|
||||
<?php echo html::a(inlink('showFiles', "type=$type&objectID=$objectID&viewType=card&orderBy=$orderBy&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}&searchTitle=$searchTitle"), "<i class='icon icon-cards-view'></i>", '', "title={$this->lang->doc->browseTypeList['grid']} class='btn btn-icon" . ($viewType != 'list' ? ' text-primary' : '') . "' data-app='{$this->app->tab}'");?>
|
||||
</div>
|
||||
<?php
|
||||
if(common::hasPriv('doc', 'createLib'))
|
||||
{
|
||||
echo html::a(helper::createLink('doc', 'createLib', "type=$type&objectID=$objectID"), '<i class="icon icon-plus"></i> ' . $this->lang->doc->createLib, '', 'class="btn btn-secondary iframe" data-width="800px"');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main-row fade <?php if(!empty($libTree)) echo 'flex';?>" id="mainContent">
|
||||
<div id='sideBar' class="panel side side-col col overflow-auto" data-min-width="150">
|
||||
<?php include '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" data-min-width="500">
|
||||
<?php if($viewType == 'list'):?>
|
||||
<?php if(!empty($files)):?>
|
||||
<div class='main-table'>
|
||||
<table class="table has-sort-head">
|
||||
<table class="table has-sort-head" id='#filesTable'>
|
||||
<thead>
|
||||
<tr>
|
||||
<?php $this->app->rawMethod = 'showfiles';?>
|
||||
@@ -24,7 +59,7 @@
|
||||
<th class="c-id"><?php common::printOrderLink('id', $orderBy, $vars, $lang->doc->id);?></th>
|
||||
<th class="c-name"><?php common::printOrderLink('title', $orderBy, $vars, $lang->doc->fileTitle);?></th>
|
||||
<th class="c-source"><?php common::printOrderLink('objectID', $orderBy, $vars, $lang->doc->source);?></th>
|
||||
<th class="c-size"><?php common::printOrderLink('extension', $orderBy, $vars, $lang->doc->extension);?></th>
|
||||
<th class="c-type"><?php common::printOrderLink('extension', $orderBy, $vars, $lang->doc->extension);?></th>
|
||||
<th class="c-size"><?php common::printOrderLink('size', $orderBy, $vars, $lang->doc->size);?></th>
|
||||
<th class="c-size"><?php common::printOrderLink('addedBy', $orderBy, $vars, $lang->doc->addedBy);?></th>
|
||||
<th class="c-size"><?php common::printOrderLink('addedDate', $orderBy, $vars, $lang->doc->addedDate);?></th>
|
||||
@@ -84,8 +119,8 @@
|
||||
<div class='col'>
|
||||
<div class='lib-file'>
|
||||
<?php
|
||||
$imageSize = $this->loadModel('file')->getImageSize($file);
|
||||
$imageWidth = $imageSize[0];
|
||||
$imageSize = $this->file->getImageSize($file);
|
||||
$imageWidth = isset($imageSize[0]) ? $imageSize[0] : 0;
|
||||
|
||||
$fileID = $file->id;
|
||||
$url = helper::createLink('file', 'download', 'fileID=' . $fileID);
|
||||
@@ -140,8 +175,42 @@
|
||||
<?php endif?>
|
||||
</div>
|
||||
</div>
|
||||
<?php js::set('type', $type);?>
|
||||
<?php js::set('tab', $this->app->tab);?>
|
||||
<div class='hidden' id='dropDownData'>
|
||||
<ul class='libDorpdown'>
|
||||
<?php if(common::hasPriv('tree', 'browse')):?>
|
||||
<li data-method="addCataLib" data-has-children='%hasChildren%' data-libid='%libID%' data-moduleid="%moduleID%" data-type="add"><a><i class="icon icon-controls"></i><?php echo $lang->doc->libDropdown['addModule'];?></a></li>
|
||||
<?php endif;?>
|
||||
<?php if(common::hasPriv('doc', 'editLib')):?>
|
||||
<li data-method="editLib"><a href='<?php echo inlink('editLib', 'libID=%libID%');?>' data-toggle='modal' data-type='iframe'><i class="icon icon-edit"></i><?php echo $lang->doc->libDropdown['editLib'];?></a></li>
|
||||
<?php endif;?>
|
||||
<?php if(common::hasPriv('doc', 'deleteLib')):?>
|
||||
<li data-method="deleteLib"><a href='<?php echo inlink('deleteLib', 'libID=%libID%');?>' target='hiddenwin'><i class="icon icon-trash"></i><?php echo $lang->doc->libDropdown['deleteLib'];?></a></li>
|
||||
<?php endif;?>
|
||||
</ul>
|
||||
<ul class='moduleDorpdown'>
|
||||
<?php if(common::hasPriv('tree', 'browse')):?>
|
||||
<li data-method="addCataBro" data-type="add" data-id="%moduleID%"><a><i class="icon icon-controls"></i><?php echo $lang->doc->libDropdown['addSameModule'];?></a></li>
|
||||
<li data-method="addCataChild" data-type="add" data-id="%moduleID%" data-has-children='%hasChildren%'><a><i class="icon icon-edit"></i><?php echo $lang->doc->libDropdown['addSubModule'];?></a></li>
|
||||
<li data-method="editCata" class='edit-module'><a data-href='<?php echo helper::createLink('tree', 'edit', 'moduleID=%moduleID%&type=doc');?>'><i class="icon icon-edit"></i><?php echo $lang->doc->libDropdown['editModule'];?></a></li>
|
||||
<li data-method="deleteCata"><a href='<?php echo helper::createLink('tree', 'delete', 'rootID=%libID%&moduleID=%moduleID%');?>' target='hiddenwin'><i class="icon icon-trash"></i><?php echo $lang->doc->libDropdown['delModule'];?></a></li>
|
||||
<?php endif;?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class='hidden' data-id="ulTreeModal">
|
||||
<ul data-id="liTreeModal" class="menu-active-primary menu-hover-primary has-input">
|
||||
<li data-id="insert" class="has-input">
|
||||
<input data-target="%target%" class="form-control input-tree"></input>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="hidden" data-id="aTreeModal">
|
||||
<a href="###" style="position: relative" data-has-children="false" data-action="true" title="%name%" data-id="%id%">
|
||||
<div class="text h-full w-full flex-between overflow-hidden" style="position: relative;">
|
||||
<span style="padding-left: 5px;">%name%</span>
|
||||
<i class="icon icon-drop icon-ellipsis-v tree-icon hidden" data-iscatalogue="true"></i>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<script>
|
||||
<?php $sessionString = session_name() . '=' . session_id();?>
|
||||
function downloadFile(fileID, extension, imageWidth)
|
||||
|
||||
@@ -11,126 +11,80 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php js::set('moduleTree', $moduleTree);?>
|
||||
<?php js::set('treeData', $libTree);?>
|
||||
<?php js::set('linkParams', "type=$type&objectID=$objectID%s&browseType=&orderBy=$orderBy");?>
|
||||
<?php js::set('docLang', $lang->doc);?>
|
||||
<?php
|
||||
$sideLibs = array();
|
||||
foreach($lang->doclib->tabList as $libType => $typeName) $sideLibs[$libType] = $this->doc->getLimitLibs($libType);
|
||||
$allModules = $this->loadModel('tree')->getDocStructure();
|
||||
<?php js::set('libType', $libType);?>
|
||||
<?php js::set('canViewFiles', common::hasPriv('doc', 'showfiles'));?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div id="leftBar" class="btn-toolbar pull-left">
|
||||
<?php echo $objectDropdown;?>
|
||||
<?php if(!empty($libTree)):?>
|
||||
<?php foreach($lang->doc->featureBar['tableContents'] as $barType => $barName):?>
|
||||
<?php $active = $barType == $browseType ? 'btn-active-text' : '';?>
|
||||
<?php echo html::a($this->createLink('doc', 'tableContents', "type=$type&objectID=$objectID&libID=$libID&moduleID=$moduleID&browseType=$barType"), $barName, '', "class='btn btn-link $active' id='{$barType}Tab'");?>
|
||||
<?php endforeach;?>
|
||||
<a class="btn btn-link querybox-toggle" id='bysearchTab'><i class="icon icon-search muted"></i> <?php echo $lang->doc->searchDoc;?></a>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php
|
||||
if($canExport)
|
||||
{
|
||||
echo html::a($this->createLink('doc', $exportMethod, "libID=$libID&docID=0", 'html', true), "<i class='icon-export muted'> </i>" . $lang->export, '', "class='btn btn-link export' id='{$exportMethod}'");
|
||||
}
|
||||
|
||||
$sideSubLibs = array();
|
||||
$sideSubLibs['product'] = $this->doc->getSubLibGroups('product', array_keys($sideLibs['product']));
|
||||
$sideSubLibs['execution'] = $this->doc->getSubLibGroups('execution', array_keys($sideLibs['execution']));
|
||||
if($this->methodName != 'browse')
|
||||
{
|
||||
$browseType = '';
|
||||
$moduleID = '';
|
||||
}
|
||||
if(empty($type)) $type = 'product';
|
||||
?>
|
||||
<div class="cell<?php if($browseType == 'bySearch') echo ' show';?>" id="queryBox" data-module=<?php echo $type . 'Doc';?>></div>
|
||||
<div class="main-content">
|
||||
<div class="cell" id="<?php echo $type;?>">
|
||||
<div class="detail">
|
||||
<li class="detail-title"><?php echo $lang->doc->tableContents;?></li>
|
||||
<?php
|
||||
$canEditLib = common::hasPriv('doc', 'editLib');
|
||||
$canManageBook = common::hasPriv('doc', 'manageBook');
|
||||
$canManageMenu = common::hasPriv('tree', 'browse');
|
||||
$canEditLib = common::hasPriv('doc', 'editLib');
|
||||
$canDeleteLib = common::hasPriv('doc', 'deleteLib');
|
||||
if($type != 'book' and ($canManageMenu or $canEditLib or $canDeleteLib) and !empty($libs))
|
||||
{
|
||||
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-left'>";
|
||||
if($canManageMenu)
|
||||
{
|
||||
echo '<li>' . html::a($this->createLink('tree', 'browse', "rootID=$libID&view=doc¤tModuleID=0&branch=0&from={$this->app->tab}", '', true), '<i class="icon-cog-outline"></i> ' . $this->lang->doc->manageType, '', "class='iframe'") . '</li>';
|
||||
echo "<li class='divider'></li>";
|
||||
}
|
||||
if($canEditLib) echo '<li>' . html::a($this->createLink('doc', 'editLib', "rootID=$libID"), '<i class="icon-edit"></i> ' . $lang->doc->editLib, '', "class='iframe'") . '</li>';
|
||||
if($canDeleteLib) echo '<li>' . html::a($this->createLink('doc', 'deleteLib', "rootID=$libID&confirm=no&type=lib&from=tableContents"), '<i class="icon-trash"></i> ' . $lang->doc->deleteLib, 'hiddenwin') . '</li>';
|
||||
echo '</ul></div>';
|
||||
}
|
||||
if(common::hasPriv('doc', 'createLib'))
|
||||
{
|
||||
echo html::a(helper::createLink('doc', 'createLib', "type=$type&objectID=$objectID"), '<i class="icon icon-plus"></i> ' . $this->lang->doc->createLib, '', 'class="btn btn-secondary iframe" data-width="800px"');
|
||||
}
|
||||
|
||||
if($type == 'book' and ($canEditLib or $canManageBook) and !empty($libs))
|
||||
{
|
||||
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-left'>";
|
||||
if($canEditLib) echo '<li>' . html::a($this->createLink('doc', 'editLib', "rootID=$libID"), '<i class="icon-edit"></i> ' . $lang->doc->editBook, '', "class='iframe'") . '</li>';
|
||||
if($canManageBook) echo '<li>' . html::a($this->createLink('doc', 'manageBook', "bookID=$libID"), '<i class="icon-cog-outline"></i> ' . $lang->doc->manageBook) . '</li>';
|
||||
echo '</ul></div>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="detail">
|
||||
<?php if($moduleTree):?>
|
||||
<?php if($type == 'book'):?>
|
||||
<?php include './bookside.html.php';?>
|
||||
<?php else:?>
|
||||
<?php echo $moduleTree;?>
|
||||
<?php endif;?>
|
||||
<?php else:?>
|
||||
<div class="no-content"><img src="<?php echo $config->webRoot . 'theme/default/images/main/no_content.png'?>"/></div>
|
||||
<div class="notice text-muted"><?php echo (empty($libs) and $type == 'custom') ? $lang->doc->noLib : $lang->doc->noDoc;?></div>
|
||||
<div class="no-content-button">
|
||||
<?php
|
||||
$html = '';
|
||||
if($type == 'book' and common::hasPriv('doc', 'createLib'))
|
||||
{
|
||||
$html = html::a(helper::createLink('doc', 'createLib', "type=$type&objectID=$objectID"), '<i class="icon icon-plus"></i> ' . $lang->doc->createBook, '', 'class="btn btn-info btn-wide iframe"');
|
||||
}
|
||||
elseif(empty($libs) and $type == 'custom' and common::hasPriv('doc', 'createLib'))
|
||||
{
|
||||
$html = html::a(helper::createLink('doc', 'createLib', "type=$type&objectID=$objectID"), '<i class="icon icon-plus"></i> ' . $lang->doc->createLib, '', 'class="btn btn-info btn-wide iframe"');
|
||||
}
|
||||
elseif($libID and common::hasPriv('doc', 'create'))
|
||||
{
|
||||
$html = "<div class='dropdown' id='createDropdown'>";
|
||||
$html .= "<button class='btn btn-info btn-wide' type='button' data-toggle='dropdown'><i class='icon icon-plus'></i> " . $lang->doc->createAB . " <span class='caret'></span></button>";
|
||||
$html .= "<ul class='dropdown-menu' style='left:0px'>";
|
||||
foreach($this->lang->doc->typeList as $typeKey => $typeName)
|
||||
{
|
||||
$icon = zget($this->config->doc->iconList, $typeKey);
|
||||
$class = (strpos($this->config->doc->officeTypes, $typeKey) !== false or strpos($this->config->doc->textTypes, $typeKey) !== false) ? 'iframe' : '';
|
||||
$method = strpos($this->config->doc->textTypes, $typeKey) !== false ? 'createBasicInfo' : 'create';
|
||||
$html .= "<li>";
|
||||
$html .= html::a(helper::createLink('doc', $method, "objectType=$type&objectID=$objectID&libID=$libID&moduleID=0&type=$typeKey", '', $class ? true : false), "<i class='icon-$icon text-muted'></i> " . $typeName, '', "class='$class' data-app='{$this->app->tab}'");
|
||||
$html .= "</li>";
|
||||
if($typeKey == 'url') $html .= '<li class="divider"></li>';
|
||||
}
|
||||
$html .= "</ul></div>";
|
||||
}
|
||||
|
||||
echo $html;
|
||||
?>
|
||||
<?php
|
||||
if(!empty($libs))
|
||||
{
|
||||
if($type == 'book')
|
||||
{
|
||||
common::printLink('doc', 'manageBook', "bookID=$libID", $lang->doc->manageBook, '', "class='btn btn-info btn-wide'");
|
||||
}
|
||||
else
|
||||
{
|
||||
common::printLink('tree', 'browse', "rootID=$libID&view=doc¤tModuleID=0&branch=0&from={$this->app->tab}", $lang->doc->manageType, '', "class='btn btn-info btn-wide iframe'", '', true);
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
if($libType == 'api')
|
||||
{
|
||||
if(common::hasPriv('api', 'create')) echo html::a($this->createLink('api', 'create', "libID=$libID&moduleID=$moduleID", '', true), '<i class="icon icon-plus"></i> ' . $lang->api->createApi, '', 'class="btn btn-primary iframe" data-width="95%"');
|
||||
}
|
||||
elseif($libID and common::hasPriv('doc', 'create'))
|
||||
{
|
||||
echo $this->doc->printCreateBtn($lib, $type, $objectID, $moduleID);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('#pageNav .btn-group.angle-btn').click(function()
|
||||
{
|
||||
if($(this).hasClass('opened')) return;
|
||||
$(this).addClass('opened');
|
||||
|
||||
scrollToSelected();
|
||||
})
|
||||
</script>
|
||||
<div id='mainContent'class="fade <?php if(!empty($libTree)) echo 'flex';?>">
|
||||
<?php if(empty($libTree)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->doc->noLib;?></span>
|
||||
<?php
|
||||
if(common::hasPriv('doc', 'createLib'))
|
||||
{
|
||||
echo html::a(helper::createLink('doc', 'createLib', "type=$type&objectID=$objectID"), '<i class="icon icon-plus"></i> ' . $this->lang->doc->createLib, '', 'class="btn btn-info iframe"');
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div id='sideBar' class="panel side side-col col overflow-auto" data-min-width="150">
|
||||
<?php include '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" data-min-width="500">
|
||||
<div class="cell<?php if($browseType == 'bySearch') echo ' show';?>" style="min-width: 400px" id="queryBox" data-module=<?php echo $type . $libType . 'Doc';?>></div>
|
||||
<?php
|
||||
if($browseType == 'annex')
|
||||
{
|
||||
include 'showfiles.html.php';
|
||||
}
|
||||
elseif($libType == 'api')
|
||||
{
|
||||
include '../../api/view/apilist.html.php';
|
||||
}
|
||||
else
|
||||
{
|
||||
include 'doclist.html.php';
|
||||
}
|
||||
;?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -126,7 +126,7 @@ class execution extends control
|
||||
|
||||
if(!isset($_SESSION['limitedExecutions'])) $this->execution->getLimitedExecution();
|
||||
|
||||
if($executionID) $this->session->set("storyList", $this->createLink("execution", "story", "&executionID=" . $executionID));
|
||||
if($executionID) $this->session->set("storyList", $this->createLink("execution", "story", "&executionID=" . $executionID));
|
||||
|
||||
/* Set browse type. */
|
||||
$browseType = strtolower($status);
|
||||
|
||||
@@ -535,6 +535,7 @@ class executionModel extends model
|
||||
/* Create doc lib. */
|
||||
$this->app->loadLang('doc');
|
||||
$lib = new stdclass();
|
||||
$lib->project = $sprintProject;
|
||||
$lib->execution = $executionID;
|
||||
$lib->name = $type == 'stage' ? str_replace($this->lang->executionCommon, $this->lang->project->stage, $this->lang->doclib->main['execution']) : $this->lang->doclib->main['execution'];
|
||||
$lib->type = 'execution';
|
||||
@@ -1606,7 +1607,7 @@ class executionModel extends model
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param string $type all|sprint|stage|kanban
|
||||
* @param string $mode all|noclosed|stagefilter|withdelete|multiple|leaf|order_asc or empty
|
||||
* @param string $mode all|noclosed|stagefilter|withdelete|multiple|leaf|order_asc|empty|noprefix
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -1672,6 +1673,7 @@ class executionModel extends model
|
||||
{
|
||||
if(isset($allExecutions[$path])) $executionName .= '/' . $allExecutions[$path]->name;
|
||||
}
|
||||
if(strpos($mode, 'noprefix') !== false) $executionName = ltrim($executionName, '/');
|
||||
|
||||
$pairs[$execution->id] = $executionName;
|
||||
}
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
.fullscreen-close {top: 8px !important;}
|
||||
.btn.ajaxCollect > img {width: 20px;}
|
||||
|
||||
+2
-5
@@ -5,14 +5,11 @@ $('.ajaxCollect').click(function (event) {
|
||||
{
|
||||
if(response.status == 'yes')
|
||||
{
|
||||
obj.children('i').removeClass().addClass('icon icon-star text-yellow');
|
||||
obj.parent().prev().children('.file-name').children('i').remove('.icon');
|
||||
obj.parent().prev().children('.file-name').prepend('<i class="icon icon-star text-yellow"></i> ');
|
||||
obj.children('img').attr('src', 'static/svg/star.svg');
|
||||
}
|
||||
else
|
||||
{
|
||||
obj.children('i').removeClass().addClass('icon icon-star-empty');
|
||||
obj.parent().prev().children('.file-name').children('i').remove(".icon");
|
||||
obj.children('img').attr('src', 'static/svg/star-empty.svg');
|
||||
}
|
||||
}, 'json');
|
||||
return false;
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</thead>
|
||||
<tbody id='docTableList'>
|
||||
<?php foreach($docs as $doc):?>
|
||||
<?php $star = strpos($doc->collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
|
||||
<?php $star = strpos($doc->collector, ',' . $this->app->user->account . ',') !== false ? 'star' : 'star-empty';?>
|
||||
<?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>
|
||||
@@ -80,7 +80,7 @@
|
||||
<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'><i class='icon <?php echo $star;?>'></i></a>
|
||||
<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'")?>
|
||||
|
||||
@@ -29,11 +29,13 @@ $('#subNavbar li').not('[data-id=<?php echo $group;?>]').removeClass('active');
|
||||
</div>
|
||||
<div class='btn-toolbar pull-right child-position'>
|
||||
<?php if(common::hasPriv('pivot', 'export')):?>
|
||||
<a href="#" class="btn btn-link btn-export" disabled data-toggle="modal" data-target="#export"><?php echo '<i class="icon-export muted"> </i>' . $lang->export;?></a>
|
||||
<a href="#" class="btn btn-link btn-export hidden" data-toggle="modal" data-target="#export"><?php echo '<i class="icon-export muted"> </i>' . $lang->export;?></a>
|
||||
<?php endif;?>
|
||||
<?php common::printLink('pivot', 'browse', '', $lang->pivot->toDesign, '', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
</div>
|
||||
<?php $pivotPath = $this->app->getModuleExtPath('', 'pivot', 'view');?>
|
||||
<?php include $pivotPath['common'] . 'exportdata.html.php';?>
|
||||
<?php endif;?>
|
||||
|
||||
<div id='mainContent' class='main-row'>
|
||||
|
||||
@@ -963,6 +963,7 @@ class programplanModel extends model
|
||||
|
||||
/* Create doc lib. */
|
||||
$lib = new stdclass();
|
||||
$lib->project = $projectID;
|
||||
$lib->execution = $stageID;
|
||||
$lib->name = str_replace($this->lang->executionCommon, $this->lang->project->stage, $this->lang->doclib->main['execution']);
|
||||
$lib->type = 'execution';
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->programplan->PM;?> </th>
|
||||
<td colspan='2'><?php echo html::select('PM', $PMUsers, '', "class='form-control picker-select'");?></td>
|
||||
<td colspan='2'><?php echo html::select('PM', $PMUsers, $plan->PM, "class='form-control picker-select'");?></td>
|
||||
</tr>
|
||||
<?php if(isset($config->setPercent) and $config->setPercent == 1):?>
|
||||
<tr>
|
||||
|
||||
@@ -201,7 +201,7 @@ class project extends control
|
||||
{
|
||||
$project = $this->project->getByID($projectID);
|
||||
if(!$project->multiple) return;
|
||||
|
||||
|
||||
$executions = $this->loadModel('execution')->getByProject($projectID, 'undone', 0, true);
|
||||
$executionMembers = $this->dao->select('t1.root,t2.name')->from(TABLE_TEAM)->alias('t1')
|
||||
->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.root=t2.id')
|
||||
|
||||
@@ -1416,7 +1416,7 @@ class projectModel extends model
|
||||
$lib->name = $this->lang->doclib->main['project'];
|
||||
$lib->type = 'project';
|
||||
$lib->main = '1';
|
||||
$lib->acl = $project->acl != 'program' ? $project->acl : 'custom';
|
||||
$lib->acl = 'default';
|
||||
$lib->users = ',' . implode(',', array_filter($authorizedUsers)) . ',';
|
||||
$lib->vision = zget($project, 'vision', 'rnd');
|
||||
$this->dao->insert(TABLE_DOCLIB)->data($lib)->exec();
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#guideDialog .project-type.active img {border-color: #006AF1; border-width: 2px; margin-top: 0}
|
||||
#guideDialog .col:nth-child(-n+3) {margin-bottom: 15px;}
|
||||
@media screen and (max-width: 1366px){#guideDialog {width: 640px} #guideDialog .project-type-img.more-type {height: 108px;}}
|
||||
@media screen and (max-width: 1366px){[lang^='en'] #guideDialog .row .col-xs-4 {height: 200px;} [lang^='de'] #guideDialog .row .col-xs-4 {height: 200px;} [lang^='fr'] #guideDialog .row .col-xs-4 {height: 200px;}}
|
||||
</style>
|
||||
<div class='modal-content'>
|
||||
<div class='modal-body'>
|
||||
|
||||
@@ -49,7 +49,7 @@ class search extends control
|
||||
$_SESSION['searchParams']['module'] = $module;
|
||||
$this->search->initSession($module, $fields, $params);
|
||||
|
||||
if($module == 'trash' and $this->session->objectName)
|
||||
if(($module == 'trash' or substr($module, -3) == 'Doc') and $this->session->objectName)
|
||||
{
|
||||
$space = common::checkNotCN() ? ' ' : '';
|
||||
$this->lang->search->common = $this->lang->search->common . $space . $this->session->objectName;
|
||||
|
||||
@@ -763,7 +763,7 @@ class storyModel extends model
|
||||
->setDefault('deleteFiles', array())
|
||||
->add('id', $storyID)
|
||||
->add('lastEditedDate', $now)
|
||||
->setIF($specChanged, 'version', $oldStory->version + 1)
|
||||
->setIF($specChanged, 'version', (int)$oldStory->version + 1)
|
||||
->setIF($specChanged, 'reviewedBy', '')
|
||||
->setIF($specChanged, 'changedBy', $this->app->user->account)
|
||||
->setIF($specChanged, 'changedDate', $now)
|
||||
@@ -1481,7 +1481,7 @@ class storyModel extends model
|
||||
$story->closedReason = isset($data->closedReasons[$storyID]) ? $data->closedReasons[$storyID] : $oldStory->closedReason;
|
||||
$story->duplicateStory = isset($data->duplicateStories[$storyID]) ? $data->duplicateStories[$storyID] : $oldStory->duplicateStory;
|
||||
$story->childStories = isset($data->childStoriesIDList[$storyID]) ? $data->childStoriesIDList[$storyID] : $oldStory->childStories;
|
||||
$story->version = $story->title == $oldStory->title ? $oldStory->version : $oldStory->version + 1;
|
||||
$story->version = $story->title == $oldStory->title ? $oldStory->version : (int)$oldStory->version + 1;
|
||||
if($story->stage != $oldStory->stage) $story->stagedBy = (strpos('tested|verified|released|closed', $story->stage) !== false) ? $this->app->user->account : '';
|
||||
|
||||
if($story->title != $oldStory->title and $story->status != 'draft') $story->status = 'changing';
|
||||
|
||||
@@ -840,7 +840,7 @@ class testcaseModel extends model
|
||||
|
||||
list($stepChanged, $status) = $result;
|
||||
|
||||
$version = $stepChanged ? $oldCase->version + 1 : $oldCase->version;
|
||||
$version = $stepChanged ? (int)$oldCase->version + 1 : (int)$oldCase->version;
|
||||
|
||||
if(!empty($_POST['auto']))
|
||||
{
|
||||
@@ -889,8 +889,8 @@ class testcaseModel extends model
|
||||
$isLibCase = ($oldCase->lib and empty($oldCase->product));
|
||||
if($isLibCase)
|
||||
{
|
||||
$fromcaseVersion = $this->dao->select('fromCaseVersion')->from(TABLE_CASE)->where('fromCaseID')->eq($caseID)->fetch('fromCaseVersion');
|
||||
$fromcaseVersion += 1;
|
||||
$fromcaseVersion = $this->dao->select('fromCaseVersion')->from(TABLE_CASE)->where('fromCaseID')->eq($caseID)->fetch('fromCaseVersion');
|
||||
$fromcaseVersion = (int)$fromcaseVersion + 1;
|
||||
$this->dao->update(TABLE_CASE)->set('`fromCaseVersion`')->eq($fromcaseVersion)->where('`fromCaseID`')->eq($caseID)->exec();
|
||||
}
|
||||
|
||||
@@ -1224,8 +1224,8 @@ class testcaseModel extends model
|
||||
$isLibCase = ($oldCase->lib and empty($oldCase->product));
|
||||
if($isLibCase and $caseChanged)
|
||||
{
|
||||
$fromcaseVersion = $this->dao->select('fromCaseVersion')->from(TABLE_CASE)->where('fromCaseID')->eq($caseID)->fetch('fromCaseVersion');
|
||||
$fromcaseVersion += 1;
|
||||
$fromcaseVersion = $this->dao->select('fromCaseVersion')->from(TABLE_CASE)->where('fromCaseID')->eq($caseID)->fetch('fromCaseVersion');
|
||||
$fromcaseVersion = (int)$fromcaseVersion + 1;
|
||||
$this->dao->update(TABLE_CASE)->set('`fromCaseVersion`')->eq($fromcaseVersion)->where('`fromCaseID`')->eq($caseID)->exec();
|
||||
}
|
||||
}
|
||||
@@ -1566,7 +1566,7 @@ class testcaseModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
$version = $stepChanged ? $oldCase->version + 1 : $oldCase->version;
|
||||
$version = $stepChanged ? (int)$oldCase->version + 1 : (int)$oldCase->version;
|
||||
$caseData->version = $version;
|
||||
$changes = common::createChanges($oldCase, $caseData);
|
||||
if($caseData->story != $oldCase->story) $caseData->storyVersion = zget($storyVersionPairs, $caseData->story, 1);
|
||||
@@ -1727,7 +1727,7 @@ class testcaseModel extends model
|
||||
foreach($libCases as $libCaseID => $case)
|
||||
{
|
||||
$case->fromCaseID = $case->id;
|
||||
$case->fromCaseVersion = $case->version;
|
||||
$case->fromCaseVersion = (int)$case->version;
|
||||
$case->product = $productID;
|
||||
if(isset($data->module[$case->id])) $case->module = $data->module[$case->id];
|
||||
if(isset($data->branch[$case->id])) $case->branch = $data->branch[$case->id];
|
||||
@@ -1845,7 +1845,7 @@ class testcaseModel extends model
|
||||
|
||||
$libCase->lastEditedBy = $this->app->user->account;
|
||||
$libCase->lastEditedDate = helper::now();
|
||||
$libCase->version = $libCases[$caseID][$libCaseID]->version + 1;
|
||||
$libCase->version = (int)$libCases[$caseID][$libCaseID]->version + 1;
|
||||
$this->dao->update(TABLE_CASE)->data($libCase)->autoCheck()->where('id')->eq((int)$libCaseID)->exec();
|
||||
|
||||
$this->action->create('case', $libCaseID, 'updatetolib', '', $caseID);
|
||||
|
||||
+16
-1
@@ -387,7 +387,6 @@ class tree extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->tree->update($moduleID);
|
||||
echo js::alert($this->lang->tree->successSave);
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
|
||||
@@ -689,4 +688,20 @@ class tree extends control
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create module by ajax.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxCreateModule()
|
||||
{
|
||||
if(!helper::isAjaxRequest()) return $this->send(array('result' => 'fail', 'message' => ''));;
|
||||
|
||||
$module = $this->tree->createModule();
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'module' => $module));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ $lang->tree->noSubmodule = "There are no copyable submodules under the
|
||||
$lang->tree->successSave = 'Saved.';
|
||||
$lang->tree->successFixed = 'Fixed.';
|
||||
$lang->tree->repeatName = 'The name "%s" exists!';
|
||||
$lang->tree->repeatDirName = 'The name "%s" exists!';
|
||||
$lang->tree->shouldNotBlank = 'Module name should not be blank!';
|
||||
$lang->tree->syncProductModule = 'Sync Module';
|
||||
|
||||
@@ -66,7 +67,7 @@ $lang->tree->branch = 'Platform/Branch';
|
||||
$lang->tree->path = 'Pfad';
|
||||
$lang->tree->type = 'Typ';
|
||||
$lang->tree->parent = 'Übergeordnet';
|
||||
$lang->tree->parentCate = 'Parent Category';
|
||||
$lang->tree->parentCate = 'Parent Directory';
|
||||
$lang->tree->child = 'Untergeordnet';
|
||||
$lang->tree->subCategory = 'SubCategory';
|
||||
$lang->tree->editCategory = 'Kategorie bearbeiten';
|
||||
@@ -78,6 +79,7 @@ $lang->tree->short = 'Sortierung';
|
||||
$lang->tree->all = 'Alle Module';
|
||||
$lang->tree->executionDoc = "{$lang->executionCommon} Dok";
|
||||
$lang->tree->product = $lang->productCommon;
|
||||
$lang->tree->editDir = "Edit Directory";
|
||||
|
||||
$lang->tree->emptyHistory = "No History";
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ $lang->tree->noSubmodule = "There are no copyable submodules under the
|
||||
$lang->tree->successSave = 'Saved.';
|
||||
$lang->tree->successFixed = 'Fixed.';
|
||||
$lang->tree->repeatName = 'The name "%s" exists!';
|
||||
$lang->tree->repeatDirName = 'The name "%s" exists!';
|
||||
$lang->tree->shouldNotBlank = 'Module name should not be blank!';
|
||||
$lang->tree->syncProductModule = 'Sync Module';
|
||||
|
||||
@@ -66,7 +67,7 @@ $lang->tree->branch = 'Platform/Branch';
|
||||
$lang->tree->path = 'Path';
|
||||
$lang->tree->type = 'Type';
|
||||
$lang->tree->parent = 'Parent Module';
|
||||
$lang->tree->parentCate = 'Parent Category';
|
||||
$lang->tree->parentCate = 'Parent Directory';
|
||||
$lang->tree->child = 'Children';
|
||||
$lang->tree->subCategory = 'SubCategory';
|
||||
$lang->tree->editCategory = 'Edit Category';
|
||||
@@ -78,6 +79,7 @@ $lang->tree->short = 'Abbr.';
|
||||
$lang->tree->all = 'All Modules';
|
||||
$lang->tree->executionDoc = "{$lang->executionCommon} Document";
|
||||
$lang->tree->product = $lang->productCommon;
|
||||
$lang->tree->editDir = "Edit Directory";
|
||||
|
||||
$lang->tree->emptyHistory = "No History";
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ $lang->tree->noSubmodule = "There are no copyable submodules under the
|
||||
$lang->tree->successSave = 'Sauvé.';
|
||||
$lang->tree->successFixed = 'Corrigé.';
|
||||
$lang->tree->repeatName = 'Le nom "%s" existe déjà !';
|
||||
$lang->tree->repeatDirName = 'The name "%s" exists!';
|
||||
$lang->tree->shouldNotBlank = 'Module name should not be blank!';
|
||||
$lang->tree->syncProductModule = 'Sync Module';
|
||||
|
||||
@@ -66,7 +67,7 @@ $lang->tree->branch = 'Plateforme/Branche';
|
||||
$lang->tree->path = 'Chemin';
|
||||
$lang->tree->type = 'Type';
|
||||
$lang->tree->parent = 'Module Parent';
|
||||
$lang->tree->parentCate = 'Catégorie Parente';
|
||||
$lang->tree->parentCate = 'Parent Directory';
|
||||
$lang->tree->child = 'Enfants';
|
||||
$lang->tree->subCategory = 'SubCategory';
|
||||
$lang->tree->editCategory = 'Modifier la catégorie';
|
||||
@@ -78,6 +79,7 @@ $lang->tree->short = 'Abbr.';
|
||||
$lang->tree->all = 'Tous les Modules';
|
||||
$lang->tree->executionDoc = "Document {$lang->executionCommon}";
|
||||
$lang->tree->product = $lang->productCommon;
|
||||
$lang->tree->editDir = "Edit Directory";
|
||||
|
||||
$lang->tree->emptyHistory = "Pas Historique";
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ $lang->tree->noSubmodule = "当前模块下没有可复制的子模块
|
||||
$lang->tree->successSave = '成功保存';
|
||||
$lang->tree->successFixed = '成功修正数据!';
|
||||
$lang->tree->repeatName = '模块名“%s”已经存在!';
|
||||
$lang->tree->repeatDirName = '目录名“%s”已经存在!';
|
||||
$lang->tree->shouldNotBlank = '模块名不能为空格!';
|
||||
$lang->tree->syncProductModule = "同步{$lang->productCommon}模块";
|
||||
|
||||
@@ -66,7 +67,7 @@ $lang->tree->branch = '平台/分支';
|
||||
$lang->tree->path = '路径';
|
||||
$lang->tree->type = '类型';
|
||||
$lang->tree->parent = '上级模块';
|
||||
$lang->tree->parentCate = '上级分类';
|
||||
$lang->tree->parentCate = '上级目录';
|
||||
$lang->tree->child = '子模块';
|
||||
$lang->tree->subCategory = '子分类';
|
||||
$lang->tree->editCategory = '编辑分类';
|
||||
@@ -78,6 +79,7 @@ $lang->tree->short = '简称';
|
||||
$lang->tree->all = '所有模块';
|
||||
$lang->tree->executionDoc = "{$lang->executionCommon}文档";
|
||||
$lang->tree->product = "所属{$lang->productCommon}";
|
||||
$lang->tree->editDir = "编辑目录";
|
||||
|
||||
$lang->tree->emptyHistory = "暂时没有历史记录。";
|
||||
|
||||
|
||||
@@ -2016,6 +2016,9 @@ class treeModel extends model
|
||||
$this->dao->update(TABLE_TICKET)->set('module')->eq($module->parent)->where('module')->in($childs)->exec();
|
||||
$cookieName = 'ticketModule';
|
||||
break;
|
||||
case 'doc':
|
||||
$this->dao->update(TABLE_DOC)->set('`module`')->eq($module->parent)->where('`module`')->in($childs)->exec();
|
||||
break;
|
||||
}
|
||||
if(strpos($this->session->{$module->type . 'List'}, 'param=' . $moduleID)) $this->session->set($module->type . 'List', str_replace('param=' . $moduleID, 'param=0', $this->session->{$module->type . 'List'}));
|
||||
if($cookieName) setcookie($cookieName, 0, time() - 3600, $this->config->webRoot, '', $this->config->cookieSecure, false);
|
||||
@@ -2297,4 +2300,88 @@ class treeModel extends model
|
||||
$this->lang->module->name = $this->lang->tree->wordName;
|
||||
$this->lang->module->short = $this->lang->tree->short;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create module.
|
||||
*
|
||||
* @access public
|
||||
* @return bool|object
|
||||
*/
|
||||
public function createModule()
|
||||
{
|
||||
$data = fixer::input('post')
|
||||
->setDefault('name', '')
|
||||
->setDefault('createType', 'child')
|
||||
->setDefault('objectID', 0)
|
||||
->setDefault('order', 10)
|
||||
->get();
|
||||
|
||||
$module = new stdClass();
|
||||
$module->root = zget($data, 'libID', 0);
|
||||
$module->type = zget($data, 'moduleType', 'doc');
|
||||
$module->parent = zget($data, 'parentID', 0);
|
||||
$module->name = strip_tags(trim($data->name));
|
||||
$module->branch = 0;
|
||||
$module->short = '';
|
||||
$module->order = $data->order;
|
||||
|
||||
if(empty($module->name))
|
||||
{
|
||||
dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->tree->dir);
|
||||
return false;
|
||||
}
|
||||
|
||||
if($data->createType == 'same')
|
||||
{
|
||||
$baseModule = $this->getByID($data->objectID);
|
||||
if(!empty($baseModule))
|
||||
{
|
||||
$module->parent = $baseModule->parent;
|
||||
$module->order = $baseModule->order;
|
||||
}
|
||||
}
|
||||
elseif($data->createType == 'child')
|
||||
{
|
||||
$maxOrder = $this->dao->select('`order`')->from(TABLE_MODULE)
|
||||
->where('root')->eq($module->root)
|
||||
->andWhere('parent')->eq($module->parent)
|
||||
->andWhere('type')->eq($module->type)
|
||||
->orderBy('order_desc')
|
||||
->limit(1)
|
||||
->fetch('order');
|
||||
|
||||
$module->order = (int)$maxOrder + 10;
|
||||
}
|
||||
|
||||
$repeatName = $this->checkUnique($module);
|
||||
if($repeatName)
|
||||
{
|
||||
dao::$errors[] = sprintf($this->lang->tree->repeatDirName, $repeatName);
|
||||
return false;
|
||||
}
|
||||
|
||||
$parent = $this->getByID($module->parent);
|
||||
$module->grade = $module->parent ? $parent->grade + 1 : 1;
|
||||
$this->dao->insert(TABLE_MODULE)->data($module)->exec();
|
||||
$moduleID = $this->dao->lastInsertID();
|
||||
|
||||
if($data->createType == 'same')
|
||||
{
|
||||
$this->dao->update(TABLE_MODULE)
|
||||
->set('`order` = `order` + 10')
|
||||
->where('`root`')->eq($module->root)
|
||||
->andWhere('`parent`')->eq($module->parent)
|
||||
->andWhere('`type`')->eq($module->type)
|
||||
->andWhere('`order`')->gt($module->order)
|
||||
->exec();
|
||||
|
||||
$module->order += 10;
|
||||
}
|
||||
|
||||
$modulePath = "$moduleID,";
|
||||
if($module->parent) $modulePath = $parent->path . $modulePath;
|
||||
$this->dao->update(TABLE_MODULE)->set('`path`')->eq($modulePath)->set('`order`')->eq($module->order)->where('id')->eq($moduleID)->limit(1)->exec();
|
||||
|
||||
return $this->getByID($moduleID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ if(isset($pageCSS)) css::internal($pageCSS);
|
||||
<strong>
|
||||
<?php
|
||||
$lblEditTree = $lang->tree->edit;
|
||||
if($type == 'doc') $lblEditTree = $lang->doc->editType;
|
||||
if($type == 'doc' or $type == 'api') $lblEditTree = $lang->tree->editDir;
|
||||
if($type == 'line') $lblEditTree = $lang->tree->manageLine;
|
||||
echo $lblEditTree;
|
||||
?>
|
||||
@@ -57,7 +57,7 @@ if(isset($pageCSS)) css::internal($pageCSS);
|
||||
<?php endif;?>
|
||||
<?php if($module->type != 'line'):?>
|
||||
<tr <?php if($hidden) echo "style='display:none'";?>>
|
||||
<th class='thWidth'><?php echo ($type == 'doc') ? $lang->tree->parentCate : $lang->tree->parent;?></th>
|
||||
<th class='thWidth'><?php echo ($type == 'doc' or $type == 'api') ? $lang->tree->parentCate : $lang->tree->parent;?></th>
|
||||
<td>
|
||||
<div class='input-group' id='moduleIdBox'>
|
||||
<?php echo html::select('parent', $optionMenu, $module->parent, "class='form-control chosen'");?>
|
||||
@@ -69,7 +69,7 @@ if(isset($pageCSS)) css::internal($pageCSS);
|
||||
<th class='thWidth'>
|
||||
<?php
|
||||
$lblTreeName = $lang->tree->name;
|
||||
if($type == 'doc') $lblTreeName = $lang->tree->cate;
|
||||
if($type == 'doc' or $type == 'api') $lblTreeName = $lang->tree->dir;
|
||||
if($type == 'line') $lblTreeName = $lang->tree->line;
|
||||
echo $lblTreeName;
|
||||
?>
|
||||
|
||||
@@ -35,6 +35,7 @@ $config->upgrade->maxVersion['max4_0'] = '18_0';
|
||||
$config->upgrade->maxVersion['max4_1'] = '18_1';
|
||||
$config->upgrade->maxVersion['max4_2'] = '18_2';
|
||||
$config->upgrade->maxVersion['max4_3'] = '18_3'; // max insert position.
|
||||
$config->upgrade->maxVersion['max4_4'] = '18_4';
|
||||
|
||||
$config->upgrade->bizVersion = array();
|
||||
$config->upgrade->bizVersion['biz1_0'] = '9_5_1';
|
||||
@@ -108,6 +109,7 @@ $config->upgrade->bizVersion['biz8_0'] = '18_0';
|
||||
$config->upgrade->bizVersion['biz8_1'] = '18_1';
|
||||
$config->upgrade->bizVersion['biz8_2'] = '18_2';
|
||||
$config->upgrade->bizVersion['biz8_3'] = '18_3'; // biz insert position.
|
||||
$config->upgrade->bizVersion['biz8_4'] = '18_4';
|
||||
|
||||
$config->upgrade->proVersion = array();
|
||||
$config->upgrade->proVersion['pro1_0'] = '3_1';
|
||||
@@ -417,7 +419,7 @@ $config->delete['18_0'][] = 'extension/max/repo/ext/control/ajaxgetbranchesandta
|
||||
$config->delete['18_0'][] = 'extension/max/repo/ext/control/editbug.php';
|
||||
$config->delete['18_0'][] = 'extension/max/repo/ext/view/ajaxgetcommitinfo.html.php';
|
||||
|
||||
$config->upgrade->openModules = array('action', 'admin', 'api', 'automation', 'backup', 'block', 'branch', 'budget', 'bug', 'build', 'caselib', 'ci', 'client', 'common', 'company', 'compile', 'convert', 'cron', 'custom', 'datatable', 'dept', 'design', 'dev', 'doc', 'durationestimation', 'entry', 'execution', 'extension', 'file', 'git', 'gitlab', 'group', 'holiday', 'im', 'index', 'index.html', 'install', 'issue', 'jenkins', 'job', 'kanban', 'license', 'mail', 'message', 'misc', 'mr', 'my', 'personnel', 'pipeline', 'product', 'productplan', 'productset', 'program', 'programplan', 'project', 'projectbuild', 'projectplan', 'projectrelease', 'projectstory', 'qa', 'release', 'repo', 'report', 'risk', 'score', 'screen', 'search', 'setting', 'sonarqube', 'sso', 'stage', 'stakeholder', 'story', 'subject', 'svn', 'task', 'testcase', 'testreport', 'testsuite', 'testtask', 'todo', 'tree', 'tutorial', 'upgrade', 'user', 'webhook', 'weekly', 'workestimation', 'gitea', 'gogs', 'transfer', 'zahost', 'zanode', 'editor');
|
||||
$config->upgrade->openModules = array('action', 'admin', 'api', 'automation', 'backup', 'block', 'branch', 'budget', 'bug', 'build', 'caselib', 'ci', 'client', 'common', 'company', 'compile', 'convert', 'cron', 'custom', 'datatable', 'dept', 'design', 'dev', 'doc', 'durationestimation', 'entry', 'execution', 'extension', 'file', 'git', 'gitlab', 'group', 'holiday', 'im', 'index', 'index.html', 'install', 'issue', 'jenkins', 'job', 'kanban', 'license', 'mail', 'message', 'misc', 'mr', 'my', 'personnel', 'pipeline', 'product', 'productplan', 'productset', 'program', 'programplan', 'project', 'projectbuild', 'projectplan', 'projectrelease', 'projectstory', 'pivot', 'qa', 'release', 'repo', 'report', 'risk', 'score', 'screen', 'search', 'setting', 'sonarqube', 'sso', 'stage', 'stakeholder', 'story', 'subject', 'svn', 'task', 'testcase', 'testreport', 'testsuite', 'testtask', 'todo', 'tree', 'tutorial', 'upgrade', 'user', 'webhook', 'weekly', 'workestimation', 'gitea', 'gogs', 'transfer', 'zahost', 'zanode', 'editor');
|
||||
|
||||
$config->upgrade->unsetModules = array('design', 'program', 'programplan', 'projectbuild', 'projectrelease', 'stage', 'stakeholder', 'product', 'branch', 'productplan', 'release', 'build', 'qa', 'bug', 'testcase', 'testtask', 'testreport', 'testsuite', 'caselib', 'automation', 'repo', 'ci', 'compile', 'jenkins', 'job', 'svn', 'gitlab', 'sonarqube', 'mr', 'git', 'report', 'sqlbuilder', 'feedback', 'faq', 'attend', 'holiday', 'leave', 'makeup', 'overtime', 'lieu', 'ops', 'host', 'serverroom', 'account', 'domain', 'service', 'deploy', 'conference', 'traincourse', 'pssp', 'baseline', 'classify', 'cm', 'cmcl', 'auditcl', 'reviewcl', 'process', 'activity', 'zoutput', 'auditplan', 'nc', 'subject', 'weekly', 'workestimation', 'issue', 'durationestimation', 'risk', 'opportunity', 'trainplan', 'gapanalysis', 'researchplan', 'researchreport', 'meeting', 'meetingroom', 'budget', 'reviewissue', 'reviewsetting', 'review', 'milestone', 'measurement', 'measrecord', 'assetlib', 'setting', 'im', 'client', 'ldap', 'dev', 'api', 'gitea', 'gogs', 'zanode', 'zahost');
|
||||
|
||||
|
||||
@@ -593,6 +593,9 @@ class upgradeModel extends model
|
||||
case '18_2':
|
||||
$this->loadModel('setting')->setSN();
|
||||
break;
|
||||
case '18_3':
|
||||
$this->changeBookToCustomLib();
|
||||
break;
|
||||
}
|
||||
|
||||
$this->deletePatch();
|
||||
@@ -1096,6 +1099,8 @@ class upgradeModel extends model
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('18.1'));
|
||||
case '18_2':
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('18.2')); // confirm insert position.
|
||||
case '18_3':
|
||||
$confirmContent .= file_get_contents($this->getUpgradeFile('18.3')); // confirm insert position.
|
||||
}
|
||||
|
||||
return $confirmContent;
|
||||
@@ -8516,6 +8521,52 @@ class upgradeModel extends model
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change book to custom lib.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function changeBookToCustomLib()
|
||||
{
|
||||
$libs = $this->dao->select('id,id')->from(TABLE_DOCLIB)->where('`type`')->eq('book')->fetchPairs();
|
||||
foreach($libs as $libID)
|
||||
{
|
||||
$chapterModulePairs = array();
|
||||
$chapters = $this->dao->select('*')->from(TABLE_DOC)->where('lib')->eq($libID)->andWhere('`type`')->eq('chapter')->orderBy('`grade` asc, `order` asc')->fetchGroup('grade', 'id');
|
||||
foreach($chapters as $grade => $gradeChapters)
|
||||
{
|
||||
foreach($gradeChapters as $id => $chapter)
|
||||
{
|
||||
$module = new stdclass();
|
||||
$module->root = $chapter->lib;
|
||||
$module->name = $chapter->title;
|
||||
$module->parent = zget($chapterModulePairs, $chapter->parent);
|
||||
$module->grade = $chapter->grade;
|
||||
$module->order = $chapter->order;
|
||||
$module->type = 'doc';
|
||||
$module->deleted = $chapter->deleted;
|
||||
|
||||
$this->dao->insert(TABLE_MODULE)->data($module)->exec();
|
||||
$moduleID = $this->dao->lastInsertID();
|
||||
|
||||
$chapterModulePairs[$id] = $moduleID;
|
||||
|
||||
$path = explode(',', $chapter->path);
|
||||
$path = array_filter($path);
|
||||
foreach($path as $index => $chapterID) $path[$index] = zget($chapterModulePairs, $chapterID);
|
||||
$path = implode(',', $path);
|
||||
$this->dao->update(TABLE_MODULE)->set('`path`')->eq(",{$path},")->where('id')->eq($moduleID)->exec();
|
||||
|
||||
$this->dao->update(TABLE_DOC)->set('`module`')->eq($moduleID)->set('`parent`')->eq($moduleID)->set("`path` = REPLACE(`path`, '{$chapter->path}', ',{$path},')")->set('`type`')->eq('text')->where('`parent`')->eq($id)->andWhere('`type`')->eq('article')->exec();
|
||||
}
|
||||
}
|
||||
$this->dao->update(TABLE_DOCLIB)->set('`type`')->eq('custom')->where('id')->eq($libID)->exec();
|
||||
$this->dao->update(TABLE_DOC)->set('`type`')->eq('text')->where('`lib`')->eq($libID)->andWhere('grade')->eq(1)->andWhere('`type`')->eq('article')->exec();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create default group.
|
||||
*
|
||||
@@ -8849,12 +8900,20 @@ class upgradeModel extends model
|
||||
{
|
||||
$column = new stdclass();
|
||||
$column->field = $field;
|
||||
$column->stat = isset($params->reportType) ? zget($params->reportType, $index, '') : 'noStat';
|
||||
$column->slice = 'noSlice';
|
||||
$column->slice = $field;
|
||||
$column->stat = isset($params->reportType) ? zget($params->reportType, $index, 'noStat') : 'noStat';
|
||||
$column->showTotal = (isset($params->reportTotal) && zget($params->reportTotal, $index, '') == '1') ? 'sum' : 'noShow';
|
||||
$column->showMode = (isset($params->percent) && zget($params->percent, $index, '') == '1' && isset($params->contrast) && zget($params->contrast, $index, '') == 'crystalTotal') ? 'total' : 'default';
|
||||
$column->monopolize = isset($params->showAlone) ? zget($params->showAlone, $index, '0') : '0';
|
||||
|
||||
if($column->stat == 'sum')
|
||||
{
|
||||
$sumAppend = isset($params->sumAppend) ? zget($params->sumAppend, $index, $field) : $field;
|
||||
|
||||
if($sumAppend == $field) $column->slice = 'noSlice';
|
||||
if($sumAppend != $field) $column->field = $sumAppend;
|
||||
}
|
||||
|
||||
$columns[] = $column;
|
||||
}
|
||||
$settings->columns = $columns;
|
||||
|
||||
@@ -41,7 +41,7 @@ class docTest
|
||||
public function createApiLibTest($param)
|
||||
{
|
||||
global $tester;
|
||||
$tester->app->loadConfig('api');
|
||||
$tester->loadModel('api');
|
||||
$tester->app->loadLang('doclib');
|
||||
|
||||
$createFields = array('name' => '', 'baseUrl' => '', 'acl' => '', 'desc' => '测试详情');
|
||||
@@ -137,7 +137,7 @@ class docTest
|
||||
public function createTest($param)
|
||||
{
|
||||
global $tester;
|
||||
$tester->app->loadConfig('api');
|
||||
$tester->loadModel('api');
|
||||
$tester->app->loadLang('doclib');
|
||||
|
||||
$labels = array();
|
||||
@@ -571,4 +571,26 @@ class docTest
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test check api library name.
|
||||
*
|
||||
* @param object $lib
|
||||
* @param string $libType
|
||||
* @param int $libID
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function checkApiLibNameTest($lib, $libType, $libID = 0)
|
||||
{
|
||||
$this->objectModel->checkApiLibName($lib, $libType, $libID);
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
$errors = dao::getError();
|
||||
return zget($errors, 'name', '1');
|
||||
}
|
||||
|
||||
return 'noerror';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -802,4 +802,27 @@ class treeTest
|
||||
foreach($objects as $object) $child .= isset($object[0]->children) ? $object[0]->id . ':' . count($object[0]->children) . ';' : "$object[0]->id:0;";
|
||||
return $child;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create module.
|
||||
*
|
||||
* @param array $postData
|
||||
* @access public
|
||||
* @return object|bool
|
||||
*/
|
||||
public function createModuleTest($postData)
|
||||
{
|
||||
global $tester;
|
||||
foreach($postData as $key => $value) $_POST[$key] = $value;
|
||||
$object = $this->objectModel->createModule();
|
||||
|
||||
unset($_POST);
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
$error = dao::getError();
|
||||
return $error[0];
|
||||
}
|
||||
return $object;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/doc.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 docModel->buildCollectButton4Doc();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
$doc = new docTest();
|
||||
|
||||
r($doc->buildCollectButton4DocTest()) && p() && e();
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/doc.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 docModel->buildCreateButton4Doc();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
$doc = new docTest();
|
||||
|
||||
r($doc->buildCreateButton4DocTest()) && p() && e();
|
||||
@@ -0,0 +1,158 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/doc.class.php';
|
||||
|
||||
zdTable('user')->gen(5);
|
||||
su('admin');
|
||||
|
||||
$doc = zdTable('doclib');
|
||||
$doc->id->range('1-5');
|
||||
$doc->product->range('0{2},1{2}');
|
||||
$doc->project->range('0,1{2},0{2}');
|
||||
$doc->name->range('文档库1{5}');
|
||||
$doc->type->range('api{2},project,api,product');
|
||||
$doc->gen(5);
|
||||
|
||||
/**
|
||||
|
||||
title=测试 docModel->checkApiLibName();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试lib1是否与已存在无关联接口库重名 >> 无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib1是否与除了ID为1的其他无关联接口库重名 >> noerror
|
||||
测试lib1是否与除了ID为2的其他无关联接口库重名 >> 无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib1是否与除了ID为3的其他无关联接口库重名 >> 无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib1是否与除了ID为4的其他无关联接口库重名 >> 无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib1是否与除了ID为5的其他无关联接口库重名 >> 无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib1是否与已存在产品接口库重名 >> 同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib1是否与除了ID为1的其他产品接口库重名 >> noerror
|
||||
测试lib1是否与除了ID为2的其他产品接口库重名 >> 同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib1是否与除了ID为3的其他产品接口库重名 >> 同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib1是否与除了ID为4的其他产品接口库重名 >> 同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib1是否与除了ID为5的其他产品接口库重名 >> 同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib1是否与已存在项目接口库重名 >> 同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib1是否与除了ID为1的其他项目接口库重名 >> noerror
|
||||
测试lib1是否与除了ID为2的其他项目接口库重名 >> 同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib1是否与除了ID为3的其他项目接口库重名 >> 同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib1是否与除了ID为4的其他项目接口库重名 >> 同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib1是否与除了ID为5的其他项目接口库重名 >> 同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib2是否与已存在无关联接口库重名 >> 无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib2是否与除了ID为1的其他无关联接口库重名 >> 无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib2是否与除了ID为2的其他无关联接口库重名 >> 无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib2是否与除了ID为3的其他无关联接口库重名 >> 无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib2是否与除了ID为4的其他无关联接口库重名 >> noerror
|
||||
测试lib2是否与除了ID为5的其他无关联接口库重名 >> 无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib2是否与已存在产品接口库重名 >> 同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib2是否与除了ID为1的其他产品接口库重名 >> 同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib2是否与除了ID为2的其他产品接口库重名 >> 同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib2是否与除了ID为3的其他产品接口库重名 >> 同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib2是否与除了ID为4的其他产品接口库重名 >> noerror
|
||||
测试lib2是否与除了ID为5的其他产品接口库重名 >> 同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib2是否与已存在项目接口库重名 >> 同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib2是否与除了ID为1的其他项目接口库重名 >> 同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib2是否与除了ID为2的其他项目接口库重名 >> 同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib2是否与除了ID为3的其他项目接口库重名 >> 同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib2是否与除了ID为4的其他项目接口库重名 >> noerror
|
||||
测试lib2是否与除了ID为5的其他项目接口库重名 >> 同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib3是否与已存在无关联接口库重名 >> 无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib3是否与除了ID为1的其他无关联接口库重名 >> 无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib3是否与除了ID为2的其他无关联接口库重名 >> noerror
|
||||
测试lib3是否与除了ID为3的其他无关联接口库重名 >> 无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib3是否与除了ID为4的其他无关联接口库重名 >> 无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib3是否与除了ID为5的其他无关联接口库重名 >> 无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib3是否与已存在产品接口库重名 >> 同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib3是否与除了ID为1的其他产品接口库重名 >> 同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib3是否与除了ID为2的其他产品接口库重名 >> noerror
|
||||
测试lib3是否与除了ID为3的其他产品接口库重名 >> 同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib3是否与除了ID为4的其他产品接口库重名 >> 同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib3是否与除了ID为5的其他产品接口库重名 >> 同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib3是否与已存在项目接口库重名 >> 同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib3是否与除了ID为1的其他项目接口库重名 >> 同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib3是否与除了ID为2的其他项目接口库重名 >> noerror
|
||||
测试lib3是否与除了ID为3的其他项目接口库重名 >> 同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib3是否与除了ID为4的其他项目接口库重名 >> 同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
测试lib3是否与除了ID为5的其他项目接口库重名 >> 同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
|
||||
|
||||
*/
|
||||
|
||||
$lib1 = new stdclass();
|
||||
$lib1->name = '文档库1';
|
||||
$lib1->type = 'api';
|
||||
$lib1->product = '0';
|
||||
$lib1->project = '0';
|
||||
|
||||
$lib2 = new stdclass();
|
||||
$lib2->name = '文档库1';
|
||||
$lib2->type = 'api';
|
||||
$lib2->product = '1';
|
||||
$lib2->project = '0';
|
||||
|
||||
$lib3 = new stdclass();
|
||||
$lib3->name = '文档库1';
|
||||
$lib3->type = 'api';
|
||||
$lib3->product = '0';
|
||||
$lib3->project = '1';
|
||||
|
||||
$libIDs = array(1, 2, 3, 4, 5);
|
||||
$libType = array('nolink', 'product', 'project');
|
||||
|
||||
$doc = new docTest();
|
||||
r($doc->checkApiLibNameTest($lib1, $libType[0])) && p() && e('无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib1是否与已存在无关联接口库重名
|
||||
r($doc->checkApiLibNameTest($lib1, $libType[0], $libIDs[0])) && p() && e('noerror'); //测试lib1是否与除了ID为1的其他无关联接口库重名
|
||||
r($doc->checkApiLibNameTest($lib1, $libType[0], $libIDs[1])) && p() && e('无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib1是否与除了ID为2的其他无关联接口库重名
|
||||
r($doc->checkApiLibNameTest($lib1, $libType[0], $libIDs[2])) && p() && e('无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib1是否与除了ID为3的其他无关联接口库重名
|
||||
r($doc->checkApiLibNameTest($lib1, $libType[0], $libIDs[3])) && p() && e('无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib1是否与除了ID为4的其他无关联接口库重名
|
||||
r($doc->checkApiLibNameTest($lib1, $libType[0], $libIDs[4])) && p() && e('无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib1是否与除了ID为5的其他无关联接口库重名
|
||||
r($doc->checkApiLibNameTest($lib1, $libType[1])) && p() && e('同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib1是否与已存在产品接口库重名
|
||||
r($doc->checkApiLibNameTest($lib1, $libType[1], $libIDs[0])) && p() && e('noerror'); //测试lib1是否与除了ID为1的其他产品接口库重名
|
||||
r($doc->checkApiLibNameTest($lib1, $libType[1], $libIDs[1])) && p() && e('同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib1是否与除了ID为2的其他产品接口库重名
|
||||
r($doc->checkApiLibNameTest($lib1, $libType[1], $libIDs[2])) && p() && e('同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib1是否与除了ID为3的其他产品接口库重名
|
||||
r($doc->checkApiLibNameTest($lib1, $libType[1], $libIDs[3])) && p() && e('同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib1是否与除了ID为4的其他产品接口库重名
|
||||
r($doc->checkApiLibNameTest($lib1, $libType[1], $libIDs[4])) && p() && e('同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib1是否与除了ID为5的其他产品接口库重名
|
||||
r($doc->checkApiLibNameTest($lib1, $libType[2])) && p() && e('同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib1是否与已存在项目接口库重名
|
||||
r($doc->checkApiLibNameTest($lib1, $libType[2], $libIDs[0])) && p() && e('noerror'); //测试lib1是否与除了ID为1的其他项目接口库重名
|
||||
r($doc->checkApiLibNameTest($lib1, $libType[2], $libIDs[1])) && p() && e('同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib1是否与除了ID为2的其他项目接口库重名
|
||||
r($doc->checkApiLibNameTest($lib1, $libType[2], $libIDs[2])) && p() && e('同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib1是否与除了ID为3的其他项目接口库重名
|
||||
r($doc->checkApiLibNameTest($lib1, $libType[2], $libIDs[3])) && p() && e('同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib1是否与除了ID为4的其他项目接口库重名
|
||||
r($doc->checkApiLibNameTest($lib1, $libType[2], $libIDs[4])) && p() && e('同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib1是否与除了ID为5的其他项目接口库重名
|
||||
|
||||
r($doc->checkApiLibNameTest($lib2, $libType[0])) && p() && e('无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib2是否与已存在无关联接口库重名
|
||||
r($doc->checkApiLibNameTest($lib2, $libType[0], $libIDs[0])) && p() && e('无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib2是否与除了ID为1的其他无关联接口库重名
|
||||
r($doc->checkApiLibNameTest($lib2, $libType[0], $libIDs[1])) && p() && e('无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib2是否与除了ID为2的其他无关联接口库重名
|
||||
r($doc->checkApiLibNameTest($lib2, $libType[0], $libIDs[2])) && p() && e('无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib2是否与除了ID为3的其他无关联接口库重名
|
||||
r($doc->checkApiLibNameTest($lib2, $libType[0], $libIDs[3])) && p() && e('noerror'); //测试lib2是否与除了ID为4的其他无关联接口库重名
|
||||
r($doc->checkApiLibNameTest($lib2, $libType[0], $libIDs[4])) && p() && e('无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib2是否与除了ID为5的其他无关联接口库重名
|
||||
r($doc->checkApiLibNameTest($lib2, $libType[1])) && p() && e('同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib2是否与已存在产品接口库重名
|
||||
r($doc->checkApiLibNameTest($lib2, $libType[1], $libIDs[0])) && p() && e('同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib2是否与除了ID为1的其他产品接口库重名
|
||||
r($doc->checkApiLibNameTest($lib2, $libType[1], $libIDs[1])) && p() && e('同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib2是否与除了ID为2的其他产品接口库重名
|
||||
r($doc->checkApiLibNameTest($lib2, $libType[1], $libIDs[2])) && p() && e('同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib2是否与除了ID为3的其他产品接口库重名
|
||||
r($doc->checkApiLibNameTest($lib2, $libType[1], $libIDs[3])) && p() && e('noerror'); //测试lib2是否与除了ID为4的其他产品接口库重名
|
||||
r($doc->checkApiLibNameTest($lib2, $libType[1], $libIDs[4])) && p() && e('同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib2是否与除了ID为5的其他产品接口库重名
|
||||
r($doc->checkApiLibNameTest($lib2, $libType[2])) && p() && e('同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib2是否与已存在项目接口库重名
|
||||
r($doc->checkApiLibNameTest($lib2, $libType[2], $libIDs[0])) && p() && e('同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib2是否与除了ID为1的其他项目接口库重名
|
||||
r($doc->checkApiLibNameTest($lib2, $libType[2], $libIDs[1])) && p() && e('同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib2是否与除了ID为2的其他项目接口库重名
|
||||
r($doc->checkApiLibNameTest($lib2, $libType[2], $libIDs[2])) && p() && e('同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib2是否与除了ID为3的其他项目接口库重名
|
||||
r($doc->checkApiLibNameTest($lib2, $libType[2], $libIDs[3])) && p() && e('noerror'); //测试lib2是否与除了ID为4的其他项目接口库重名
|
||||
r($doc->checkApiLibNameTest($lib2, $libType[2], $libIDs[4])) && p() && e('同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib2是否与除了ID为5的其他项目接口库重名
|
||||
|
||||
r($doc->checkApiLibNameTest($lib3, $libType[0])) && p() && e('无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib3是否与已存在无关联接口库重名
|
||||
r($doc->checkApiLibNameTest($lib3, $libType[0], $libIDs[0])) && p() && e('无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib3是否与除了ID为1的其他无关联接口库重名
|
||||
r($doc->checkApiLibNameTest($lib3, $libType[0], $libIDs[1])) && p() && e('noerror'); //测试lib3是否与除了ID为2的其他无关联接口库重名
|
||||
r($doc->checkApiLibNameTest($lib3, $libType[0], $libIDs[2])) && p() && e('无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib3是否与除了ID为3的其他无关联接口库重名
|
||||
r($doc->checkApiLibNameTest($lib3, $libType[0], $libIDs[3])) && p() && e('无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib3是否与除了ID为4的其他无关联接口库重名
|
||||
r($doc->checkApiLibNameTest($lib3, $libType[0], $libIDs[4])) && p() && e('无关联接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib3是否与除了ID为5的其他无关联接口库重名
|
||||
r($doc->checkApiLibNameTest($lib3, $libType[1])) && p() && e('同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib3是否与已存在产品接口库重名
|
||||
r($doc->checkApiLibNameTest($lib3, $libType[1], $libIDs[0])) && p() && e('同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib3是否与除了ID为1的其他产品接口库重名
|
||||
r($doc->checkApiLibNameTest($lib3, $libType[1], $libIDs[1])) && p() && e('noerror'); //测试lib3是否与除了ID为2的其他产品接口库重名
|
||||
r($doc->checkApiLibNameTest($lib3, $libType[1], $libIDs[2])) && p() && e('同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib3是否与除了ID为3的其他产品接口库重名
|
||||
r($doc->checkApiLibNameTest($lib3, $libType[1], $libIDs[3])) && p() && e('同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib3是否与除了ID为4的其他产品接口库重名
|
||||
r($doc->checkApiLibNameTest($lib3, $libType[1], $libIDs[4])) && p() && e('同一产品下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib3是否与除了ID为5的其他产品接口库重名
|
||||
r($doc->checkApiLibNameTest($lib3, $libType[2])) && p() && e('同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib3是否与已存在项目接口库重名
|
||||
r($doc->checkApiLibNameTest($lib3, $libType[2], $libIDs[0])) && p() && e('同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib3是否与除了ID为1的其他项目接口库重名
|
||||
r($doc->checkApiLibNameTest($lib3, $libType[2], $libIDs[1])) && p() && e('noerror'); //测试lib3是否与除了ID为2的其他项目接口库重名
|
||||
r($doc->checkApiLibNameTest($lib3, $libType[2], $libIDs[2])) && p() && e('同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib3是否与除了ID为3的其他项目接口库重名
|
||||
r($doc->checkApiLibNameTest($lib3, $libType[2], $libIDs[3])) && p() && e('同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib3是否与除了ID为4的其他项目接口库重名
|
||||
r($doc->checkApiLibNameTest($lib3, $libType[2], $libIDs[4])) && p() && e('同一项目下的接口库中『库名称』已经有『文档库1』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。'); //测试lib3是否与除了ID为5的其他项目接口库重名
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user