Merge branch 'sprint/hufangzhou_feedback_863' into 'master'
* Handle feedback #863. See merge request easycorp/zentaopms!5438
This commit is contained in:
@@ -304,4 +304,33 @@ js::set('priv',
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php js::set('taskToOpen', $taskToOpen);?>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
/* Open the task details popup from dynamic. */
|
||||
if(taskToOpen)
|
||||
{
|
||||
var kanban = document.querySelector('#kanban');
|
||||
var observer = new MutationObserver(function (mutationsList, observer)
|
||||
{
|
||||
for(var mutation of mutationsList)
|
||||
{
|
||||
var target = mutation.target;
|
||||
if(mutation.type == 'childList' && target.tagName.toLowerCase() == 'a' && target.classList.contains('title') && target.parentElement.parentElement.dataset.id == taskToOpen && target.parentElement.className.includes('kanban-item-task'))
|
||||
{
|
||||
var a = document.querySelector('[data-id="' + taskToOpen +'"] a.title');
|
||||
if(a)
|
||||
{
|
||||
observer.disconnect();
|
||||
a.click();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
observer.observe(kanban, {subtree: true, childList: true});
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user