* Change the name of my spatial function.

This commit is contained in:
tianshujie
2023-04-06 16:57:14 +08:00
parent fc3accb1b0
commit bb84c7a731
11 changed files with 37 additions and 33 deletions
+2
View File
@@ -151,6 +151,8 @@ SELECT t1.`group`, t1.`module`, 'editCatalog' FROM `zt_grouppriv` AS t1 WHERE t1
INSERT IGNORE INTO `zt_grouppriv` (`group`, `module`, `method`)
SELECT t1.`group`, t1.`module`, 'deleteCatalog' FROM `zt_grouppriv` AS t1 WHERE t1.`module` = 'doc' AND t1.`method` = 'catalog';
UPDATE `zt_grouppriv` SET `method` = 'mySpace' WHERE `module` = 'doc' AND `method` = 'browse';
ALTER TABLE `zt_account`
CHANGE `editedBy` `editedBy` varchar(30) NOT NULL DEFAULT '',
CHANGE `editedDate` `editedDate` datetime NULL;
+11 -11
View File
@@ -2203,7 +2203,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(1,'dev','editor'),
(1,'dev','translate'),
(1,'doc','allLibs'),
(1,'doc','browse'),
(1,'doc','mySpace'),
(1,'doc','myView'),
(1,'doc','myCollection'),
(1,'doc','myCreation'),
@@ -2794,7 +2794,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(2,'dev','api'),
(2,'dev','db'),
(2,'dev','editor'),
(2,'doc','browse'),
(2,'doc','mySpace'),
(2,'doc','myView'),
(2,'doc','myCollection'),
(2,'doc','myCreation'),
@@ -3104,7 +3104,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(3,'company','index'),
(3,'company','view'),
(3,'datatable','setGlobal'),
(3,'doc','browse'),
(3,'doc','mySpace'),
(3,'doc','myView'),
(3,'doc','myCollection'),
(3,'doc','myCreation'),
@@ -3442,7 +3442,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(4,'compile','browse'),
(4,'compile','logs'),
(4,'datatable','setGlobal'),
(4,'doc','browse'),
(4,'doc','mySpace'),
(4,'doc','myView'),
(4,'doc','myCollection'),
(4,'doc','myCreation'),
@@ -3961,7 +3961,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(5,'compile','browse'),
(5,'compile','logs'),
(5,'datatable','setGlobal'),
(5,'doc','browse'),
(5,'doc','mySpace'),
(5,'doc','myView'),
(5,'doc','myCollection'),
(5,'doc','myCreation'),
@@ -4433,7 +4433,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(6,'company','index'),
(6,'company','view'),
(6,'datatable','setGlobal'),
(6,'doc','browse'),
(6,'doc','mySpace'),
(6,'doc','myView'),
(6,'doc','myCollection'),
(6,'doc','myCreation'),
@@ -4827,7 +4827,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(7,'company','index'),
(7,'company','view'),
(7,'datatable','setGlobal'),
(7,'doc','browse'),
(7,'doc','mySpace'),
(7,'doc','myView'),
(7,'doc','myCollection'),
(7,'doc','myCreation'),
@@ -5250,7 +5250,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(8,'compile','logs'),
(8,'custom','index'),
(8,'datatable','setGlobal'),
(8,'doc','browse'),
(8,'doc','mySpace'),
(8,'doc','myView'),
(8,'doc','myCollection'),
(8,'doc','myCreation'),
@@ -5634,7 +5634,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(9,'dept','delete'),
(9,'dept','manageChild'),
(9,'dept','updateOrder'),
(9,'doc','browse'),
(9,'doc','mySpace'),
(9,'doc','myView'),
(9,'doc','myCollection'),
(9,'doc','myCreation'),
@@ -5967,7 +5967,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(10,'company','dynamic'),
(10,'company','index'),
(10,'company','view'),
(10,'doc','browse'),
(10,'doc','mySpace'),
(10,'doc','myView'),
(10,'doc','myCollection'),
(10,'doc','myCreation'),
@@ -6211,7 +6211,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(11,'company','dynamic'),
(11,'company','index'),
(11,'company','view'),
(11,'doc','browse'),
(11,'doc','mySpace'),
(11,'doc','myView'),
(11,'doc','myCollection'),
(11,'doc','myCreation'),
+1 -1
View File
@@ -499,7 +499,7 @@ $lang->kanban->menu = new stdclass();
/* Doc menu. */
$lang->doc->menu = new stdclass();
$lang->doc->menu->dashboard = array('link' => "{$lang->dashboard}|doc|index");
$lang->doc->menu->my = array('link' => "{$lang->doc->mySpace}|doc|browse|browseTyp=mine", 'alias' => 'my');
$lang->doc->menu->my = array('link' => "{$lang->doc->mySpace}|doc|mySpace|type=mine", 'alias' => 'myspace');
$lang->doc->menu->product = array('link' => "{$lang->doc->productSpace}|doc|productSpace|", 'alias' => 'productspace');
$lang->doc->menu->project = array('link' => "{$lang->doc->projectSpace}|doc|projectSpace|", 'alias' => 'projectspace');
$lang->doc->menu->api = array('link' => "{$lang->doc->apiSpace}|api|index", 'alias' => 'api');
+15 -12
View File
@@ -53,7 +53,7 @@ class doc extends control
}
/**
* Browse docs.
* My space.
*
* @param string $type mine
* @param int $libID
@@ -67,7 +67,7 @@ class doc extends control
* @access public
* @return void
*/
public function browse($type = 'mine', $libID = 0, $moduleID = 0, $browseType = 'all', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
public function mySpace($type = 'mine', $libID = 0, $moduleID = 0, $browseType = 'all', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Save session, load module. */
$uri = $this->app->getURI(true);
@@ -77,9 +77,16 @@ class doc extends control
$this->session->set('projectList', $uri, 'project');
$this->loadModel('search');
/* Set browseType.*/
list($libs, $libID, $object, $objectID, $objectDropdown) = $this->doc->setMenuByType('mine', 0, $libID);
/* Build the search form. */
$browseType = strtolower($browseType);
$queryID = $browseType == 'bysearch' ? (int)$param : 0;
$params = "libID=$libID&moduleID=$moduleID&browseType=bySearch&param=myQueryID&orderBy=$orderBy";
if($this->app->rawMethod == 'mySpace') $param = "type=$type&" . $params;
$actionURL = $this->createLink('doc', $this->app->rawMethod, $params);
$this->doc->buildSearchForm($libID, $libs, $queryID, $actionURL, $type);
/* Set header and position. */
$this->view->title = $this->lang->doc->common;
@@ -91,8 +98,6 @@ class doc extends control
/* Append id for secend sort. */
$sort = common::appendOrder($orderBy);
list($libs, $libID, $object, $objectID, $objectDropdown) = $this->doc->setMenuByType('mine', 0, $libID);
$this->view->moduleID = $moduleID;
$this->view->docs = $this->doc->getDocsByBrowseType($browseType, $queryID, $moduleID, $sort, $pager);
$this->view->users = $this->user->getPairs('noletter');
@@ -103,7 +108,7 @@ class doc extends control
$this->view->lib = $this->doc->getLibById($libID);
$this->view->libTree = $this->doc->getLibTree($libID, $libs, 'mine', 0);
$this->view->pager = $pager;
$this->view->type = 'mine';
$this->view->type = $type;
$this->view->objectID = 0;
$this->view->canExport = 0;
$this->view->libType = 'lib';
@@ -587,10 +592,7 @@ class doc extends control
$this->config->showMainMenu = strpos(',html,markdown,text,', ",{$doc->type},") === false;
$this->view->title = $lib->name . $this->lang->colon . $this->lang->doc->edit;
$this->view->position[] = html::a($this->createLink('doc', 'browse', "libID=$libID"), $lib->name);
$this->view->position[] = $this->lang->doc->edit;
$this->view->title = $lib->name . $this->lang->colon . $this->lang->doc->edit;
$this->view->doc = $doc;
$this->view->moduleOptionMenu = $moduleOptionMenu;
$this->view->type = $objectType;
@@ -1200,9 +1202,10 @@ class doc extends control
}
}
$doc = $docID ? $doc : '';
$doc = $docID ? $doc : '';
$spaceType = $objectType . 'Space';
$this->view->title = $type == 'custom' ? $this->lang->doc->customAB : $object->name;
$this->view->title = isset($this->lang->doc->{$spaceType}) ? $this->lang->doc->{$spaceType} : $this->lang->doc->common;
$this->view->docID = $docID;
$this->view->doc = $doc;
$this->view->version = $version;
+1 -1
View File
@@ -327,7 +327,7 @@ function locateNewLib(type, objectID, libID)
}
else if(type == 'mine')
{
method = 'browse';
method = 'mySpace';
params = 'type=mine&libID=' + libID;
}
+4 -4
View File
@@ -994,7 +994,7 @@ class docModel extends model
unset($this->config->doc->search['fields']['module']);
}
elseif(in_array($type, array('product', 'project', 'execution', 'custom', 'book')))
elseif(in_array($type, array('product', 'project', 'execution', 'custom', 'mine')))
{
if(!isset($libs[$libID])) $libs[$libID] = $this->getLibById($libID);
@@ -1034,8 +1034,7 @@ class docModel extends model
$this->config->doc->search['queryID'] = $queryID;
/* Get the modules. */
$moduleOptionMenu = $this->loadModel('tree')->getOptionMenu($libID, 'doc', $startModuleID = 0);
$this->config->doc->search['params']['module']['values'] = $moduleOptionMenu;
$this->config->doc->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($libID, 'doc', $startModuleID = 0);
if($type == 'index' || $type == 'view' || ($this->app->rawMethod != 'contribute' and $libID == 0))
{
@@ -2666,7 +2665,8 @@ class docModel extends model
$object->id = 0;
}
$tab = strpos(',doc,product,project,execution,', ",{$this->app->tab},") !== false ? $this->app->tab : 'doc';
$tab = strpos(',doc,product,project,execution,', ",{$this->app->tab},") !== false ? $this->app->tab : 'doc';
$type = $type == 'mine' ? 'my' : $type;
if($tab != 'doc' and method_exists($type . 'Model', 'setMenu'))
{
$this->loadModel($type)->setMenu($objectID);
+1 -1
View File
@@ -421,7 +421,7 @@ $(function()
}
else if(objectType == 'mine')
{
methodName = 'browse';
methodName = 'mySpace';
linkParams = 'type=mine&libID=' + libID;
}
else if(['text', 'word', 'ppt', 'excel'].indexOf(type) !== -1)
@@ -53,7 +53,6 @@
</div>
<div class="sidebar-toggle flex-center"><i class="icon icon-angle-left"></i></div>
<div class="main-col flex-full overflow-visible flex-auto">
<div class="cell<?php if($browseType == 'bySearch') echo ' show';?>" style="min-width: 400px" id="queryBox" data-module=<?php echo $type . $libType . 'Doc';?>></div>
<?php include 'mydoclist.html.php'; ?>
</div>
<?php endif;?>
+2 -2
View File
@@ -1369,7 +1369,7 @@ $lang->job->methodOrder[25] = 'exec';
/* Doc. */
$lang->resource->doc = new stdclass();
$lang->resource->doc->index = 'index';
$lang->resource->doc->browse = 'mySpace';
$lang->resource->doc->mySpace = 'mySpace';
$lang->resource->doc->myView = 'myView';
$lang->resource->doc->myCollection = 'myCollection';
$lang->resource->doc->myCreation = 'myCreation';
@@ -1392,7 +1392,7 @@ $lang->resource->doc->deleteCatalog = 'deleteCatalog';
$lang->resource->doc->displaySetting = 'displaySetting';
$lang->doc->methodOrder[5] = 'index';
$lang->doc->methodOrder[10] = 'browse';
$lang->doc->methodOrder[10] = 'mySpace';
$lang->doc->methodOrder[15] = 'myView';
$lang->doc->methodOrder[20] = 'myCollection';
$lang->doc->methodOrder[25] = 'myCreation';