* [task#133002,doing,0.5] fix bug.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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});
|
||||
|
||||
@@ -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
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user