* finish task #5086.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user