* [story #68963, done] refactor api-releases page for docApp.

This commit is contained in:
sunhao
2024-11-07 10:04:12 +08:00
committed by 刘刚
parent ef77a3c622
commit d2c8c5cf3f
3 changed files with 17 additions and 14 deletions
+2 -2
View File
@@ -250,7 +250,7 @@ class api extends control
$this->api->deleteRelease($id);
if(dao::isError()) return $this->sendError(dao::getError());
return $this->sendSuccess(array('load' => true, 'closeModal' => true));
return $this->sendSuccess(array('load' => true, 'closeModal' => true, 'docApp' => array('executeCommand', 'loadLazyContent', array('.api-release-list'))));
}
/**
@@ -274,7 +274,7 @@ class api extends control
if(dao::isError()) return $this->sendError(dao::getError());
return $this->sendSuccess(array('load' => true, 'closeModal' => true));
return $this->sendSuccess(array('load' => true, 'closeModal' => true, 'docApp' => array('executeCommand', 'loadLazyContent', array('.api-release-list'))));
}
$this->display();
-1
View File
@@ -1 +0,0 @@
.releaseModal .modal-dialog .modal-body {overflow-y: hidden;}
+15 -11
View File
@@ -12,17 +12,21 @@ namespace zin;
set::title($lang->api->releases);
$releases = initTableData($releases, $config->api->dtable->release->fieldList, $this->api);
$releases = initTableData($releases, $config->api->dtable->release->fieldList, $this->api);
$footerInfo = empty($releases) ? $lang->pager->noRecord : str_replace('{recTotal}', '' . count($releases), $lang->pager->totalCountAB);
dtable
div
(
setStyle('overflow-y', 'hidden'),
set::extraHeight('+144'),
set::cols(array_values($config->api->dtable->release->fieldList)),
set::data(array_values($releases)),
set::userMap($users),
set::orderBy($orderBy),
set::sortLink(inlink('releases', "libID={$libID}&orderBy={name}_{sortType}"))
dtable
(
set::_className(''),
set::cols(array_values($config->api->dtable->release->fieldList)),
set::data(array_values($releases)),
set::userMap($users),
set::orderBy($orderBy),
set::footer($footerInfo),
set::loadPartial(),
set::sortLink(inlink('releases', "libID={$libID}&orderBy={name}_{sortType}")),
set::loadOptions(array('zui-command' => 'updateLazyContent'))
),
);
render();