* finish task #5086.

This commit is contained in:
Catouse
2018-11-15 15:19:39 +08:00
parent 52ecb55c52
commit 9fc889340f
4 changed files with 26 additions and 4 deletions
+19 -1
View File
@@ -123,7 +123,24 @@ function toggleZeroTaskStory()
}
})
$select.val(selectVal).trigger("chosen:updated");
})
});
}
// see http://pms.zentao.net/task-view-5086.html
function markStoryTask()
{
$('select[name^="story"]').each(function()
{
var $select = $(this);
$select.find('option').each(function()
{
var $option = $(this);
var value = $option.attr('value');
var tasksCount = storyTasks[value];
$option.attr('data-data', tasksCount + 't').toggleClass('has-task', !!(tasksCount && tasksCount !== '0'));
});
$select.trigger("chosen:updated");
});
}
$(document).on('click', '.chosen-with-drop', function()
@@ -168,6 +185,7 @@ $(function()
$('#module0_chosen').width($('#module1_chosen').width());
$('#story0_chosen').width($('#story1_chosen').width());
if($.cookie('zeroTask') == 'true') toggleZeroTaskStory();
markStoryTask();
if(storyID != 0) setStoryRelated(0);