Hi there,
i found this code to collapse tasks in views:
<script src="//code.jquery.com/jquery-1.10.2.js"></script><script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script><script type="text/javascript"> jQuery(document).ready(function($) { (function($){ function doCollapseTaskList() { $(".ms-commentcollapse-iconouter > img").each(function(){ $(this).click(); }); } $(function() { SP.SOD.executeOrDelayUntilScriptLoaded(function () { if (typeof asyncDeltaManager != "undefined") asyncDeltaManager.add_endRequest(doCollapseTaskList); else doCollapseTaskList(); },'SP.js'); }); })(jQuery); }); </script>
This works fine. But if I'm in the Datasheet-View or Ganttview (here ist the datsheet-view plus graphs) it doesn't work.
Now I wonder how this is possible to get work. Or it isn't possible?
Thank you for your help :)