* finish task #5086.
This commit is contained in:
@@ -1937,7 +1937,7 @@ class storyModel extends model
|
||||
{
|
||||
$property = '(' . $this->lang->story->pri . ':' . (!empty($this->lang->story->priList[$story->pri]) ? $this->lang->story->priList[$story->pri] : 0) . ',' . $this->lang->story->estimate . ':' . $story->estimate . ')';
|
||||
}
|
||||
$storyPairs[$story->id] = $story->id . ':' . $story->title . $property;
|
||||
$storyPairs[$story->id] = $story->id . ':' . $story->title . ' '. $property;
|
||||
|
||||
if($limit > 0 && ++$i > $limit)
|
||||
{
|
||||
|
||||
@@ -14,3 +14,7 @@
|
||||
#zeroTaskStory > label:before {top: 7px; left: 5px;}
|
||||
#zeroTaskStory > label:after {top: 5px; left: 5px;}
|
||||
#zeroTaskStory.checked {border-color: #00a9fc; background: #E9F2FB;}
|
||||
|
||||
.chosen-results > li.has-task {position: relative;}
|
||||
.chosen-results > li.has-task:before {content: attr(data-data); display: inline-block; background: rgba(0,0,0,.1); font-size: 12px; border-radius: 4px; padding: 0 4px; margin-right: 4px; position: relative; top: -1px; color: green}
|
||||
.chosen-results > li.has-task.highlighted:before {color: #fff;}
|
||||
@@ -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