This commit is contained in:
daitingting
2024-02-19 05:16:25 +00:00
parent 7bf51ee4b4
commit 4d10b5f657
3 changed files with 18 additions and 2 deletions
+1 -1
View File
@@ -1309,7 +1309,7 @@ class story extends control
$this->story->linkStories($storyID, $this->post->stories);
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
return $this->send(array('result' => 'success', 'callback' => 'loadCurrentPage()', 'closeModal' => true));
return $this->send(array('result' => 'success', 'callback' => 'refreshViewModal'));
}
/* Get story, product, products, and queryID. */
+13
View File
@@ -26,4 +26,17 @@ window.ajaxDelete = function(storyID)
if(res) $.get($.createLink('story', 'delete', 'storyID=' + storyID + '&confirm=yes'), function(data){if(data.result == 'success') loadPage(data.load)});
});
}
$('#mainContent .files').removeClass('px-6');
window.refreshViewModal = function()
{
if(isInModal)
{
loadModal($.createLink('story', 'view', 'storyID=' + storyID), $('.modal').attr('id'));
}
else
{
loadPage($.createLink('story', 'view', 'storyID=' + storyID));
}
}
+4 -1
View File
@@ -17,14 +17,17 @@ if($story->type == 'requirement')
$lang->story->unlinkStory = str_replace($lang->URCommon, $lang->SRCommon, $lang->story->unlinkStory);
}
$isInModal = isInModal();
data('branchID', $story->branch);
data('activeMenuID', $story->type);
jsVar('relievedTip', $lang->story->relievedTip);
jsVar('unlinkStoryTip', $story->type == 'story' ? str_replace($lang->SRCommon, $lang->URCommon, $lang->story->unlinkStory) : $lang->story->unlinkStory);
jsVar('confirmDeleteTip', $confirmDelete);
jsVar('storyType', $story->type);
jsVar('storyID', $story->id);
jsVar('isInModal', $isInModal);
$isInModal = isInModal();
$otherParam = 'storyID=&projectID=';
$tab = 'product';
if($this->app->rawModule == 'projectstory' or $this->app->tab == 'project')