From d71c0860637d1649b7b0b84c047b9ba982966cf1 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Mon, 13 Nov 2023 15:06:06 +0800 Subject: [PATCH] * Remove `,` at the end of row in the lastest children in api. --- module/api/ui/create.html.php | 104 +++++++++++------------ module/api/ui/createlib.html.php | 20 ++--- module/api/ui/createrelease.html.php | 6 +- module/api/ui/createstruct.html.php | 24 +++--- module/api/ui/edit.html.php | 118 +++++++++++++-------------- module/api/ui/editlib.html.php | 16 ++-- module/api/ui/editstruct.html.php | 34 ++++---- module/api/ui/index.html.php | 8 +- module/api/ui/releases.html.php | 4 +- module/api/ui/struct.html.php | 4 +- module/api/ui/view.html.php | 34 ++++---- 11 files changed, 186 insertions(+), 186 deletions(-) diff --git a/module/api/ui/create.html.php b/module/api/ui/create.html.php index ac8b9fa9f3..2a5cdccbd4 100644 --- a/module/api/ui/create.html.php +++ b/module/api/ui/create.html.php @@ -8,7 +8,7 @@ formPanel ( setClass('panel-title text-lg'), $lang->api->create - ), + ) ), formGroup ( @@ -31,7 +31,7 @@ formPanel set::items($moduleOptionMenu), set::name('module'), set::required(true) - ), + ) ), formGroup ( @@ -53,15 +53,15 @@ formPanel ( set::required(true), set::items($lang->api->protocalOptions), - set::name('protocol'), + set::name('protocol') ), picker ( set::required(true), set::width('1/5'), set::items($lang->api->methodOptions), - set::name('method'), - ), + set::name('method') + ) ) ), formGroup @@ -79,8 +79,8 @@ formPanel picker ( set::name('requestType'), - set::items($lang->api->requestTypeOptions), - ), + set::items($lang->api->requestTypeOptions) + ) ), formGroup ( @@ -90,8 +90,8 @@ formPanel set::name('status'), set::inline(true), set::value('done'), - set::items($lang->api->statusOptions), - ), + set::items($lang->api->statusOptions) + ) ), formGroup ( @@ -101,8 +101,8 @@ formPanel ( set::name('owner'), set::items($allUsers), - set::value($app->user->account), - ), + set::value($app->user->account) + ) ), formGroup ( @@ -130,15 +130,15 @@ formPanel ), h::th ( - width('100px'), - ), + width('100px') + ) ), h::tr ( setClass('input-row'), h::td ( - input(), + input() ), h::td ( @@ -149,7 +149,7 @@ formPanel textarea ( set::rows(1) - ), + ) ), h::td ( @@ -164,12 +164,12 @@ formPanel btn ( setClass('btn ghost btn-delete'), - icon('trash'), - ), + icon('trash') + ) ) ) - ), - ), + ) + ) ), formGroup ( @@ -197,15 +197,15 @@ formPanel ), h::th ( - width('100px'), - ), + width('100px') + ) ), h::tr ( setClass('input-row'), h::td ( - input(), + input() ), h::td ( @@ -216,7 +216,7 @@ formPanel textarea ( set::rows(1) - ), + ) ), h::td ( @@ -231,12 +231,12 @@ formPanel btn ( setClass('btn ghost btn-delete'), - icon('trash'), - ), + icon('trash') + ) ) ) - ), - ), + ) + ) ), formGroup ( @@ -248,8 +248,8 @@ formPanel set::name('type'), set::inline(true), set::value('formData'), - set::items($lang->struct->typeOptions), - ), + set::items($lang->struct->typeOptions) + ) ), formGroup ( @@ -282,8 +282,8 @@ formPanel ), h::th ( - width('100px'), - ), + width('100px') + ) ), h::tr ( @@ -295,8 +295,8 @@ formPanel ( input ( - set::name(''), - ), + set::name('') + ) ), h::td ( @@ -317,7 +317,7 @@ formPanel textarea ( set::rows(1) - ), + ) ), h::td ( @@ -337,12 +337,12 @@ formPanel btn ( setClass('btn ghost btn-delete'), - icon('trash'), - ), + icon('trash') + ) ) ) - ), - ), + ) + ) ), formHidden('params', '{"header":[],"params":[],"paramsType":"fromData","query":[]}'), formGroup @@ -351,8 +351,8 @@ formPanel set::label($lang->api->paramsExample), textarea ( - set::name('paramsExample'), - ), + set::name('paramsExample') + ) ), formGroup ( @@ -385,8 +385,8 @@ formPanel ), h::th ( - width('100px'), - ), + width('100px') + ) ), h::tr ( @@ -398,8 +398,8 @@ formPanel ( input ( - set::name(''), - ), + set::name('') + ) ), h::td ( @@ -420,7 +420,7 @@ formPanel textarea ( set::rows(1) - ), + ) ), h::td ( @@ -440,12 +440,12 @@ formPanel btn ( setClass('btn ghost btn-delete'), - icon('trash'), - ), + icon('trash') + ) ) ) - ), - ), + ) + ) ), formHidden('response', '[]'), formGroup @@ -454,15 +454,15 @@ formPanel set::label($lang->api->responseExample), textarea ( - set::name('responseExample'), - ), + set::name('responseExample') + ) ), formGroup ( set::label($lang->api->desc), editor ( - set::name('desc'), + set::name('desc') ) ) ); diff --git a/module/api/ui/createlib.html.php b/module/api/ui/createlib.html.php index 2912bc0abd..45efa460da 100644 --- a/module/api/ui/createlib.html.php +++ b/module/api/ui/createlib.html.php @@ -24,8 +24,8 @@ formPanel set::items($lang->api->libTypeList), set::value($type), set::inline(true), - on::change('toggleLibType'), - ), + on::change('toggleLibType') + ) ), formRow ( @@ -38,7 +38,7 @@ formPanel set::name('product'), set::items($products), set::value($type == 'product' ? $objectID : 0), - set::required(true), + set::required(true) ) ), formRow @@ -52,21 +52,21 @@ formPanel set::name('project'), set::items($projects), set::value($type == 'project' ? $objectID : 0), - set::required(true), + set::required(true) ) ), formGroup ( set::label($lang->api->name), set::width('3/4'), - set::name('name'), + set::name('name') ), formGroup ( set::label($lang->api->baseUrl), set::width('3/4'), set::name('baseUrl'), - set::placeholder($lang->api->baseUrlDesc), + set::placeholder($lang->api->baseUrlDesc) ), formRow ( @@ -79,7 +79,7 @@ formPanel set::name('acl'), set::items($lang->api->aclList), set::value('open'), - on::change("toggleAcl('lib')"), + on::change("toggleAcl('lib')") ) ) ), @@ -103,7 +103,7 @@ formPanel ( set::name('groups[]'), set::items($groups), - set::multiple(true), + set::multiple(true) ) ) ), @@ -116,13 +116,13 @@ formPanel ( set::name('users[]'), set::items($users), - set::multiple(true), + set::multiple(true) ) ) ) ) ) - ), + ) ); /* ====== Render page ====== */ render(); diff --git a/module/api/ui/createrelease.html.php b/module/api/ui/createrelease.html.php index cee4aae920..9ec3d69b84 100644 --- a/module/api/ui/createrelease.html.php +++ b/module/api/ui/createrelease.html.php @@ -25,7 +25,7 @@ formPanel set::label($lang->api->desc), textarea ( - set::name('desc'), - ), - ), + set::name('desc') + ) + ) ); diff --git a/module/api/ui/createstruct.html.php b/module/api/ui/createstruct.html.php index 86fb79956f..59594fb9c9 100644 --- a/module/api/ui/createstruct.html.php +++ b/module/api/ui/createstruct.html.php @@ -18,7 +18,7 @@ formPanel ( setClass('panel-title text-lg'), $lang->api->createStruct - ), + ) ), formGroup ( @@ -37,8 +37,8 @@ formPanel set::name('type'), set::inline(true), set::value('formData'), - set::items($lang->struct->typeOptions), - ), + set::items($lang->struct->typeOptions) + ) ), formGroup ( @@ -71,8 +71,8 @@ formPanel ), h::th ( - width('100px'), - ), + width('100px') + ) ), h::tr ( @@ -82,7 +82,7 @@ formPanel set('data-parent', '0'), h::td ( - input(), + input() ), h::td ( @@ -103,7 +103,7 @@ formPanel textarea ( set::rows(1) - ), + ) ), h::td ( @@ -123,12 +123,12 @@ formPanel btn ( setClass('btn ghost btn-delete'), - icon('trash'), - ), + icon('trash') + ) ) ) - ), - ), + ) + ) ), formHidden('attribute'), formGroup @@ -136,7 +136,7 @@ formPanel set::label($lang->api->desc), editor ( - set::name('desc'), + set::name('desc') ) ) ); diff --git a/module/api/ui/edit.html.php b/module/api/ui/edit.html.php index 1df27f9210..54f6af4bd3 100644 --- a/module/api/ui/edit.html.php +++ b/module/api/ui/edit.html.php @@ -11,7 +11,7 @@ $defaultTR = function() input ( set::name('') - ), + ) ), h::td ( @@ -22,7 +22,7 @@ $defaultTR = function() textarea ( set::rows(1) - ), + ) ), h::td ( @@ -37,7 +37,7 @@ $defaultTR = function() btn ( setClass('btn ghost btn-delete'), - icon('trash'), + icon('trash') ), ) ) @@ -57,7 +57,7 @@ if(!empty($api->params['header'])) ( set::name(''), set::value($param['field']) - ), + ) ), h::td ( @@ -69,7 +69,7 @@ if(!empty($api->params['header'])) ( set::rows(1), set::value($param['desc']) - ), + ) ), h::td ( @@ -84,8 +84,8 @@ if(!empty($api->params['header'])) btn ( setClass('btn ghost btn-delete'), - icon('trash'), - ), + icon('trash') + ) ) ) ); @@ -109,7 +109,7 @@ if(!empty($api->params['query'])) ( set::name(''), set::value($query['field']) - ), + ) ), h::td ( @@ -121,7 +121,7 @@ if(!empty($api->params['query'])) ( set::rows(1), set::value($query['desc']) - ), + ) ), h::td ( @@ -136,8 +136,8 @@ if(!empty($api->params['query'])) btn ( setClass('btn ghost btn-delete'), - icon('trash'), - ), + icon('trash') + ) ) ) ); @@ -188,7 +188,7 @@ $parseTree = function($data, $typeList, $level = 0) use (&$parseTree) ( set::rows(1), set::value($data['desc']) - ), + ) ), h::td ( @@ -208,8 +208,8 @@ $parseTree = function($data, $typeList, $level = 0) use (&$parseTree) btn ( setClass('btn ghost btn-delete'), - icon('trash'), - ), + icon('trash') + ) ) ) ); @@ -239,8 +239,8 @@ else ( input ( - set::name(''), - ), + set::name('') + ) ), h::td ( @@ -261,7 +261,7 @@ else textarea ( set::rows(1) - ), + ) ), h::td ( @@ -281,8 +281,8 @@ else btn ( setClass('btn ghost btn-delete'), - icon('trash'), - ), + icon('trash') + ) ) ) ); @@ -304,8 +304,8 @@ else ( input ( - set::name(''), - ), + set::name('') + ) ), h::td ( @@ -326,7 +326,7 @@ else textarea ( set::rows(1) - ), + ) ), h::td ( @@ -346,8 +346,8 @@ else btn ( setClass('btn ghost btn-delete'), - icon('trash'), - ), + icon('trash') + ) ) ) ); @@ -361,7 +361,7 @@ formPanel ( setClass('panel-title text-lg'), $lang->api->edit - ), + ) ), formGroup ( @@ -372,8 +372,8 @@ formPanel set::items($moduleOptionMenu), set::name('module'), set::value($api->module), - set::required(true), - ), + set::required(true) + ) ), formGroup ( @@ -384,7 +384,7 @@ formPanel ( set::name('title'), set::value($api->title) - ), + ) ), formRow ( @@ -400,7 +400,7 @@ formPanel set::required(true), set::items($lang->api->protocalOptions), set::name('protocol'), - set::value($api->protocol), + set::value($api->protocol) ), picker ( @@ -408,8 +408,8 @@ formPanel set::width('1/5'), set::items($lang->api->methodOptions), set::name('method'), - set::value($api->method), - ), + set::value($api->method) + ) ) ), formGroup @@ -429,8 +429,8 @@ formPanel ( set::name('requestType'), set::value($api->requestType), - set::items($lang->api->requestTypeOptions), - ), + set::items($lang->api->requestTypeOptions) + ) ), formGroup ( @@ -440,8 +440,8 @@ formPanel set::name('status'), set::inline(true), set::value($api->status), - set::items($lang->api->statusOptions), - ), + set::items($lang->api->statusOptions) + ) ), formGroup ( @@ -451,8 +451,8 @@ formPanel ( set::name('owner'), set::items($allUsers), - set::value($api->owner), - ), + set::value($api->owner) + ) ), formGroup ( @@ -480,11 +480,11 @@ formPanel ), h::th ( - width('100px'), - ), + width('100px') + ) ), - $apiHeader, - ), + $apiHeader + ) ), formGroup ( @@ -512,11 +512,11 @@ formPanel ), h::th ( - width('100px'), - ), + width('100px') + ) ), $apiQuery - ), + ) ), formGroup ( @@ -528,8 +528,8 @@ formPanel set::name('type'), set::inline(true), set::value($api->params['paramsType']), - set::items($lang->struct->typeOptions), - ), + set::items($lang->struct->typeOptions) + ) ), formGroup ( @@ -562,11 +562,11 @@ formPanel ), h::th ( - width('100px'), - ), + width('100px') + ) ), $apiParams - ), + ) ), formHidden('params', json_encode($api->params)), formGroup @@ -575,8 +575,8 @@ formPanel set::label($lang->api->paramsExample), textarea ( - set::name('paramsExample'), - ), + set::name('paramsExample') + ) ), formGroup ( @@ -609,11 +609,11 @@ formPanel ), h::th ( - width('100px'), - ), + width('100px') + ) ), $apiResponse - ), + ) ), formHidden('response', json_encode($api->response)), formGroup @@ -622,8 +622,8 @@ formPanel set::label($lang->api->responseExample), textarea ( - set::name('responseExample'), - ), + set::name('responseExample') + ) ), formGroup ( @@ -631,7 +631,7 @@ formPanel editor ( set::name('desc'), - html($api->desc), - ), - ), + html($api->desc) + ) + ) ); diff --git a/module/api/ui/editlib.html.php b/module/api/ui/editlib.html.php index 8572cf38fd..d63ed270a7 100644 --- a/module/api/ui/editlib.html.php +++ b/module/api/ui/editlib.html.php @@ -16,7 +16,7 @@ modalHeader ( set::title($lang->api->editLib), set::entityID($lib->id), - set::entityText($lib->name), + set::entityText($lib->name) ); formPanel @@ -31,13 +31,13 @@ formPanel ( set::label($lang->api->name), set::name('name'), - set::value($lib->name), + set::value($lib->name) ), formGroup ( set::label($lang->api->baseUrl), set::name('baseUrl'), - set::value($lib->baseUrl), + set::value($lib->baseUrl) ), formRow ( @@ -50,8 +50,8 @@ formPanel set::name('acl'), set::items($lang->api->aclList), set::value($lib->acl), - on::change("toggleAcl('lib')"), - ), + on::change("toggleAcl('lib')") + ) ) ), formRow @@ -74,7 +74,7 @@ formPanel set::name('groups[]'), set::items($groups), set::value($lib->groups), - set::multiple(true), + set::multiple(true) ) ) ), @@ -88,14 +88,14 @@ formPanel set::name('users[]'), set::items($users), set::value($lib->users), - set::multiple(true), + set::multiple(true) ) ) ) ) ) ), - formHidden('type', $type), + formHidden('type', $type) ); /* ====== Render page ====== */ diff --git a/module/api/ui/editstruct.html.php b/module/api/ui/editstruct.html.php index 12273ac032..72e8c7805a 100644 --- a/module/api/ui/editstruct.html.php +++ b/module/api/ui/editstruct.html.php @@ -54,7 +54,7 @@ if(!empty($struct->attribute)) set::rows(1), set::name(''), set::value($data['desc']) - ), + ) ), h::td ( @@ -74,8 +74,8 @@ if(!empty($struct->attribute)) btn ( setClass('btn ghost btn-delete'), - icon('trash'), - ), + icon('trash') + ) ) ) ); @@ -103,8 +103,8 @@ else ( input ( - set::name(''), - ), + set::name('') + ) ), h::td ( @@ -125,8 +125,8 @@ else textarea ( set::rows(1), - set::name(''), - ), + set::name('') + ) ), h::td ( @@ -146,8 +146,8 @@ else btn ( setClass('btn ghost btn-delete'), - icon('trash'), - ), + icon('trash') + ) ) ) ); @@ -161,7 +161,7 @@ formPanel ( setClass('panel-title text-lg'), $lang->api->editStruct - ), + ) ), formGroup ( @@ -181,8 +181,8 @@ formPanel set::name('type'), set::inline(true), set::value($struct->type), - set::items($lang->struct->typeOptions), - ), + set::items($lang->struct->typeOptions) + ) ), formGroup ( @@ -215,11 +215,11 @@ formPanel ), h::th ( - width('100px'), - ), + width('100px') + ) ), $attributes - ), + ) ), formHidden('attribute', $struct->attribute), formGroup @@ -229,8 +229,8 @@ formPanel ( set::name('desc'), html($struct->desc) - ), - ), + ) + ) ); render(); diff --git a/module/api/ui/index.html.php b/module/api/ui/index.html.php index 06a7e5164d..bd907312fe 100644 --- a/module/api/ui/index.html.php +++ b/module/api/ui/index.html.php @@ -25,7 +25,7 @@ if($app->rawModule == 'api') 'icon' => 'treemap', 'class' => 'ghost', 'text' => $lang->api->struct, - 'url' => createLink('api', 'struct', "libID={$libID}"), + 'url' => createLink('api', 'struct', "libID={$libID}") ))) : null, $libID && common::hasPriv('api', 'releases') ? item(set(array ( @@ -64,7 +64,7 @@ if($app->rawModule == 'api') 'icon' => 'plus', 'class' => 'btn primary', 'text' => $lang->api->createApi, - 'url' => createLink('api', 'create', "libID={$libID}&moduleID={$moduleID}"), + 'url' => createLink('api', 'create', "libID={$libID}&moduleID={$moduleID}") ))) : null, ); @@ -97,7 +97,7 @@ foreach($apiList as $api) ( setClass('desc'), $api->title - ), + ) ) ) ); @@ -109,7 +109,7 @@ $docContent = panel div ( setClass('detail base-url'), - $lang->api->baseUrl . $delimiter . $lib->baseUrl, + $lang->api->baseUrl . $delimiter . $lib->baseUrl ), h::hr(setClass('mb-4')), div diff --git a/module/api/ui/releases.html.php b/module/api/ui/releases.html.php index 5716762275..99de94271c 100644 --- a/module/api/ui/releases.html.php +++ b/module/api/ui/releases.html.php @@ -21,7 +21,7 @@ if(empty($releases)) ( setClass('text-gray'), $lang->api->noRelease - ), + ) ); } else @@ -39,7 +39,7 @@ else h::td ( common::hasPriv('api', 'deleteRelease') ? html(html::a(helper::createLink('api', 'deleteRelease', "libID=$libID&id=$release->id"), '', '', "data-confirm={$lang->custom->notice->confirmDelete} class='ghost ajax-submit'")) : null - ), + ) ); } diff --git a/module/api/ui/struct.html.php b/module/api/ui/struct.html.php index 1c86ee2959..0dc8237846 100644 --- a/module/api/ui/struct.html.php +++ b/module/api/ui/struct.html.php @@ -29,7 +29,7 @@ toolbar 'text' => $lang->api->createStruct, 'class' => 'primary', 'url' => createLink('api', 'createStruct', "libID=$libID"), - ))) : null, + ))) : null ); $structs = initTableData($structs, $config->api->dtable->struct->fieldList, $this->api); @@ -40,5 +40,5 @@ dtable set::cols($cols), set::data($data), set::userMap($users), - set::footPager(usePager()), + set::footPager(usePager()) ); diff --git a/module/api/ui/view.html.php b/module/api/ui/view.html.php index 1653ecf69a..38b9238aa4 100644 --- a/module/api/ui/view.html.php +++ b/module/api/ui/view.html.php @@ -18,7 +18,7 @@ for($itemVersion = $api->version; $itemVersion > 0; $itemVersion--) $link = createLink('api', 'index', "libID={$libID}&moduleID=$moduleID&apiID={$apiID}&version={$itemVersion}"); $versionList[] = array( 'text' => "V$itemVersion", - 'onClick' => jsRaw("() => {loadPage('$link', '#docContent')}"), + 'onClick' => jsRaw("() => {loadPage('$link', '#docContent')}") ); } @@ -36,7 +36,7 @@ $parseTree = function($data, $typeList, $level = 0) use(&$parseTree) h::td(html($field)), h::td(zget($typeList, (string)$data['paramsType'], '')), h::td(zget($lang->api->boolList, (string)$data['required'], '')), - h::td($data['desc']), + h::td($data['desc']) ); if(isset($data['children']) && count($data['children']) > 0) @@ -58,7 +58,7 @@ if($api->params['header']) h::td($param['field']), h::td('String'), h::td(zget($lang->api->boolList, (string)$param['required'])), - h::td($param['desc']), + h::td($param['desc']) ); } @@ -71,7 +71,7 @@ if($api->params['header']) h::th($lang->api->req->name), h::th($lang->api->req->type), h::th($lang->api->req->required), - h::th($lang->api->req->desc), + h::th($lang->api->req->desc) ), $tbody ); @@ -87,7 +87,7 @@ if($api->params['query']) h::td($param['field']), h::td('String'), h::td(zget($lang->api->boolList, (string)$param['required'])), - h::td($param['desc']), + h::td($param['desc']) ); } @@ -100,7 +100,7 @@ if($api->params['query']) h::th($lang->api->req->name), h::th($lang->api->req->type), h::th($lang->api->req->required), - h::th($lang->api->req->desc), + h::th($lang->api->req->desc) ), $tbody ); @@ -120,7 +120,7 @@ if($api->params['params']) h::th($lang->api->req->name), h::th($lang->api->req->type), h::th($lang->api->req->required), - h::th($lang->api->req->desc), + h::th($lang->api->req->desc) ), $tbody ); @@ -140,7 +140,7 @@ if($api->response) h::th($lang->api->req->name), h::th($lang->api->req->type), h::th($lang->api->req->required), - h::th($lang->api->req->desc), + h::th($lang->api->req->desc) ), $tbody ); @@ -152,7 +152,7 @@ div setClass('flex flex-wrap content-start'), featureBar ( - li(backBtn(setClass('ghost'), set::icon('back'), $lang->goback)), + li(backBtn(setClass('ghost'), set::icon('back'), $lang->goback)) ), toolbar ( @@ -161,7 +161,7 @@ div 'icon' => 'treemap', 'class' => 'ghost', 'text' => $lang->api->struct, - 'url' => createLink('api', 'struct', "libID={$libID}"), + 'url' => createLink('api', 'struct', "libID={$libID}") ))) : null, $libID && common::hasPriv('api', 'releases') ? item(set(array ( @@ -203,7 +203,7 @@ div 'url' => createLink('api', 'create', "libID={$libID}&moduleID={$moduleID}"), 'data-size' => 'lg', 'data-toggle' => $spaceType != 'api' ? 'modal' : '' - ))) : null, + ))) : null ), div ( @@ -243,28 +243,28 @@ div ( set::url('javascript:fullScreen()'), setClass('btn ghost'), - icon('fullscreen'), + icon('fullscreen') ), (!$isRelease && common::hasPriv('api', 'edit')) ? btn ( set::url(createLink('api', 'edit', "apiID=$api->id")), setClass('btn ghost'), - icon('edit'), + icon('edit') ) : null, (!$isRelease && common::hasPriv('api', 'delete')) ? btn ( set::url(createLink('api', 'delete', "apiID=$api->id")), setClass('btn ghost ajax-submit'), set('data-confirm', $lang->api->confirmDelete), - icon('trash'), + icon('trash') ) : null, btn ( set::id('hisTrigger'), set::url('###)'), setClass('btn ghost'), - icon('clock'), - ), + icon('clock') + ) ) ) ), @@ -281,7 +281,7 @@ div $api->paramsExample ? html("
" . $api->paramsExample . "
") : null, $apiResponse, $api->responseExample ? h3($lang->api->responseExample) : null, - $api->responseExample ? html("
" . $api->responseExample . "
") : null, + $api->responseExample ? html("
" . $api->responseExample . "
") : null ) ), panel