* [task#133002,doing,0.5] fix bug.

This commit is contained in:
zhouxin
2024-11-26 14:42:37 +08:00
committed by 綦新志
parent 05951e3c9d
commit 09ce99459b
3 changed files with 26 additions and 13 deletions
+8 -5
View File
@@ -87,7 +87,7 @@ class pivot extends control
$versionSpecs = $this->pivot->getPivotVersions($pivotID);
if(empty($versionSpecs)) $this->sendError($this->lang->pivot->tipNoVersions);
if(!empty($_POST) && !isset($_POST['filterValues']))
if(!empty($_POST) && !isset($_POST['preview']))
{
$result = $this->pivot->switchNewVersion($pivotID, $version);
if($result) $this->sendSuccess(array('closeModal' => true, 'message' => $this->lang->saveSuccess, 'load' => true));
@@ -95,10 +95,13 @@ class pivot extends control
$this->pivotZen->show($groupID, $pivotID, '', $version);
$this->view->versionSpecs = $versionSpecs;
$this->view->version = $version;
$this->view->groupID = $groupID;
$this->view->pivotID = $groupID;
$marks = $this->loadModel('mark')->getNeededMarks(array($pivotID), 'pivot', 'all', 'version');
$this->view->versionSpecs = $versionSpecs;
$this->view->markedVersions = array_column($marks, 'version');
$this->view->version = $version;
$this->view->groupID = $groupID;
$this->view->pivotID = $groupID;
$this->display();
}
+1
View File
@@ -15,6 +15,7 @@ function loadCustomPivot()
return acc;
}, {});
const form = zui.createFormData({filterValues});
form.append('preview', '1');
const link = $.createLink('pivot', 'versions', 'groupID=' + group + '&pivotID=' + pivot + '&version=' + version);
loadTarget(link, '#pivotVersionPanel', {method: 'POST', data: form});
+17 -8
View File
@@ -31,7 +31,12 @@ foreach($versionSpecs as $versionSpec)
setData('pivot', $pivot->id),
setData('version', $versionSpec->version),
setData('group', $groupID)
)
),
!in_array($versionSpec->version, $markedVersions) ? span
(
setClass("label ghost size-sm bg-secondary-50 text-secondary-500 rounded-full"),
$lang->pivot->newVersion
) : null
),
h::td(empty($versionSpec->desc) ? $lang->pivot->noDesc : $versionSpec->desc)
);
@@ -63,15 +68,19 @@ formPanel
)
)
),
h::table
div
(
set::className('versionTable table bordered table-hover'),
h::tr
setClass('overflow-y-auto h-44'),
h::table
(
h::th($lang->pivot->versionNumber),
h::th($lang->pivot->desc)
),
$versionsTableBody
set::className('versionTable table bordered table-hover'),
h::tr
(
h::th($lang->pivot->versionNumber),
h::th($lang->pivot->desc)
),
$versionsTableBody
)
),
div
(