From 6be481268f6af0fb561d2e9340630eaaa323e513 Mon Sep 17 00:00:00 2001 From: zhaoke Date: Wed, 2 Aug 2023 11:05:20 +0800 Subject: [PATCH] * Fix link error of history of devops. --- lib/zin/wg/commentform/v1.php | 1 + lib/zin/wg/form/v1.php | 3 ++- lib/zin/wg/history/v1.php | 1 + module/account/ui/view.html.php | 5 ++++- module/host/ui/view.html.php | 5 ++++- module/instance/ui/view.html.php | 5 ++++- module/mr/js/link.ui.js | 1 - module/mr/ui/view.html.php | 5 ++++- module/serverroom/ui/view.html.php | 5 ++++- module/store/js/browse.ui.js | 1 - module/store/ui/appview.html.php | 1 + 11 files changed, 25 insertions(+), 8 deletions(-) diff --git a/lib/zin/wg/commentform/v1.php b/lib/zin/wg/commentform/v1.php index 1e39d90bfa..121971ff23 100644 --- a/lib/zin/wg/commentform/v1.php +++ b/lib/zin/wg/commentform/v1.php @@ -22,6 +22,7 @@ class commentForm extends wg ( set::url($url), set::method($method), + set::submitBtnText($lang->save), setClass('comment-form'), editor ( diff --git a/lib/zin/wg/form/v1.php b/lib/zin/wg/form/v1.php index 467fc29195..5cbee7c351 100644 --- a/lib/zin/wg/form/v1.php +++ b/lib/zin/wg/form/v1.php @@ -16,7 +16,8 @@ class form extends formBase 'items?: array', // 使用一个列定义对象数组来定义表单项。 'grid?: bool=true', // 是否启用网格部件,禅道中所有表单都是网格布局,除非有特殊目的,无需设置此项。 'labelWidth?: int', // 标签宽度,单位为像素。 - 'actionsClass?: string="form-group no-label"' // 操作按钮栏的 CSS 类。 + 'actionsClass?: string="form-group no-label"', // 操作按钮栏的 CSS 类。 + 'submitBtnText?: string' // 提交按钮文本。 ); protected function created() diff --git a/lib/zin/wg/history/v1.php b/lib/zin/wg/history/v1.php index fe4d3a3249..a23a5096bc 100644 --- a/lib/zin/wg/history/v1.php +++ b/lib/zin/wg/history/v1.php @@ -132,6 +132,7 @@ class history extends wg ( setClass('comment-edit-form hidden mt-2 ml-6'), set::method('post'), + set::submitBtnText($lang->save), set::action(createLink('action', 'editComment', "actionID=$action->id")), editor ( diff --git a/module/account/ui/view.html.php b/module/account/ui/view.html.php index 9c730ef17d..e3f077c566 100644 --- a/module/account/ui/view.html.php +++ b/module/account/ui/view.html.php @@ -70,7 +70,10 @@ detailBody ) ), ), - history(), + history + ( + set::commentUrl(createLink('action', 'comment', array('objectType' => 'account', 'objectID' => $account->id))), + ), floatToolbar ( set::object($account), diff --git a/module/host/ui/view.html.php b/module/host/ui/view.html.php index 9da9b70921..8edbd3cd34 100644 --- a/module/host/ui/view.html.php +++ b/module/host/ui/view.html.php @@ -95,7 +95,10 @@ detailBody ) ) ), - history(), + history + ( + set::commentUrl(createLink('action', 'comment', array('objectType' => 'host', 'objectID' => $host->id))), + ), floatToolbar ( set::object($host), diff --git a/module/instance/ui/view.html.php b/module/instance/ui/view.html.php index ea3dad97e9..940b3b180d 100644 --- a/module/instance/ui/view.html.php +++ b/module/instance/ui/view.html.php @@ -198,6 +198,9 @@ div div ( setClass('basis-auto'), - history() + history + ( + set::commentUrl(createLink('action', 'comment', array('objectType' => 'instance', 'objectID' => $instance->id))), + ) ) ); \ No newline at end of file diff --git a/module/mr/js/link.ui.js b/module/mr/js/link.ui.js index 67121d1fe5..0e25f73d28 100644 --- a/module/mr/js/link.ui.js +++ b/module/mr/js/link.ui.js @@ -38,7 +38,6 @@ window.showLink = function(obj) let link = $(obj).data('url'); let $tabContent = $(obj); - console.log(1111, link, $tabContent, $(obj)); if($(obj).hasClass('link')) { $tabContent = $(obj).closest('.tab-pane'); diff --git a/module/mr/ui/view.html.php b/module/mr/ui/view.html.php index 500ae15f2f..9483e4e9c7 100644 --- a/module/mr/ui/view.html.php +++ b/module/mr/ui/view.html.php @@ -220,7 +220,10 @@ panel cell ( setClass('cell cell-history'), - history(), + history + ( + set::commentUrl(createLink('action', 'comment', array('objectType' => 'mr', 'objectID' => $MR->id))), + ) ), ), cell diff --git a/module/serverroom/ui/view.html.php b/module/serverroom/ui/view.html.php index bdc770b95a..f64c8c5cbd 100644 --- a/module/serverroom/ui/view.html.php +++ b/module/serverroom/ui/view.html.php @@ -74,7 +74,10 @@ detailBody ) ), ), - history(), + history + ( + set::commentUrl(createLink('action', 'comment', array('objectType' => 'serverroom', 'objectID' => $serverRoom->id))), + ), floatToolbar ( set::object($serverRoom), diff --git a/module/store/js/browse.ui.js b/module/store/js/browse.ui.js index da63954006..ac3430af29 100644 --- a/module/store/js/browse.ui.js +++ b/module/store/js/browse.ui.js @@ -39,7 +39,6 @@ window.installApp = function() $('#mainContent').on('keydown', '#name', function(event) { - console.log(1111, event.key); if (event.key === 'Enter') { const form = new FormData(); diff --git a/module/store/ui/appview.html.php b/module/store/ui/appview.html.php index a3e19df71d..ee9e13e15f 100644 --- a/module/store/ui/appview.html.php +++ b/module/store/ui/appview.html.php @@ -15,6 +15,7 @@ namespace zin; $setting = usePager('dynamicPager'); $screenshots = array_filter($cloudApp->screenshot_urls); +if(!empty($screenshots) && count($screenshots)%3) $screenshots = array_merge($screenshots, array_fill(0, count($screenshots)%3, '')); $screenshotsWg = array(); foreach($screenshots as $screenshot) {