* Finish task #63692.

This commit is contained in:
tianshujie
2022-08-09 15:19:16 +08:00
parent bd736db63c
commit 1200e97722
4 changed files with 74 additions and 38 deletions
+5 -11
View File
@@ -128,7 +128,8 @@ function setStoryRelated(num)
*/
function setPreview(num)
{
var storyID = $('#story' + num).val();
var storyID = $('#story' + num).val();
var storyLink = '#';
if(storyID != 0 && storyID != 'ditto')
{
var link = createLink('story', 'ajaxGetInfo', 'storyID=' + storyID);
@@ -136,18 +137,12 @@ function setPreview(num)
{
$('#module' + num).val(parseInt(storyInfo.moduleID));
$('#module' + num).trigger("chosen:updated");
$('#storyEstimate' + num).val(storyInfo.estimate);
$('#storyPri' + num).val(storyInfo.pri);
$('#storyDesc' + num).val(storyInfo.spec);
});
storyLink = createLink('story', 'view', "storyID=" + storyID);
if(!isonlybody)
{
var concat = storyLink.indexOf('?') >= 0 ? '&' : '?';
storyLink = storyLink + concat + 'onlybody=yes';
}
var concat = storyLink.indexOf('?') >= 0 ? '&' : '?';
storyLink = storyLink + concat + 'onlybody=yes';
$('#preview' + num).removeAttr('disabled');
$('#preview' + num).modalTrigger({type:'iframe'});
$('#preview' + num).css('pointer-events', 'auto');
@@ -155,7 +150,6 @@ function setPreview(num)
}
else
{
storyLink = '#';
$('#preview' + num).attr('disabled', true);
$('#preview' + num).css('pointer-events', 'none');
$('#preview' + num).attr('href', storyLink);